How to make a character walk back and forth?

HeyFriesHeyFries Member Posts: 78
edited November -1 in Working with GS (Mac)
How to make a character, like an enemy, walk back and forth within a constrained distance, without controllers?
Thanks

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,577
    Hi, there's a wiki entry called How do make an actor pace back and forth? you'll find it here:

    http://gamesalad.com/wiki/how_tos:gsc_pacing

    :-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • HeyFriesHeyFries Member Posts: 78
    Thanks, I am already able to make my character pace back and forth, but I also want to change the animated image to match the character's direction. How do I do that?

    Thanks
  • butterbeanbutterbean Member, PRO Posts: 4,315
    To do that, create 2 rules:

    When self.motionlinearvelocityX > 0
    Animate: Facing right images

    When self.motionlinearvelocityX < 0
    Animate: Facing left images
  • HeyFriesHeyFries Member Posts: 78
    Thanks a lot! Now I got my character's animation matching the direction too!

    I created a player that jumps when I touch the screen, and it jumps properly when the gravity Y is set to 900, but the character that is pacing back and forth doesn't walk when the gravity Y is set to 900, so I changed the gravity Y to 0. Now the character pace back and forth but the player jumps in slow motion when gravity Y is 0. What should I do to make both -player and other character- to work properly?

    Thanks
Sign In or Register to comment.