I want to make a cannon shoot bullets at every 2-3 seconds

help me
the second animation of cannon is it preparing to shoot

Hi, for shooting bullets you don’t need a “while” or “repeat” event. I would highly suggest to do one or two of the tutorials, for example Create a space shooter game or Create a simple Tank Shooter game to get the hang of how Gdevelop works.

1 Like

thx, I will try it out

1 Like

when I try to do a repeat or a while event, I get a black screen when I start the game

I haven’t encountered the black-screen problem myself but there are several threads about that in the forum, some of them with useful suggestions. The easiest thing you could try is to close Gdevelop and open it again. There could be also an issue how you are using the while and repeat event. If you post a screenshot of your events again, someone might be able to suggest a solution.

lucky you

the idle animation is 2 seconds long

Again, I would suggest to do a tutorial.

  1. You should delete the while-event.
  2. You should delete the repeat-event.

Both of them are not necessary for what you want to achieve.

  1. You don’t need “Always”. As far as I understood, this is a remnant of a previous Gdevelop version. Without further condition (for example the “At the beginning of the scene”) all events are always triggered.

  2. Your 4th block is a sub-event of block no. 3. At the moment animation “idle” and “shoot” have to be triggered at the same time (which is apparently not possible) before the bullet is fired.

If you are using the “fire bullets” behaviour this is really everything it takes to shoot bullets in whatever time interval you like:

plus the proper animations.

1 Like

jollibee when chickenjoy

1 Like