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.
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.
Comments
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.
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
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.