thank you for replying. ok first off I had a bit of a noob moment with this. My model was assigned the player_move code which is:
action player_move
{
player = me;
wait(1); //place a wait(1) here so the engine doesn't execute anything past this point yet
//so it can properly make sure that the pointer is set and I don't get pointer errors
camera.genius = player; //set camera so we can't look into our model
while(me != NULL) //while our player pointer is not = to the predefined NULL value the loop
//will continue
{
move_vec[0]=(key_w - key_s)*10*time; //moving forward and backward (was 3)
move_vec[1]=(key_a - key_d)*10*time; //strafing (was 2)
player.pan +=(key_q - key_e)*4*time;//turning left and right
ent_move(move_vec,NULLVECTOR);
if(move_vec[0] == 0 && move_vec[1] == 0)
{
idle_percent=(idle_percent+5*time)%100;
ent_animate(me,"stand",idle_percent,ANM_CYCLE);
}
else
{
//movement goes here
walk_percent=(walk_percent+ sign(move_vec[0])*5*time)%100;
ent_animate(player,"walk",walk_percent,ANM_CYCLE);
}
//camera updates
vec_set(Camera.x,player.x);
camera.z +=27;
camera.pan=player.pan;
temptilt +=(key_pgup - key_pgdn)*4*time;
if(key_home) {temptilt=0;}
if (temptilt >75)
{
temptilt = 75;
}
else
{
if (temptilt < -75)
{
temptilt = -75;
}
}
camera.tilt = 0 + temptilt;
wait(1); //place the needed pause at the end of a loop cycle so that the engine can handle
// other operations, else we will get an infinate loop and lock up our game
}
}
Now this code does work I have no issues moving around with the keyboard
So my mouse code wasn’t even being called. So I tried changing the model action to both my original mouse code and to yours (thinking I couldn’t move around but should be able to look about) all it does with either is the model loads half way though the floor and nothing works (chances are it is all me missing something) so I am guessing now what I need to do is add the mouse code somewhere to my player_move code and I will be good to go.....
thanks
Last edited by tonyvans; 06/12/08 20:47.