Excellent, it worked... but I omitted a detail that I forgot to ask... How do I display a text when the bullet hits the enemy? That is, to show me the damage done to the enemy... I forgot how to do the event :C
Hi
cogote,
Assuming the application here is text appearing above each enemy that has been hit. I would:
1) Create a new text object in the game if you haven't done so already.
2) Put the enemies into an "Enemy" family. Assuming multiple enemy types, this will make it easier to pick them all later.
3) Use the "On collision with another object" event trigger when the bullet hits the enemy family.
4) Add the "Spawn another object" action for the enemy family to spawn an instance of the text object created earlier. Assuming you have different enemy types, you might wish to set this to a specific image point, so you can adjust the location of the text per enemy.
5) Finally, set the text to the damage done value. Depending on the application, this may be a static number, a variable in the object or a calculation. E.g. you could first subtract the value of the bullet damage away from the HP on the enemy and show this value.
Hope this helps
Neil