[SOLVED]: enemy that shoots bullets

i’m trying to create an enemy that shoots bullets. i copied this event set up from the space shooter tutorial that lets an enemy shoot a bullet every 3 seconds, but cant seem to get it to work. when i run the game the enemy is gone and the bullets appear all lined up in a row at the top of the screen?

also a bit of a side note when i tuck the event into a sub event under my character “delete when killed” event and run the game the enemy is there but does not shoot a bullet except just before it dies and disappears? thanks in advance!

here is the specific events, enemy is bat, bullet is bone

hi
try adding trigger once to bat is in collision with bone
If it is in collision you do -1 to life each frame and you could be doing -1 a hundred times.

You seem to have what should be one event split into two. The event that has the condition of the timer being >3 does nothing except reset the timer. The following event is active all the time, instead of only once every 3 seconds. Just move the actions from that event into the one with the timer.

As it is a scene timer, all the enemies will fire together, which may not be what you want, so you could use object timers instead.

I think there will also be a problem with the enemy being killed by its own bullet the moment it is created (which would explain why you never see it). I’ve found that you always have to allow a bit of time for a bullet to fly away before doing a collision check, to avoid this problem, or create the bullet far enough away from the enemy that it isn’t immediately in collision with it.

xisco- thank you for the info!

MattLB- that got it, thank you! moved all into one event, i experimented before i read your post and making it a sub event helped too, but overall your solution is easiest and most effective!