User Tag List

Results 1 to 5 of 5

Thread: how to slectively destroy a missile?

  1. #1
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    how to slectively destroy a missile?

    I'm trying to make a game where an enemy fires a bunch of missiles and the player clicks on their impact points to destroy them. I have the enemy creating a missile and target and assigning them the same ID. The problem is when I go to destroy the missile.

    When the player clicks on the screen, they create a circular object at the mouse cursor's position. I want it so that if the missile's target is overlapping the circle, ONLY the missile associated with that target is destroyed. Currently, it seems to be destroying all the missiles. Can someone shed some light on the conditions I need to use to get this working?

    Thanks in advance,

    Mobichan

  2. #2
    No Products Registered

    Join Date
    Aug 2006
    Posts
    984
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: how to slectively destroy a missile?

    maybe something like:

    "Missile_target" is overlapping "Mouse_circle"
    + ID of "Missile" = ID("Missile_target")
    --> Missile_target - Destroy
    --> Missile - Destroy

  3. #3
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Re: how to slectively destroy a missile?

    I often get confused by the order I should be checking overlap objects. I actually tried something like this initially, but I was checking if the circle was overlapping the target. Is there a simple way to rememeber which one comes first? And does the order affect the object selection process in MMF?

  4. #4
    No Products Registered

    Join Date
    Aug 2006
    Posts
    984
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: how to slectively destroy a missile?

    Quote Originally Posted by mobichan
    I often get confused by the order I should be checking overlap objects. I actually tried something like this initially, but I was checking if the circle was overlapping the target. Is there a simple way to rememeber which one comes first? And does the order affect the object selection process in MMF?
    yeah the order does make a difference

    MMF looks at each instance of the object on the left, but doesn't do the same for the object on the right

    when you have a "many-to-one" case like this, you want the "many" objects on the left, and the "one" object on the right

  5. #5
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Re: how to slectively destroy a missile?

    Thanks for the info. I actually have 3 objects I am needing to destroy when the overlap condition occurs, so I found another way to make this work. I ended up setting a global variable to the ID each component object has and then checking each object against that global variable.

    Thanks again,

    Mobichan

Similar Threads

  1. Help best way of GRADIUS style missile
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 20th January 2011, 09:02 PM
  2. Destroy Object..
    By MostDreaded in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 14th January 2011, 05:18 AM
  3. Rotating Missile Example
    By LB in forum File Archive
    Replies: 1
    Last Post: 14th July 2010, 11:25 PM
  4. Homing Missile Example
    By Ryan in forum File Archive
    Replies: 5
    Last Post: 25th January 2010, 03:39 AM
  5. 360 degree Homing missile
    By scaneider in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 10th December 2007, 04:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •