[SOLVED]How i make thye suns fall each time

making pvz fangame post number idk: i want to make the one random sun to fall every 7 seconds, but there is a problem. If i put trigger once, only one sun drops for the rest of the scene, but if i don’t. every falling sun will fall at the same time. What i do?
(also it’s showing 2 seconds because i was testing).


The object timers are causing the issue. Here’s why :

Each fallingsuns has a timer. I’m assuming they all start at the same time, and so they’ll all be greater than 2 seconds at the same time. Therefore they all trigger the “Timer of fallingsuns > 2 seconds” condition.

When you pick one at random , the actions are only applied to that one, not the others. So you reset the timer of that one, but not the others. And since you have a trigger one that’s already been activated, the events won’t run again because there’s always another fallingsuns with a timer > 2 seconds.

tl;dr :

The solution is to create 2 subevents on the timer check, first one to reset all timers, the second one that picks a random one, starts the moving and stops the timer (if you don’t stop the timer, then that fallingsuns will meet the “timer > 2 seconds” conditions again and could be made to fall a second time).

Why don’t you just get the X100x and X500 and do an Every 7 seconds spawn sun at RandomInRange(x100,x500)
if only one sun will fall there is no point in having 9 suns in runtime.
just spawn the suns when the timer reach 7 seconds, just do
Create sun at RandomInRange(minX,maxX), -80 or whatever -y you want.
Then move the sun to wherever you want
plus instead of using a timer you should try to use the Extenson Every x seconds.

well that was helpful, but im little dumb so it’s a little hard to understand, could you make a visual represetation if possible?

Like this :

The first sub event resets all the timers that are > 2 seconds.

The second event removes the timer so the fallingsun that is falling will no longer be a candidate.