How do i Move my actor to a specific Position and back again?
Bob132546
Member Posts: 18
in Help Wanted
I want to move my actor to a specific position(coordinates) when i press any where on the screen. I also want to move it back to its original position when i press anywhere on screen anyone help?
This is what i want it to do, move my character from coordinates X 139 and Y 131 to X 179 Y 131 whenever i press the screen
Comments
Make an integer attribute within the actor, let's call it A - and place your actor on the screen at X-139, Y-131.
Rule: When mouse button is down:
• Change Attribute: self.A to 1-self.A
• Move To: X = 139+( self.toggle *40) and Y = 131.
ok so i have done what you've said but it still doesn't move, would it be possible to send a screenshot of what you have done to see where i went wrong?
What I have done ? What I did was make the post above, I could take a screenshot of that if you want !
Why don't you take a screenshot of your rules and post it here ?
this is what i have done. Im kinda new to game salad so i dont really know what im doing
http://gyazo.com/22cc62355882919ef04f6ca25c6628f8
Whoops, my mistake entirely I type 'toggle' in instead of 'A' ('A' is toggling between two values) . . . . so it should have read . . .
. . . . . . . . . .
Make an integer attribute within the actor.
Let's call this attribute A</font color>.
Place your actor on the screen at X-139, Y-131.
. . . . . . . . . .
Rule: When mouse button is down:
• Change Attribute: self.A</font color> to 1-self.A</font color>
• Move To: X = 139+(self.A</font color>*40) and Y = 131.
. . . . . . . . . .
(don't forget to select attributes from the pull down menu, rather than typing them in by hand)
ok i must have done something wrong because i changed it to 139+(A*40) but when i click preview and click on the screen my player just does not move?
sorry for the hassle
Did you select A from the pull down menu, or did you just type it in by hand ?
Typed it in by hand, but when i go on the pull down menu and go on Player - A it prints out self.A
Oh my bad, ive done it Thanks for the help man really helpfull
Sorry, my instructions were a bit rubbish today ! lol, need coffee . . . . .