ok I fixed the location of the c_move to where you said. However that did nothing but you made me look at the logic, and I noticed even where you put it, was not quite right....I know that is not your fault...my code looked like..well you know the word. Thanks for telling me about the code thing..I have it working for right now...the code is below....how it should be. thanks you so much for the help...was getting frustrated with it


I do have one question though. I have ran it as host, and fired up a client as well. I watched as the client did it's thing...from the host I watched. this means that the code is taking place on the server? Again I am learning from the locoweed tutorial, so i am also trying to understand what goes on as I adjust things. Am I correct in saying thiss code is taking place on the server? I can't seem to see where the server is sending it to the client, nor do i see where the client might be sending it to the server...I done went and got confused lol.



this is the CORRECT CODE for the function..move_player()...thanks again Michael

Code:
 
//-------------------------------------------------------------------------------------------------------------------------------
//move the player

function move_player
{


my.pan = random(360); // face a random direction


// We need the server to give the player his unique player_number...in the same order that the player logs in
number_of_players += 1; // the player has been created and is in the world...so we add one to the number of players
// on the server

send_var (number_of_players); //send the new number of players to all clients that are connected to the server

my.player_number = number_of_players; // This sets the player_number skill --> skill 1 --> see defines at top of script

send_skill (my.player_number, SEND_ALL); // send player_number skill to all clients



//this code helps solves issues with high latency between the server and the client.
sleep (.3);
ent_sendnow(my);
sleep (3); // solves high latency issues for right now.





//if not client...making sure that only the dedicated server reads throug this...not the client
if (connection != 2)
{


if(my.class == cleric)
{


my.speed = cleric_speed; // set players speed

my.health = cleric_max_hp; //set health

my.max_health = cleric_max_hp; // set max health

my.armor_class = cleric_ac; //set AC

//send health, max health, and armor class
send_skill(my.health, SEND_VEC + SEND_ALL);

my.weapon = cleric_waund; // set weaopon


}




if (my.class == wizzard)
{


my.speed = wizzard_speed; //set players speed

my.health = wizzard_max_hp; //set health

my.max_health = wizzard_max_hp; // set max health

my.armor_class = wizzard_ac; // set armor class


//send health, max health and armor class
send_skill (my.health, SEND _VEC + SEND_ALL);

my.weapon = wizzard_stick; //set weapons


}

//if (my.class == officer) // point here is that you can keep on going with them if you have more.


}




// animate if it is not the SERVER
if (connection != 1)
{

animate(); // animate the entity


}


while(1)
{


//initiall set animation to WALK, this can be changed s neccesary as it goes through the code.
my.animation_state = ANIMATION_STATE_WALK;


//if moving forward or backward at walking rate, set animation to walk
if ((abs(my.force_x) >0) && (abs(my.force_x) <=1))
{


my.animation_state = ANIMATION_STATE_WALK;


}



else
{


//if moving forward or backward at run, set animation to run
if (abs(my.force_x) >1)
{


my.animation_state = ANIMATION_STATE_RUN;


}


else
{


//if entity is not turning, then all that is left is standing :P
if (my.force_y == 0)
{


my.animation_state = ANIMATION _STATE_STAND;


}



}


}



//get new pan
my.pan = my.force_y * PLAYER_SPEED_TURN * time + my.pan;



//use time and speed_forwards_factor
force.x = my.force_x * my.speed * time;

force.y = 0;

force.z = 0;



//move_mode = glide +ignore_passable;

//ent_move (force.x, nullvector);



// move the player
c_move (me, force.x , nullvector, ignore_me | ignore _sprites | glide | ignore_passable | use_box);







//A6.3 feature..and after

if (my.floor_dist > (my.max_z - my.min_z) / 2)
{


my.z -= my.floor_dist - (my.max_z - my.min_z) / 2;


}


wait(1);


}



}




3DGS (6.4) Commercial