User Tag List

Results 1 to 8 of 8

Thread: character taking damage counter

  1. #1
    Clicker Fusion 2.5 Developer

    Join Date
    Mar 2018
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    character taking damage counter

    how do i make it where when the badguy collides with the player it subtracts 1 from the health counter every 2 seconds? because right now when the baddies collide it only subs 1 but only if it keeps re-colliding (idk if im saying it right lol). i did the best i can using a flag and it kinda works but it does too quickly. the code is between the yellow lines. thanks collision.mfa

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    c4t's Avatar
    Join Date
    Aug 2018
    Posts
    46
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    maybe turn a flag on when the player collides with the baddie. When the flag is on. Run a timer event that takes 1 from health value every 2 seconds. you can leave the flag on as long as you like, so a player could still be losing some health as moving away. use a timer event to turn the flag off too when the player has moved away . so you turn the flag on for a set time on collision.

  3. #3
    Clicker Fusion 2.5 Developer

    Join Date
    Mar 2018
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @c4t so like this? rgg.png

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    c4t's Avatar
    Join Date
    Aug 2018
    Posts
    46
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    i made a example . player active has 8 direction movement so you can collide with the baddie.

    baddie_hit_delay_01.mfa

  5. #5
    Clicker Fusion 2.5 Developer

    Join Date
    Mar 2018
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @c4t i dont really understand your example. what im trying to do is have the player collide with a baddie, every 2 seconds that hes collided then a heart will be taken 1 will be subbed from the counter. and i dont really want the counter to still tick down because they player only has 3 hearts and thatll just be unfair to the player

  6. #6
    Clicker

    Fusion 2.5Android Export Module

    Join Date
    Jan 2007
    Posts
    268
    Mentioned
    6 Post(s)
    Tagged
    1 Thread(s)
    Here ya go.

    The reason the "timer" counter is 120 is because the framerate is 60. If you subtract 1 from 120 every frame it will reach 0 in exactly 2 seconds as long as your target framerate is 60.
    Attached files Attached files

  7. #7
    Clicker Fusion 2.5 Developer

    Join Date
    Mar 2018
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @GamesterX23 yeah this is kinda what i wanted to do, but is there a way to do a collision instead of an overlap?

  8. #8
    Clicker Fusion 2.5 Developer

    Join Date
    Mar 2018
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nvm i figured it out. thx for the help tho

Similar Threads

  1. Replies: 6
    Last Post: 7th November 2017, 05:46 PM
  2. Floating Damage Counter Problems
    By Nicholas Martin in forum Fusion 2.5
    Replies: 3
    Last Post: 29th August 2017, 11:54 PM
  3. Issues with floating damage counter
    By Adnihil in forum Fusion 2.5
    Replies: 3
    Last Post: 30th November 2016, 04:02 PM
  4. Floating Damage Counter
    By Narfafian in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 20th July 2012, 02:19 AM

Posting Permissions

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