action player_action()
{
c_setminmax(my);
my.min_z += 4;
ent_gravity = 1.6;
player = my; // I'm the player
set (my, INVISIBLE); // no need to see player's model in 1st person mode
while (1)
{
handle_player_movement();
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);
}
}
Gives a Error E1513: Crash in player_action.
Ugh.