Hi,
I cannot figure this out, it's driving me crazy <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">
I have 3 sprites : Player (green), EnemyShip (blue) and EnemyBullet (red).
Player can also shoots bullets (different sprite called PlayerWeapon) that can destroy EnemyShip.
My code is like this :
Event 1 :
Every 5 seconds / Trigger once -> Create object EnemyShip on Layer 0 (at random Y position)
Event 2 :
Every 1 second -> ------ EnemyShip spawn EnemyBullet
---------------------------------EnemyBullet set angle toward (Player.X, Player.Y)
Event 3 :
PlayerWeapon on collision with EnemyShip -> ---------- EnemyShip Destroy
----------------------------------------------------------------------------- PlayerWeapon Destroy
----------------------------------------------------------------------------- EnemyBullet Destroy
My problem is that ALL the EnemyBullets on the screen are destroyed once I hit any of the Enemy ships. I would like it so that ONLY the bullets (and the enemy ship that's hit) from the ship that spawned them, are destroyed.
So, if the third enemy in this picture (circled in yellow in the below picture), gets hit by my weapon, I would like it so that both that enemy and ONLY its bullets are destroyed. Not all the bullets on the screen.
Picture
https://drive.google.com/open?id=0B2knB ... zBxVzZuOHc
What am I doing wrong ?
If anyone can please help, that would be great! Thanks a lot!