Moving actors just does not work
PBEmpire
Member Posts: 676
Not sure if my coding is wrong or something but here is my rule
When attribute game.pause=1,
Interpolate self.position.x to self.position.x-1024
I am doing this because i am doing a sliding menu, and the menu has all the stats in it, like coins collected etc, and i am using custom fonts, which is why i have a lot of '0' actors. When the pause button is pressed, i want the menu to slide out, along with the numbers. So i used the rule above to reduce the hassle of editing each individual actor and type the the desired position. But what i am seeing is that these numbers just fly across the scene..
When attribute game.pause=1,
Interpolate self.position.x to self.position.x-1024
I am doing this because i am doing a sliding menu, and the menu has all the stats in it, like coins collected etc, and i am using custom fonts, which is why i have a lot of '0' actors. When the pause button is pressed, i want the menu to slide out, along with the numbers. So i used the rule above to reduce the hassle of editing each individual actor and type the the desired position. But what i am seeing is that these numbers just fly across the scene..
Comments
Change Attribute self.startX to self.position.X
Interpolate self.position.X to self.startX-1024
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Is there anything wrong with my code?
When game.menu press = 1,
Interpolate self.position.x to self.Start X - 1024
When game.menu press = 0,
Interpolate self.position.x to self.Start X + 1024
Some really weird things happen. The errors are just not consistent.. Sometimes the first round works. Sometimes the numbers just dont appear while some other time only 1 or 2 of the 4 number actors appear..
in my experience interpolate is bulletproof as long as you don't have two changing the same value firing at once. your rule is pretty simple and i've never had problems with it.
delete the rule and create a simple one first:
when game.Pause = 1 interpolate self.positionX to 512 otherwise interpolate self.positionX to 0
if that works, then try throwing in a variable
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left