a way to detect if attr. i changed?

the19thbearthe19thbear Member Posts: 102
edited November -1 in Working with GS (Mac)
Hi.
is there a way to check if an attribute has been changed?
-everytime attr. x is changed=display text

thanks alot!

Comments

  • RHRH Member Posts: 1,079
    Surely you have a rule that says when ABC happens change attribute. Can't you just add a display text behaviour in that rule? If for some reason not...

    If it only changes once, you can use a boolean. When attribute self.XX = true display text.

    Or if it's an integer I would set up another integer attribute and make a rule so that when attribute self.YY does not equal self.XX display text and change attribute self.YY to self.XX.
  • ozboybrianozboybrian PRO Posts: 2,102
    Yeah Create Actor. Sit actor anywhere on screen, make sure it's not moveable > Display text Game.score
    like Game.attribute.

    And then just do what you think you should do till the event happens and if the display text doesn't change then the attribute hasn't been set up properly.

    I learnt that from Tshirt Booth!

    -----------------------------------------------------
    Join the GameSalad Community and have your game noticed for free.
    http://www.facebook.com/ListYourTopiPhoneGame
    List your Top iPhone Game on FaceBook!
  • the19thbearthe19thbear Member Posts: 102
    thanks:)
Sign In or Register to comment.