Need Help. When I destroy an actor all actors of the same name on the scene get destroyed.
alexm92
Member Posts: 16
I have an actor called enemy one. This enemy has 100 health and gets destroyed when my players gun shoots it until its health is 0. I have used this same actor from the same prototype and just dragged it onto the scene wherever i need it but when my players bullet destroy's one of the actors all other actors of the same name are destroyed. Why is this?
Comments
Are you using self attributes to count the hits or a game level attribute? Each enemy should be counting the hits it takes to a self attribute.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
I have an integer game attribute called health which is set to 100. When the bullet collides or overlaps with the enemy it reduces the health attribute by 25. I then have a rule set in Enemy 1's prototype saying if the game attribute called health is equal to zero then destroy actor.
Got it working
Cool! How did you sort it?? I sometimes get weird outcomes from what seems straight forward.