quick Question on interpolate

So i want an actor to move to 5 different X locations.
not sure if my idea would work so here goes
so my idea is make a table with the 5 different X locations.
And have the actor interpolate through them 1-5

Main question is how can i have it go to one 1-5....and stop at 5? unless the player goes back.

im planning on triggering this with left and right on the keyboard.

thank you all =)

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    The way you do this is to have a trigger (e.g. key press) that runs two interpolate behaviors to change self.position.x and self.position.y to table values referenced with a row number. Each time the trigger occurs, you increment the row number by one (e.g. 1, 2, 3, 4, 5).

    Add a condition to the trigger so that game.rowNumber<5 and it won't continue after it reaches 5.
  • VolontaArtsVolontaArts Member Posts: 510
    @tatiang thanks for the help. i can picture everything you said until the end.

    ok so the conidtion would be a rule? say if attribute game.rowNumber<5...um yeah im lost lol.

    a condition is something like a rule right?
  • bjandthekatzbjandthekatz Orlando, FlMember Posts: 1,375
    A condition is basically a rule
    (Its the: If Attribute game.rowNumber < 5, or If Touch Pressed, Etc)
Sign In or Register to comment.