I need to note that when the health bar does not exist, the game does not crash when the enemy is eliminated. Example:
So, here’s everything I have done in terms of “health”:
EDIT: I’ve removed the “Hide Enemy2” action. Same problem
I want to add multiple enemy minions but when I copy-paste them, the health bar
exists only over one minion. Is there a way to add a health bar over every minion? Maybe tags?
(ANSWERED) How can I solve the fact that every time I start the game, the player’s walking down animation is playing? Every game I’ve made until now had the same problem
(ANSWERED) How can I give a path of patrolling for the enemies?
Try to add a “Trigger Once” condition underneath the first line. Otherwise I think it is constantly trying to delete an enemy which has already been deleted which might explain the crash.
I added “Trigger Once” as a condition to the Delete Enemy2 action. (I added two copies of enemy2 but that’s irrelevant.)
Result: Same thing. Once the health bar reaches zero, game crashes.
- It worked! Thank you!
- I will watch those videos, thanks.
Glad it worked! Just a guess you might need to delete the Health Bar when you delete the enemy because I think GD is still reading the command “Put Health around Enemy” after the enemy has been deleted.
Tried ‘Delete “Health”’ as well, and still crashes. It’s fine, as I thought of a less conventional way. Thank you for the help!
You can make an object group for all minions/enemies and use a for each event to create a new health bar object over them and link it to the minion.