player_move action () ....
if (mod == 1) move_vec [2] = (-c_trace (my.x vector (temp.x, temp.y, temp.z-1000), IGNORE_ME IGNORE_SPRITES + + + USE_BOX IGNORE_MODELS)) * 5 * time_step ;
move_vec is the z player
i use mod ==1 because when the player is on the elevator i dont use the c trace to process the z player , i change the z player directly
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / /
elevator action ()
{
var signal;
var senal_l = 1;
var alt = 0;
while (1) {
if (vec_dist (player.x, my.x) <= 2000) {
c_scan (my.x, my.pan vector (360,0,54), IGNORE_ME);
if (you == player)
sign = 1;}
if (sign == 1) {
mod = 2;
if (senal_l == 1) {my.z ​​= my.z ​​+1 * time_step; alt = alt +1; move_vec [2] = alt;}
if (alt> = 10)
senal_l = 0;
if (senal_l == 0) {my.z ​​= my.z​​-1 * time_step; alt = alt-1; move_vec [2] = alt;}
if (alt <= -10)
senal_l = 1;
}
wait (1);
}
}