doubt with character suffering damage

maaprotemaaprote Member Posts: 3
edited October 2012 in Working with GS (Mac)
Hi!
I am newbie in gamesalad and have a question, I'm making a game and created a character and he has 5 life. My doubt is: when you have two or more of this character on the screen, and one of them suffers an injury, everyone else gets the same damage, and end up dying while everyone was dying to just one (which actually suffered damage). How do I fix this situation? : S
Thanks in advance!
:)

Comments

  • TouchTiltGamesTouchTiltGames Member Posts: 1,162
    Hey Maaprote, Not sure I entirely understand your issue, but it sounds like you want each character to have independent health? And youre using the same actor? You just need to either create a different attribute for each one so they're not affecting each other or unlock each one on the stage which will make them lose their Parent dependency.
  • maaprotemaaprote Member Posts: 3
    thanks for the reply!
    Yes, each with its independent life. I can not put an attribute for each character because I'm doing it appears via a "Spawn Actor", so it always appears with the same attributes. : S
  • maaprotemaaprote Member Posts: 3
    Up!
    :)
    Help
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited October 2012
    It all depends on how you are having your actors "suffer an injury." I assume you have a self.lives attribute set to 5 on your character actor (or are you using a game.lives attributes?) and that you have a rule that reduces that attribute when a certain condition is true. What is the condition?

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • maaprotemaaprote Member Posts: 3
    edited October 2012
    Yes, I have the following:
    self.live = 5 (integer)
    rule: when > collide with enemy01
             do > change Attribute> self.live to self.live-1

    thanks for listening
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    That should work. Take a look at the attached file and see if your setup is different.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.