User Tag List

Results 1 to 8 of 8

Thread: how do you make a counter decrease by 1 until it reaches a certain number?

  1. #1
    Clicker Fusion 2.5 Developer

    Join Date
    Dec 2015
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how do you make a counter decrease by 1 until it reaches a certain number?

    One of the games I am making is a surgery fan game of the "trauma center" series made by Atlus (not sure if any one would be familiar with it. The game heavily depends on a counter used as the vitals in each level, and if it hits zero- then game over. It's a little bit hard to explain, so I'll use it in an example:

    Counter Properties:
    Initial Value: 99
    Minimum Value: 0
    Maximum Value: 99

    In the event editor, if I put "Subtract 20" from counter-with the Initial value still at 99 (if the player messes up or something happened)- it would immediately go to 79. Is their a way I can make it so that the counter will actually SHOW itself decreasing by 1 (at a fast rate) until it gets to that value? I don't want it to just "jump" to the value.

    That way- if the player is fast enough- if the counter was going to decrease to zero- the player can get the opportunity to raise the counter/vitals before getting to zero.

    Everything else seems to be going okay, luckily

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS 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)
    Nicholas Martin's Avatar
    Join Date
    Nov 2006
    Location
    Canada
    Posts
    203
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am making you something

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS 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)
    Nicholas Martin's Avatar
    Join Date
    Nov 2006
    Location
    Canada
    Posts
    203
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I hope this is what you were looking for! Good luck
    Attached files Attached files

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS 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)
    Nicholas Martin's Avatar
    Join Date
    Nov 2006
    Location
    Canada
    Posts
    203
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In the events... the edit box needs the "only one action when event loops" removed. Or to use the event "when entry zone has been modified + Text is a number" Sorry, I forgot to fix that.

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS 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)
    Nicholas Martin's Avatar
    Join Date
    Nov 2006
    Location
    Canada
    Posts
    203
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I re-read your post and modified it accordingly to what you wanted.
    Attached files Attached files

  6. #6
    Clicker Fusion 2.5 Developer

    Join Date
    Dec 2015
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you so much! This is what I wanted! I greatly appreciate your help, this'll help a lot with my game and make it run more efficiently

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS 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)
    Nicholas Martin's Avatar
    Join Date
    Nov 2006
    Location
    Canada
    Posts
    203
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You're welcome. Anytime

  8. #8
    Clicker Fusion 2.5Fusion 2.5+ DLC
    casleziro's Avatar
    Join Date
    Mar 2013
    Location
    United States
    Posts
    679
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    Here's an example that is a bit simpler, and only requires 2 counters: a target one, and a display one.

    Change 0-2, 2 in the expression if you want a different speed. (0-1, 1 for your initial question). This will work counting up or down and seek any value the target is set at. This same formula can be used on alterable values or even active objects themselves, if you need to move them at a constant speed towards a target. The formula is:

    current value + range ( ( target value - current value ) , 0- speed, speed)

    adding the difference between the two values (target value - current value) to the current value, but capping that difference using the Range() function

    seeking counter.mfa

Similar Threads

  1. Number of a paragraph based on a counter
    By ffomega in forum Fusion 2.5
    Replies: 1
    Last Post: 11th March 2016, 10:29 PM
  2. Counter uses the number of another counter from other frame.
    By crashkandicoot in forum Fusion 2.5
    Replies: 6
    Last Post: 4th October 2015, 02:33 AM
  3. [bug] COUNTER (number of decimals)
    By StingRay in forum Android Export Module Version 2.0
    Replies: 0
    Last Post: 9th April 2013, 12:27 PM
  4. number of purchases counter
    By lachmandoo in forum iOS Export Module Version 2.0
    Replies: 8
    Last Post: 2nd April 2012, 01:40 PM
  5. Counter not displaying proper number
    By jellytot in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 22nd January 2009, 09:11 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
  •