How to have the reaction time of a timer vary (min,max)
Wllew4Games
Member Posts: 34
in Tech Support
Hello! I have another problem... xD
In my test environment for mechanics of a game, this is my problem.
I want to make a timer, so that after 5-10 sec, an action will occur. But I want it to change every time, or not always happen at the same time. Sorry if my explanation is confusing. Please help me! Thanks
P.S. I am #1 on the leaderboard right now and this is my second day on the forum. This shows how far stupidness can get you, this being my 3rd post in 2 days. ;D
Comments
http://forums.gamesalad.com/discussion/comment/464547/#Comment_464547
http://forums.gamesalad.com/discussion/88421/random-spawn-timer
Thanks for the help!
Would it be helpful to you if you were to set your random timer then, once the timed event had occurred, your timer spawns a new version of itself (with a new call for a random time) and is destroyed? That way, you always have a random update of a random value to apply to your events..?
Thanks for the suggestion but I'm still not clear on how it works.
game.attribute 'X'
Timer: After X seconds
--Change X to random (5,10)
--Do action
--Destroy this actor
--Spawn this actor
so an example would be
game.attribute.1
timer:
after 1 sec, change attribute: game.attribute.1 to random(5, 10)
Move to 0,0
For auto reset:
Destroy this actor
Spawn this actor
Is that what you mean?
I got it!
I'm not sure what 'For auto reset' means ?
Hi @Wllew4Games - is the attached file the kind of thing you're looking for? Totally random spawning, with a sound file attached so that you can hear the randomness!
Yes it is! Its the same thing as the video I linked to! I'm really hoping this will work with the way I want it to! Thanks for all the help!
Also, @kobayaashi I think my version of game salad is different then yours, but I cant seem to upgrade to what your example has...
It says some updates failed to install...
nvm! It update now!