Using math.random function in timers [Solved]
Moderator: Moderators
-
Noobasaurus
- Droid Pilot Assassin

- Posts: 2006
- Joined: Tue Aug 17, 2010 5:56 pm
Using math.random function in timers [Solved]
How would one get a random timer value between two numbers? Say you want it between 500 and 600...how would you do that in a timer?
Last edited by Noobasaurus on Sat Oct 29, 2011 9:13 pm, edited 1 time in total.
- DarthD.U.C.K.
- Master of the Force

- Posts: 6027
- Joined: Wed Sep 27, 2006 11:05 am
- Location: Duckburg, Germany
Re: Using math.random function in timers
have you tried that?
Code: Select all
duration = math.random(500,600)
SetTimerValue(timername, duration)- DarthXeon
- Banned
- Posts: 84
- Joined: Mon Sep 19, 2011 5:41 pm
- Projects :: I move fast... Lightning fast...
- Location: In A Nearby Solar System
Re: Using math.random function in timers
i wanna see what your trying to make with the timer noobasarus i bet its something cool 
-
Noobasaurus
- Droid Pilot Assassin

- Posts: 2006
- Joined: Tue Aug 17, 2010 5:56 pm
Re: Using math.random function in timers
No I haven't, thanks. Trying it right now.DarthD.U.C.K. wrote:have you tried that?Code: Select all
duration = math.random(500,600) SetTimerValue(timername, duration)
It's something for the hard mode on Gamorrean Attack...so that you can't time it...DarthXeon wrote:i wanna see what your trying to make with the timer noobasarus i bet its something cool
EDIT: Yup, it works, thanks.
