Interpolate Troubles
TouchTiltGames
Member Posts: 1,162
I'm trying to get an actor to move across the screen when you hit a button with interpolate instead of accelerate as it's much smoother. This is what I have:
when game.actor =1
interpolate: self.position.x to 200
duration 1
Reset rule
self.position.x = 200
self.position.x to self.x
duration 1
But this is just moving the actor back to where it started..Would anyone know how to keep the actor to where it moves to without it going backwards?
cheers,
shane
when game.actor =1
interpolate: self.position.x to 200
duration 1
Reset rule
self.position.x = 200
self.position.x to self.x
duration 1
But this is just moving the actor back to where it started..Would anyone know how to keep the actor to where it moves to without it going backwards?
cheers,
shane
Comments
If so, create a self integer attribute called InitialX
Put a change self.initialX to self.position.X before the interpolate behavior.
Then use this attribute in place of the "self.x" that you describe above.
No no..I want it to stay where it is, so at the 200 mark. Think of a platformer with a character moving across the screen. Right now the prob is that is IS going back to its original position hehe.