Just a question about timer

Why this doesn’t work?

so my purpose is if var is 1 then create and start the timer (stated in action list “start (or reset)” ) then every 3 seconds do something. didn’t work with above.
then i deleted reset action and now it runs perfectly. and after searching now i know that checking timer also create timer. so above pic is timer conflict or what? someone can kindly explain me?
Thanks

Every event occurs every frame.

So when startmining = 1, the timer is reset every frame. It’ll never hit 3 seconds.

Your best bet would be to separate those events (not make them subevents) and put trigger once conditions on both.

1 Like

thanks. managed to make it work. however can i ask OOT question?
so in my top down game, a spaceship is on top of an asteroid, it is supposed to rotate to station. but when it almost facing the station, the rotation stopped. it happened after i think the spaceship and asteroid collision mask overlap each other.
maybe i need to prevent the collision mask to overlap each other?

Are you rotating to the X & Y position of the station? If so, that’s the top left corner of the station image. Try rotating to CenterX() and CenterY() of the station object instead…

you’re right, now it runs smoothly. thank you