Hi there, hope someone can help with this.
I have a game with a number of instances of an enemy object on screen. I need it to be so that when the player kills one enemy, only that enemy is deleted. As it is, when the player kills an enemy, it deletes all the enemies on screen. How can I make it so that “delete enemy” refers only to the enemy the player just killed?
Depends on how you kill the enemy. If you use a bullet, then there will be a point where the bullet and an enemy collide (lets call their objects Bullet and Enemy).
You create an event for this, and give the event the condition If Bullet is in collision with Enemy.
For that same event, you then use the two actions Delete Bullet and Delete Enemy. The action will only apply to the objects that meet the event conditions.