question about game like snake and ladders

venenali89venenali89 Member Posts: 8
edited October 2012 in Working with GS (Mac)
hello, I am doing a game like sanke and ladders, I want the actor move to the position which is (self.X+100*random(),self.Y)
random() is the random number come out with the dice,100 is the width of the table. I use move to, but is just keep moving, neve stop. should I use gravity and ground? I mean let the actor jump. Is any one do this kind of games before? please help me, thanks a lot

Comments

  • carlblanchetcarlblanchet Member Posts: 755
    Instead of Move To, use Interpolate, and interpolate its self.position.
  • venenali89venenali89 Member Posts: 8
    thanks lot, I trid interpolate, it does work, but I have another problem. now I can make the actor move with the number of the dice, but I dont know how to change row, for example:

    1 2 3 4 5 6 7 8 9

    18 17 16 15 14 13 12 11 10

    19 20 21 22 23 24 25 26 27

    I want the actor to move from 1 to 27. I can make the actor move from 1-9 and when reach 9 change direction, but I dont know how to do with Y. If I still use interpolate,
    position Y will keep change like position X. I want Y change only the reach 9 and 18. I've tried a lot of ways but still cannot. Is there anyone can give me some advic, I really appreciate your help ,thanks a lot




Sign In or Register to comment.