Wait Delay not working

Hello, I’m celexux!

I just need a bit of help. When I try to do the wait thing, it still constantly does it.
I’m making this space shooter game. I’m trying to make a fire rate for the player and a system where the enemy shoots every couple seconds. When I try to do it, it always comes out as a constant stream of lasers. Here is my event code/layout:

for the player: (ship1)
conditionals
When Space key pressed
If the timer “fireRate” is greater than 0.2 seconds
actions

Create object: bullet at position x: ship1.X() - 35; ship1.Y()
Create object: bullet at position x: ship1.X() + 35; ship1.Y()
Reset the timer “fireRate” of ship1

for the enemy: (enemy1)
conditionals
If the timer “enemyShooting” is greater than 2 seconds
actions

Create object: enemyBullet at position x: enemy1.X() - 30; enemy1.Y()
Create object: enemyBullet at position x: enemy1.X() + 30; enemy1.Y()
Reset the timer “enemyShooting” of enemy1

Thanks!

Make sure you’re either describing (or using) the right events.

e.g. in your listed events
“If the timer “fireRate” is greater than 0.2 seconds” is looking for a scene timer named fireRate
“Reset the timer “fireRate” of ship1” is looking for an object timer named fireRate of ship1.

These are different timers and will not affect each other.

@cel

There is no wait condition include in GDevelop, but timer work exactly same.

Or if you want a waiting conditionyou can try this extension!
If it work fine for you we will consider to add this wait condition in the approved extension directly in GDevelop.

Here how to add an extension in GDevelop

This extension come from Alaiz, if it works fine we will review it and add it in GDevelop.

1 Like

oh, i see now. thank you so much!