moving actor by set amount

slevslev Member Posts: 99
edited November -1 in Working with GS (Mac)
hi

im moving my actor by a set amount by using self.possistion.X+60 which is working great as i want 1 click of the button to move him 1 square of the game. but when i do this he moves straight to the the next square id like him to move between the two squares ie. if he was at x possistion 1 and i pressed the button he would move to x possistion 60 via all the numbers in between. am i right in thinking its something to do with interpolate but im not sure what

cheers

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    yhou mean you want it to move less? just change the +60 to something lower
  • slevslev Member Posts: 99
    no i still want it to move 60 but i want it to move between the two points ie. from 1 to 2 to 3 to 4 ect until it gets to 60. like the same way the move atribute works but instead of how the move to atribute works ?
  • RHRH Member Posts: 1,079
    You can use the move to behaviour. Use self.positionX+60 and self.position.Y relative to scene or 60 and 0 relative to actor.

    and yes you can use the interpolate behaviour. If you set up another attribute say called nextposX. Then a rule, when touch is pressed change attribute nextposX to self.posX+60 and interpolate self.posX to nextposX.
  • slevslev Member Posts: 99
    thanks RH, do you know which one of those would use the least game memory ?
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    slev said:
    thanks RH, do you know which one of those would use the least game memory ?

    Interpolate allows you to uncheck moveable so I would use that.
Sign In or Register to comment.