How to get All enemies to shoot
#1
Posted 10 March 2012 - 02:25 AM
I am just trying to get my top down game to work correctly. I am sending enemies to the main to fire on him, which works fine for the first instance only, not any other (then when i kill him, he regenerates and he shoots again).
I am using the Alarm 0 to shoot (create enemy bullet @ enemy.x/enemy.y), then to set Alarm 1, which shoots and resets Alarm 0. Works great for continuous fire for 1, but not for any others. Please help. Code or D&D is good.
Thank you.
#2
Posted 10 March 2012 - 02:45 AM
#3
Posted 10 March 2012 - 02:47 AM
Hey All,
I am just trying to get my top down game to work correctly. I am sending enemies to the main to fire on him, which works fine for the first instance only, not any other (then when i kill him, he regenerates and he shoots again).
I am using the Alarm 0 to shoot (create enemy bullet @ enemy.x/enemy.y), then to set Alarm 1, which shoots and resets Alarm 0. Works great for continuous fire for 1, but not for any others. Please help. Code or D&D is good.
Thank you.
rather than create bullet at enemy,x/enemy.y, create it at to 0/0 and tick the relative box. This will create it at that enemy's place, rather than at enemy.x/enemy.y, which is the loction of the first enemy created.
EDIT: ninja'd
Edited by lukew23, 10 March 2012 - 02:47 AM.
#4
Posted 11 March 2012 - 01:53 AM
Both options worked! I was thinking a step or two too far. I forgot to think of the "enemy" object as itself! So, setting to 0,0, relative worked, and/or setting to x,y,not-relative worked.
Thank you both!
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











