Here is an example code, I use for my wrestler intro in my game.
Assign this action to your player.
var player_distance;//make a varible for how fast the player walks
action Auto_Walk//Give this action to your player
{
while(1) // use this to update your movement, without it, he will not move
{
player_distance.x = 2 * time; //Assign how fast he will walk, by replacing 2
player_distance.y = 0 * time; //Assign how fast he will walk, by replacing 0
player_distance.z = 0 * time;//Assign how fast he will walk, by replacing 0
ent_move(player_distance, nullvector);//ent_move is the instruction to make him move foward
MY.animationframe+= 8 * time;//how fast the walk animation will be
ent_animate(my,"walk",MY.animationframe,ANM_CYCLE);//this plays the walk anim
wait(1); //always us this wait instruction after while(), to avoid errors
}
}
Last edited by burning_devil; 06/06/08 01:15.