Need Help. When I destroy an actor all actors of the same name on the scene get destroyed.

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

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,914
    edited September 2014

    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.

  • alexm92alexm92 Member Posts: 16

    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.

  • alexm92alexm92 Member Posts: 16

    Got it working :smile:

  • MoogusMoogus Member, PRO Posts: 77

    Cool! How did you sort it?? I sometimes get weird outcomes from what seems straight forward.

Sign In or Register to comment.