how to get change attribute to happen only once

so im trying to figure out how to get attribute x to change to attribute y, but only once..the first time touch is pressed...then i want attribute x to become a constant and no longer change with y. y is an integer and can start off at any number...
any good ideas?

thanks all!

Best Answer

  • tatiangtatiang Posts: 11,949
    Accepted Answer
    You'll need a boolean attribute that determines whether or not x can change. Set it to true (checked).

    When [all conditions] touch is pressed AND self.canChange
    .....Change Attribute self.x to self.y
    .....Change Attribute self.canChange to false

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

Sign In or Register to comment.