Flip actor?
GamingtilDawn
Member Posts: 104
Im not sure what to call it, but i will try and explain.
I would like to flip or switch an actor to the other side of the screen.
Example:
Lets say my screen looks like this and the actor is on the white side of the screen, in one spot. How can I get the actor to flip to the opposite side if I press a button. (note: the position of the actor will change so I dont want it to be constraint)
Comments
Change: Self.X to Display Size.Width-Self.X
Ok I thought about that, but the only problem is I couldn't figure out how to make that communicate between a button and the player (self).
I want a button to change the position. I made a boolean attribute for the game, but I dont think thats right.
Make a game attribute (boolean), let's call it AAA.
Rule for the button, when pressed . . . Change AAA to 1
Rule for the player, when AAA = 1 . . . Change: Self.X to Display Size.Width-Self.X
...
...
I had all of that going through my mind. The part I was missing was the game attribute being called in the button. I always forget about those. Thank you!
If you want to keep it flipping back and forth:
Make a game attribute (Integer), let's call it AAA.
Rule for the button, when pressed . . . Change AAA to 1-AAA
Rule for the player, when AAA = 1 . . . Change: Self.X to Display Size.Width-Self.X
.....................................</font color>Otherwise . . . Change: Self.X to Display Size.Width-Self.X