[Solved] Add pre shot timer

I’m going crazy to solve this problem of mine …
how can i insert a timer before this event

I have a submachine gun and I would like it to start a timer of at least 1 second and play the pre-shot animation before firing.

So you want to play the random animations for 1 second before firing the submachine gun?

I’d look at giving the submachine gun a state variable, to keep track of there it’s at - something along the lines of this:

I put the State value check as a parent event and subevents for the rest so it’s cleaner and easier to read when you collapse the parent events.

You’ll also need to add the object variable State to mitragliator and set it’s default value to “Still”

thanks in advance for your interest, I tried to follow your advice but it doesn’t seem to work or I’m doing something wrong.
the event with randominrange animation (2,3) is the firing animation where the firing mode changes

Make sure you set the variable state or mitragliatore to “still” when you create the variables in the editor. i.e.


You’ve got a typo, it’s “state”, not “stato”. :


These conditions are not needed - the only time the animations will be 2 or 3 is if state is “shot” :


thanks again mr men you have solved this too