how to get change attribute to happen only once
danshaw
Member Posts: 38
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!
any good ideas?
thanks all!
Best Answer
-
tatiang Posts: 11,949You'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 falseNew to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User