How can i make a loop with the new function "Wait x seconds"

Hello guys, i want to know how can i make a loop using “Wait x seconds”

i’m trying to repeat an action every 1 sec, example: shot, wait, shot, wait, shot wait … infinitely.

image

There no reason to use “wait X seconds” for that. It’s not designed for that, mostly.

You should just start a timer at the beginning of the scene (or whatever your initiating action is), set a condition for “timer is > 1 seconds”, then do your actions and restart the timer as the last action.

1 Like

This is the problem, the timer affect all of the objects, I need the action for different objects but not at the exactly same time, I hope you understand me

Not sure what you’re referring to. Timers don’t affect objects at all, they just use whatever logic you’ve used them with.

A scene timer will only have 1 timer by a single name, though. If you want to have a unique timer per instance of an object, use an Object timer, not a scene timer.

That’s probably what I need, but I don’t know where to find the object timers.

You can search for them when adding an action, and it’ll show you how to find them:

However, they’re a little different since they are logically linked to an instance, so it’s worth a read in the documentation:
https://wiki.gdevelop.io/gdevelop5/all-features/timers-and-time

(don’t worry, the object timer section is pretty short, just scroll down until you see it)