move To behaviour not working: Game Salad

531 views Asked by At

I am trying to move an object to 100px left in GameSalad. For that I am doing as below:

Behaviour   : Move To
Position X  : sprite.x = sprite.x - 100
Position Y  : sprite.y
Relative to : scene
Speed       : 200
Run to completion is not selected.

Problem: This is working fine in my mac, but the sprite is not moving in my iPod touch. I've used events touch pressed and released. Any of the mouse pointer behaviors are not used.

Note: I do not need to use Interpolate behaviour

Any help is appreciable...

1

There are 1 answers

0
cbt On

You shouldn't be using self.position.X and self.position.Y in your "move to:" fields.

Create a new Real in the actor and call it 'startingX'

First thing in your actor:

Change attribute self.startingX to self.position.X

And than, use startingX in your Move To behavior:

Move to: startingX - 100, self.position.Y