side to side interpolate help!
![threepeasoup](http://forums.gamesalad.com/applications/dashboard/design/images/defaulticon.png)
Hello Gamesalad community!
I have searched and filtered through the forums looking for an answer to my problem but to no avail! So I will ask it myself.![:D :D](http://forums.gamesalad.com/plugins/emojiextender/emoji/twitter/grin.png)
I am trying to use interpolate to move an unmovable object side to side from its "current" position on screen.
If anyone can point me to the right direction I would greatly appreciate it!
Best,
Threepeasoup
I have searched and filtered through the forums looking for an answer to my problem but to no avail! So I will ask it myself.
![:D :D](http://forums.gamesalad.com/plugins/emojiextender/emoji/twitter/grin.png)
I am trying to use interpolate to move an unmovable object side to side from its "current" position on screen.
If anyone can point me to the right direction I would greatly appreciate it!
Best,
Threepeasoup
Comments
Have the first rule when attribute self position x=200 (replace 200 with whatever the starting position is)
interpolate self position x to 400(or wherver you want it to slide to and stop)
Then another rule when attribute self position x=400 (again replacing that with whatever you changed 400 to in the above rule)
interpolate self position x to 200(or whatever the starting position is)
cheers
this way it will go just a hair passed each value. I then make sure it starts either <100 or >300 so it triggers to start. You can control the speed with the duration in interpolate.
hope that helps.
Saw Johns post which I think says much the same as mine ... I think I saw someone else recommend the <> rather than equals as the actor could move to x=400.001 and then the rule wouldn't work.
It works great!