User Tag List

Results 1 to 5 of 5

Thread: thrown enemies not detecting other enemies

  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,291
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)

    thrown enemies not detecting other enemies

    In regards to my thread here: http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=136821#Post1368 21

    I'm trying to get a thrown enemy to detect any enemy it hits while flying through the air. I've tried both "overlapping" and "collision between 2 objects" but nothing seems to work. I've added a pause debugger command on the collision condition, but it doesn't ever pause, so I assume something else must be wrong. Can anyone lend a hand with this?

    Thanks in advance,

    Mobichan
    Attached files Attached files

  2. #2
    No Products Registered

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

    Re: thrown enemies not detecting other enemies

    changed a couple of events (removed two 'on loop' conditions that prevented the collision checks from triggering), and changed that "always" event from my example into an 'on loop' (don't know why i made it an always anyway); also removed the pause debugger action because i thought my changes froze the app lol

    seems to work fine now, i think
    Attached files Attached files

  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,291
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)

    Re: thrown enemies not detecting other enemies

    Doh! I misread your original post and put the collision conditions in the loop. But having them outside a loop means there is the potential for missing the collision if the object moves too fast, right? That was why I had put the check in the loop in the first place. I'm just curious for my future run-ins with MMF quirkiness.

    Anywho, thanks so much for the quick help. I still need to affect the enemies that are hit. Any suggestions?

    Mobichan

  4. #4
    No Products Registered

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

    Re: thrown enemies not detecting other enemies

    Quote Originally Posted by mobichan
    Anywho, thanks so much for the quick help. I still need to affect the enemies that are hit. Any suggestions?
    basically just add the event shown in line 82. you'll probably want to perform the actions on the second object before the first (as shown), so mmf doesn't apply those actions to the first object when its string is changed; you may also want more reliable checks than just checking if the string is different than "THROWN"... basically just experiment with your restrictions if you run into bugs

    i also reduced 80 and 81 down to just one condition each since that's all you need for them (i'm surprised the "THROWN" check in them wasn't messing things up, actually, because it'd be skipping the non-thrown object)

    for an optimization: you should really only need to run CheckHitEnemy twice, since MMF handles object collisions in pairs anyway

    ANYWAY about your fastloop-based movement... that may be a little more involved since this method uses collisions mainly because it avoids needing another fastloop to run for each pair of collided objects

  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,291
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)

    Re: thrown enemies not detecting other enemies

    So, I did manage to get this working another way. I added an overlapping condition to the ThrowEnemy loop and set a flag to ON on the enemy that is hit. That way I can tag each enemy that the thrown enemy hits and only damage them once. I did this since I decided to not stop the thrown enemy until it hits an obstacle, allowing it to mow through multiple enemies. Much more fun, IMO.

    Thanks for the heads up on checking objects in pairs. I'll add that optimization soon. And thanks for all the help in general.

    Mobichan

Similar Threads

  1. How to do Enemies?
    By Corlen in forum Lacewing
    Replies: 4
    Last Post: 18th April 2012, 07:59 PM
  2. PMO for enemies
    By Warmachine in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 29th May 2011, 06:00 PM
  3. enemies
    By WareWolff in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 30th June 2010, 09:53 PM
  4. Enemies
    By WareWolff in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 29th June 2010, 07:48 AM
  5. Enemies getting stuck in the walls when thrown
    By mobichan in forum File Archive
    Replies: 2
    Last Post: 7th May 2009, 06:08 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
  •