Essentially, you want to update the player's x,y,z according to key strokes and allow it to move with its own orientation rather than with world coordinates.
VECTOR speed;
action moveMe()
{
while(1)
{
my.pan += 5 * (key_a - key_d) * time_step;
speed.x = 5 * (key_w - key_s) * time_step;
c_move(my,speed,nullvector,IGNORE_PASSABLE | GLIDE);
wait(1);
}
}
Q&D movement code, just to show you the basics.
This code allows the player to move forward or backwards and turn, no gravity or strafing (gravity would be a negative z component in the absolute distance vector and strafing would use the y component of the speed vector).
The way it works is this: Key_w and key_s equal 1 or 0 if pressed or not, so speed.x is:
If key_w and not key_s:
5 * (1 - 0) * time_step = 5 * 1 * time_step = 5 * time_step
If key_s and not key_w:
5 * (0 - 1) * time_step = 5 * -1 * time_step = -5 * time_step
If neither:
5 * (0 - 0) * time_step = 5 * 0 * time_step = 0 * time_step = 0
If both:
5 * (1 - 1) * time_step = 5 * 0 * time_step = 0 * time_step = 0
We add in time_step so the speed stays the same, even if the frame rate changes.
The my.pan calculation works the same way.
We stick this vector in the relative distance parameter of c_move so it moves along its origin's orientation and not the world's orientation (otherwise we'd go forward, facing sideways). We also want c_move to ignore_passable and glide. c_move also gives us collision detection. In contrast, directly manipulating the objects .x, .y, and .z values does not give us collision.
Movement gets more complicated than this if you want to add more realism. Friction, speed changing on slopes, gravity, etc, but I just wanted to show the basic movement.
EDIT: The link in my sig goes to my programming blog, my most recent post has the entire action for my script. While it is unfinished and has a few problems yet, you can take a look at it and perhaps learn from it. It is Lite-C.