Change Attribute
![NatJ3](http://forums.gamesalad.com/applications/dashboard/design/images/defaulticon.png)
My main actor has a change attribute>game.Integer to 1 under that I have a rule>attribute=1. In that rule I have a move behavior setting it at a 90 degree angle when touch is pressed. so it will move up.
Okay so say I wanted to change that to a reverse where he would move down instead, I added another rule under the previous rule to say that when attribute=2 move down at a 270 degree angle.
well I set that then made another actor (power up), I went into that actor and put a rule>when overlaps or collides with main actor change attribute to 2
How can I get the main character to change back to attribute one after it touches this power up twice?
Okay so say I wanted to change that to a reverse where he would move down instead, I added another rule under the previous rule to say that when attribute=2 move down at a 270 degree angle.
well I set that then made another actor (power up), I went into that actor and put a rule>when overlaps or collides with main actor change attribute to 2
How can I get the main character to change back to attribute one after it touches this power up twice?
Comments
Keep in mind that the collision only happens on the initial contact. If the actors remain overlapped (because they don't bounce) you won't get another collision event until they separate and hit each other again.
I would add a local variable inside the main actor to count how many times the collision with the power-up occurs, then change the facing variable you mentioned back to 1 on the second collision.