Interpolate out of screen then change 'x' position not working.

winged_boxwinged_box Member Posts: 52
edited March 2015 in Working with GS (Mac)

I want my platform interpolate it's 'x' position to -335 and then when it is lesser/equal to -333 it will change it's 'x' position to random(1100,1110) but it's not working.

It will just go out of the screen and that's it.

image

Please help.

Comments

  • MattSodenMattSoden Member Posts: 30

    I have a feeling that when you interpolate an attribute, other rules don't trigger correctly as the interpolate is effectively 'unstopable'.

    Try changing your rule to

    self.Position.X = -335

    (as that is where it will definitely end up) and see what happens.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Try putting the When self.Position.X ≤ -333 rule inside of an every 0 seconds Timer.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • winged_boxwinged_box Member Posts: 52
    edited March 2015

    I use the interpolate because when I used 'Move' behaviour my character always push the platform backwards when it touches the side of it.

    I found a way to stopped it by removing its constraint 'x' position so I'm settled with the 'Move' behaviour. I also changed my platform friction to 0 so my character will not get dragged out of the screen when it stand on the platform.

    However, when my character encounter small bumps on the platform it will start to move slowly to the right or left and now I'm trying to fix that.

Sign In or Register to comment.