Ask here your questions to get help using GDevelop.
By cyberxtech
#61748 Hi there does anyone know a way to get a random timer ? For example i use timers to spawn enemies and powerups but basicly it's triggered by the set timer. I wonder if there is a way to add let's say +5 / - 5 + random sec to a timer to make it random ?
By Mats
#61749
Code: Select all//Set a variable to be 10 +/- 5
Variable(set_new_time) is equal to 1
-Do = 10 + Random(5) - Random(5) to Variable(timer_random)
-Do =0 to Variable(set_new_timer)

//Timer
Timer "plus_minus_5s" is greater than Variable(timer_random) seconds
-Do = 1 Variable(set_new_time)
-Do {whatever your event is}