How can i interpolate my actor with the platform? please help!!

How can i interpolate my actor with platform?
like stick hero.. kindly please help :dizzy:

Comments

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

    You'll need to provide more details so that people know what you're trying to do, exactly.

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

  • rainhasntstoprainhasntstop Member Posts: 43
    edited April 2015

    @tatiang to be more specific. in the game "Stick Hero" when the actor has successfully moved to other platform.
    the Q. is how to interpolate the actor and the platform from right to left at the same time?
    how can i achieve the effects of moving right to left?

    kindly teach me pls.. thanks god bless

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

    Create a boolean game attribute called game.shiftLeft. In each actor that will move, create a real attribute called self.newX.

    When [condition for moving the actors]
         Change attribute game.shiftLeft to true

    When attribute game.shiftLeft is true
         Change attribute self.newX to self.Position.X-150.
         Interpolate self.Position.X to self.NewX [duration 1 second]

    When attribute self.Position.X=self.newX
         Change attribute game.shiftLeft to false

    You can set the "150" value to any number you want depending on how far the actors should move. The same goes for the duration.

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

Sign In or Register to comment.