moving graphic with interpolate move
Hi, my first post here, I'm trying to learn gamesalad by using templates others have made, then altering then, I find this the easiest way to learn a new program.
In the template a graphic object comes from the bottom of the screen and moves up, I want to reverse that, come from the top down.
Its set by the author as
interpolate
interpolate attribute: self.Position.Y to 150
duration1 function linear
rule
when all conditions are valid, actor recieves even touch is pressed
attribute, self.Position.Y = 150
change attribute
change attribute self.Position to -150
What should I change to make it come from the top of the screen down, rather than from the bottom of the screen up? I am confused as to how gamesalad calls the positions numbers, the answer to the number above will solve that.
Thank you for any help.
In the template a graphic object comes from the bottom of the screen and moves up, I want to reverse that, come from the top down.
Its set by the author as
interpolate
interpolate attribute: self.Position.Y to 150
duration1 function linear
rule
when all conditions are valid, actor recieves even touch is pressed
attribute, self.Position.Y = 150
change attribute
change attribute self.Position to -150
What should I change to make it come from the top of the screen down, rather than from the bottom of the screen up? I am confused as to how gamesalad calls the positions numbers, the answer to the number above will solve that.
Thank you for any help.
Comments
Hope that makes sense...
@firestorm
Hi, as @Barking_Apps says, use the same Rules but adjust the coordinates as you want.
For info, in GameSalad Creator, the coordinates are based on the bottom left of any size screen as being zero X and zero Y.
So for your example, I'll assume you're using iPhone portrait (if it's landscape or iPad, then adjust again accordingly):
The top of the screen in this case is 480 y. let's assume, again for an example, that your graphic object is 50 pixels high which means you'll place its y coordinate 505.
So now your Rules amended will look like this:
interpolate
interpolate attribute: self.Position.Y to 430
duration1 function linear
rule
when all conditions are valid, actor recieves even touch is pressed
attribute, self.Position.Y = 430
change attribute
change attribute self.Position to 505---- (or interpolate might be better?)
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps