A question about multiple enemies.

JoshuaBenoitJoshuaBenoit Member Posts: 24
edited November -1 in Working with GS (Mac)
Anybody have a suggestion they could offer up on controlling the health for more than one actor at once. Something like a tower defense game where you may have 20+ enemies on screen. Would I need to have a separate attribute for EVERY actor? Is there some easy way to handle things such as these yet?

Any help is welcomed and appreciated. Thanks.

Comments

  • COBGamesCOBGames Member Posts: 114
    I think you make an actor attribute and then every time an actor is spawned that attribute is only for that actor. so if you have an actor called soldier and under that actor you add an attribute called health and set it to 100 and every time they get hit you have health - 10 and destroy actor when health = 0 then that should do it.

    if that makes sense.
  • JoshuaBenoitJoshuaBenoit Member Posts: 24
    It makes plenty of sense! Ill try it out and see how that holds up for me. Thanks!
Sign In or Register to comment.