Well, this function doesn't work. At all. What I was trying accomplish was a movement code that allowed me to switch between movement modes (climbing/jumping/sprint). What happened was a crippled script. Here's the player script.
Click to reveal..
action kelsier_basic()

{
player = my; // I'm the player
set (my, INVISIBLE); // no need to see player's model in 1st person mode
while (1)
{
player_scanning();
vec_set (camera.x, player.x); // use player's x and y for the camera as well
camera.z += 30; // place the camera 30 quants above the player on the z axis (approximate eye level)
camera.pan -= 5 * mouse_force.x; // rotate the camera around by moving the mouse
camera.tilt += 5 * mouse_force.y; // on its x and y axis
player.pan = camera.pan; // the camera and the player have the same pan angle
wait(1);
if (mountpole == 1)
{
c_move (my,vector(0 * (key_w - key_s) * time_step, 0 * (key_a - key_d) * time_step, 25 * (key_w - key_s) * time_step), nullvector, GLIDE);
}
else
{
c_move (my,vector(40 * (key_w - key_s) * time_step, 20 * (key_a - key_d) * time_step, -10 * time_step), nullvector, GLIDE);
wait(1);
}
if (key_q == 1 && pewter > 0 && mountpole == 0)
{
pewter -= 0.1;
c_move (my, vector(100 * (key_w && key_q && pewter > 0 - key_s && key_q && pewter > 0) * time_step, 45 * (key_a && key_q && pewter > 0 - key_d && key_q && pewter > 0) * time_step, -10 * time_step), nullvector, GLIDE);
wait(1);
}
else
{
c_move (my,vector(40 * (key_w - key_s) * time_step, 20 * (key_a - key_d) * time_step, -10 * time_step), nullvector, GLIDE);
wait(1);
}
if (key_shift == 1 && jumptime >= 0 && mountpole == 0)
{
drain_jumptime();
c_move (my,vector(40 * (key_w - key_s) * time_step, 20 * (key_a - key_d) * time_step, 125 * (key_shift && jumptime >= 0) * time_step), nullvector, GLIDE);
wait(1);
}
if (key_shift == 1 && key_q == 1 && jumptime >=0 && mountpole == 0)
{
drain_jumptime();
pewter -= 0.1;
c_move (my,vector(40 * (key_w - key_s) * time_step, 20 * (key_a - key_d) * time_step, 200 * (key_shift && jumptime >= 0) * time_step), nullvector, GLIDE);
wait(1);
}
if(key_shift == 0 && jumptime <= 0 && mountpole == 0)
{
restore_jumptime();
}
}
}


And these are the scripts related to the pole.
Click to reveal..
action pole_climb()
{
my.emask |= ENABLE_SCAN; // sensible for scans
my.event = pole_scanned;
}

Click to reveal..
function pole_scanned()
{
while(1)
{
if(event_type == EVENT_SCAN)
{
poleclimbtxt.flags = VISIBLE|OUTLINE;
if(key_space == 1)
{
poleclimbtxt.flags = OUTLINE;
mountpolectrl = 1;
set_mountpole();
while(!mountpole == 1)wait(1);
{
player.x = my.x+20;
player.y = my.y;
player.z = my.z;
poleclimbtxt.flags = OUTLINE;
if(key_shift == 1)
{
mountpolectrl = 0;
reset_mountpole();
wait(1);
}
}
}
else
{
wait(1);
}
}
if(!event_type == EVENT_SCAN)
wait(1);
{
poleclimbtxt.flags = OUTLINE;
cant_move();
wait(1);
}
}
}

Click to reveal..
function set_mountpole()
{
while(mountpolectrl == 1)
{
mountpole = 1;
wait(1);
}
}
function reset_mountpole()
{
while(mountpolectrl == 0)
{
mountpole = 1;
wait(1);
}
}