Timers and Negative Exponentials
Forte
Member, PRO Posts: 297
Hi there guys,
I have a timer that runs off a negative exponential equation, and looks like this: exp(- game.Score *0.02)+0.3
I have placed that equation directly into the "Every "x" seconds" box, and in the game, the time delay stays the same as the score increases. The delay should be getting shorter until it stops getting shorter at the threshold of 0.3 seconds.
Why is this?
Cheers,
Forte
Comments
'Every' seems (to me at least) to lose its meaning when the value it refers to only happens once, which would be the case if each step were different, that is to say if 'every' means 'all of . . . ' then it seems odd to say 'all of XXXs . . . ' when the equations only references a certain value once.
Hope that makes some sense !?
Or to put it another way:
A: "I want X to happen every Saturday"
B: "Ok, no problem, so once a week then ?"
A
: "No, I want the progression to be exponential, so after the first Saturday it should be some other day"
B: "So not every Saturday then ?"
So, 'Every' in a timer works as you'd expect it to work, it calculates an initial value and uses that value throughout.
'After' seems like a better candidate for a progression of values.
But then After only occurs once. What's the most efficient way to get an after to loop? (It's probably super obvious so apologies for being a little bit of an airhead, jetlag doesn't go well with work)
Here's how I'd do it.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Sorry for the late reply, been on the road for the past week, anyway thank you for your help!