User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11

Thread: Damage indicator problem

  1. #1
    No Products Registered

    Join Date
    May 2008
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Damage indicator problem

    A red counter gets created each time the enemies take damage, but if 2+ get created at once, only one of them displays the damage done, the other one displays 0, which is the problem. I don't want to select all counters because I do want some to display different numbers sometimes, but I also don't want just the one...

    This is just a test file with minimal effort in graphics and the like, it's just for me to get different concepts down.

    Controls:
    Arrow keys to move
    Z to attack
    Attached files Attached files

  2. #2
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    RickyRombo's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere between here and there
    Posts
    3,167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Damage indicator problem

    I can't understand how to extract rar files - i don't think i have the program...

  3. #3
    No Products Registered

    Join Date
    May 2008
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Damage indicator problem

    You need WinRAR, available for free at www.rarlabs.com

  4. #4
    No Products Registered

    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    1,141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Damage indicator problem

    Works fine for me... One thing I noticed though is that you should move the Collision between x and y to the top of the event since it is a triggered condition.

  5. #5
    No Products Registered

    Join Date
    May 2008
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Damage indicator problem

    Ah, what I mean is if two are created at the exact same time. It works fine with as many counters on screen as you want, just that if you hit two enemies at the exact same moment, only one will display the correct value.

    Oh, and arranging them like you said totally screws things up, at least for the first one (the one with the "Only one action per loop" in it). If it works, I'm not going to mess with it, but I'll keep that in mind.

  6. #6
    No Products Registered

    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    1,141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Damage indicator problem

    If the Collision between event is at the top it will become red and the event will run once for every collision that occurs. The "Only one action when event loops" condition will disable this behavior though, so try removing it if it doesn't work.

  7. #7
    No Products Registered

    Join Date
    May 2008
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Damage indicator problem

    I dunno, when I try that, things get weird. Enemies can be hit multiple times per collision, or not at all. If the other one has the collision first (the one which checks if animations are NOT playing), then the controlled object freezes during its animation sometimes.

    And I still have the problem of a counter being 0.

  8. #8
    No Products Registered

    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    1,141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Damage indicator problem

    Animations freezing can be solved by adding an "Animations has finished" > "Restore animation sequence" event.
    The reason the objects might get stuck together is because the objects will not be separated as long as the ship is being damaged. Add a new line that looks like:
    * Collision between player and enemy
    + X Animation Loop is playing
    > player Bounce

    I just tried rearranging the conditions in the file you posted, and it works fine when you move the collision event to the top and remove the "Only one action when event loops" condition. Don't understand why it won't work for you...

  9. #9
    No Products Registered

    Join Date
    May 2008
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Damage indicator problem

    Ok, I fixed up a few things and followed your advice as much as possible, but the event where it checks if two animations are not playing is still better with the collision check last. If it's first, the ship's animation locks up and movement is halted if it's being hurt and is in a position to be hurt again after the short invincibility.

    The multiple hits thing was just due to the animation frames being of different sizes, so there were actually multiple collisions. But not taking damage when the two overlap is still a real problem...

    Attached is my latest file, maybe there's something I changed to break it...
    Attached files Attached files

  10. #10
    No Products Registered

    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    1,141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Damage indicator problem

    Modified your game a bit to fix the bugs. Hopefully you will understand what changes I made.
    Attached files Attached files

Page 1 of 2 1 2 LastLast

Similar Threads

  1. object compass/indicator
    By arfa in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 16th July 2011, 12:18 PM
  2. Need Help with Player Damage
    By 122334shadow in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 1st December 2010, 08:06 AM
  3. Battle damage
    By Twario in forum The Games Factory 2 - Technical Support
    Replies: 4
    Last Post: 5th July 2010, 06:36 AM
  4. Enemys take damage.
    By Dakk in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 22nd March 2010, 11:09 AM
  5. Health and Damage Problem in TGF
    By samdaman719 in forum The Games Factory 2 - Technical Support
    Replies: 3
    Last Post: 9th February 2009, 08:48 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
  •