User Tag List

Results 1 to 3 of 3

Thread: Dyiing way too quickly?

  1. #1
    Clicker Fusion 2.5 (Steam)

    Join Date
    Dec 2014
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Dyiing way too quickly?

    I'm having a strange problem with something I've done a million times: collisions. When my character collides with an enemy, the "Damage" loop plays once. For this loop, the character bounces (to get the player away from the enemy), flashes for a bit, and then loses one life.

    +On loop "Damage"
    +Number of lives > 0

    -Subtract 1 from number of lives
    -Bounce, Flash during 00"-15, Set Flash to -20

    There is code earlier to reactivate the player, but that's not the problem.

    The problem is that the character loses all 3 lives the second it collides with an enemy character. I put up some counters so each time there was a collision, it would add 1 to the counter. After intentionally ramming into an enemy, the counter said 3. So, I figured that maybe the character wasn't bouncing properly, so I set up a second counter to add 1 every time the player bounced. Sure enough, it said 3 after I touched the enemy just once.

    How do I keep the character from dying so fast? Repositioning him just gets him stuck in walls and other obstacles more often than not (the game is very Pacmanish or Bombermanish).

  2. #2
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    DaveC's Avatar
    Join Date
    Jun 2007
    Location
    Perth, Australia
    Posts
    2,132
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    Try these out. You have to make sure that the condition where the player is losing health is only true repeatedly (player hits enemy, subtract 1 health will happen over and over again and drain the health instantly unless you add more conditions to prevent that)

    and more specific to your code.. how many times does the loop run? that could be the problem. You could instead do something like "player collides with enemy + flash=0" sub 1 life then run loop damage x times. (but the damage loop does not subtract life, that has already happened on the initial collision.)

    Take Damage.mfa

  3. #3
    Clicker Fusion 2.5 (Steam)

    Join Date
    Dec 2014
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the reply and for your example. The loop runs only once, but I'll try having the initial collision take out life instead of the loop to see what happens.

Similar Threads

  1. Making a Standalone App Open Quickly
    By Dines in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 14th March 2013, 03:47 PM
  2. Tapping really quickly freezes animations
    By mrmdesign in forum iOS Export Module Version 2.0
    Replies: 7
    Last Post: 19th August 2011, 12:30 PM
  3. QUICKLY HELP
    By Robin_Manager in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 2nd January 2009, 09:03 PM
  4. MfxDoc (Document Extensions QUICKLY)
    By TwiTerror in forum Extension Development
    Replies: 27
    Last Post: 20th May 2007, 03:08 PM
  5. How can I crop images quickly?
    By Mantoid in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 4th July 2006, 10:29 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
  •