Interpolate position with change image attribute
Hello,
I want when my actor spawns to:
change image
interpolate y position to self.position.Y+30 for 0.75s
change image
interpolate y position to self.position.Y-30 for 0.75s
change to default image
accelerate
The actor supposed to change image, move with that image for 30pixels down,
then change image and with that second image move up 30 pixels and change back to default image and turn on accelerate behavior.
When I put this in GameSalad the results are strange.
What is the best way to do something like this?
I want when my actor spawns to:
change image
interpolate y position to self.position.Y+30 for 0.75s
change image
interpolate y position to self.position.Y-30 for 0.75s
change to default image
accelerate
The actor supposed to change image, move with that image for 30pixels down,
then change image and with that second image move up 30 pixels and change back to default image and turn on accelerate behavior.
When I put this in GameSalad the results are strange.
What is the best way to do something like this?
Comments
hope that helps
Kipper
so what you do is make a real attribute, call in interpolatepos
have a change attribute behavior changing interpolatepos to selfposition.y-30(or change the attribute to self position y+30 if thats what u want to do)
then in your interpolate, have self position y and interpolate to the interpolatepos attribute you made
change atribute self.pos to self.position.Y+30
change image
interpolate y position to self.pos for 0.75s
change atribute self.pos to self.position.Y-30
interpolate y position to self.pos for 0.75s
change to default image
accelerate
actor spawns with default image (not changing at all)
interpolate to y+30
start accelerate behavior