HI in my app i need to create a counter who do this
the counter count, 1,2,3,4 and then restart 1,2,3,4 but faster everytime the counter finish to count 1,2,3,4
Well, you probably got code that looks like this:
Every X seconds: Add 1 to counter.
What you do now, is, you create a variable called "interval" for example, initial value could be 2.
You insert that variable into the "Every X seconds" condition at the position of the X.
Next and last thing is to add an action underneath the "Add 1 to counter", being:
Set "interval" to: interval - (counter % 4 = 0 ? Y : 0).
Replace Y with the amount of seconds you want the interval to decrease.
This assumes that your counter starts at 1 and not at 0. If it starts at 0, put counter+1.
If you need any more help or a .capx, give me a shout.
(A .capx always explains better)
Develop games in your browser. Powerful, performant & highly capable.
yes a capx please
i created here a picture for explaining my problem.
i have a sprite "player"who need to spawn at 4 differents positions (1,2,3,4) randomly but accélérating, how to achieve that?
Hm, so the character spawns at 1, then at 2, then at 3, then at 4 and then starting over again?
And that should happen accelerated over time?
Or what exactly should be accelerated?
I created a .capx for you, assuming you want the player to appear at 1,2,3 or 4 each time.
If I misunderstood you and you want the player to appear at each position once, that shouldn't be too hard to convert my .capx for your purpose.
Thanks i solved this!!!