Movement and Animation

Hello, i am currently making a little personal project. Allredy made my character (Soon Animations) In 3Ds max. I just need some help on movement.
If anyone could make me a little code example on

  1. Mark a key (Like ‘w’) that will start my walk/run animation.
  2. Explain how to make my character move while ‘w’ is down.
    I don’t wan’t to add physics this time. Just my character able to walk on a flat plane.

I really hope i can get a quick response, since i’m going to show this of in my school tomorrow. And it would be nice to show to my teacher.

thanks in advice :slight_smile:

you can take a look into roaming ralph demo,

this the control function of a game im working on, a old school shooter, i hope i can post soon the beta release of it…

...
if (key["left"]!=0):
            ship.setX(self.getX-speed-self.speedUP)
        if (key["right"]!=0):
            ship.setX(self.getX+speed+self.speedUP)
        if (key["up"]!=0):
            ship.setZ(self.getZ+speed+self.speedUP)
        if (key["down"]!=0):
            ship.setZ(self.getZ-speed-self.speedUP)
        if (key["x"]!=0):   
            self.speedUP = speedMAX
        else:
            self.speedUP = 0

for the animation, just put your animation code in the if statement…
something like this -> character.loop(“walk”)
important your model have to be a actor…

Cool! I really appreciate this.

I would like to see your game when it is done then.