Actor moving back and forth
![mkfoster](http://forums.gamesalad.com/applications/dashboard/design/images/defaulticon.png)
I'm trying to have an actor move back and forth (left, right) automatically acting as a "barrier" I'd like to have it only move a short distance then once destination is reached move back to it's original position. Any Ideas? Thanks.
![:) :)](http://forums.gamesalad.com/plugins/emojiextender/emoji/twitter/smile.png)
Comments
OK guys there is a very simple way to do this.
Find the X location of BOTH spots you want it to pace back and forth from
so say its X120 and x250
Do this place it on the x120 spot
and then do this
change velocity 0 speed 100
Rule
If attribute self.position.x is greater then 250
change velocity 270 speed -100
Rule
If attribute self.position.x is less then 100
change velocity 0 speed 100
This way you do not need any bumpers
hope that helps.
cheers