the player move
(there is also some problem with the animation that i will try to fix later)

But there is a problem, the camera doesn't change.
the code in now this:
Code:
view adv_camera{}

////////////////////////////////////////////////////////////////////////////////////////////

define cam_number skill1; // use different numbers for every model
define cam_range skill2; // sets the detection area (sensitivity)

////////////////////////////////////////////////////////////////////////////////////////////
function main()
{
level_load ("office.wmb");
}

function set_camera(number);


////////////////////////////////////////////////////////////////////////////////////////////
action pg {
player = my;
while(my){

if (key_cul == on) // press and hold the "Up" arrow key to move
{
my.pan -= 3*time_step;
ent_animate(my, "walk", 1, anm_cycle); // animate the model (use "walk")

}
if (key_cur == on) // press and hold the "Down" arrow key
{
my.pan += 3*time_step;
ent_animate(my, "walk", 1, anm_cycle); // animate the model (use "walk")

}
if (key_cuu == on) // press and hold the "Down" arrow key
{
c_move (my, vector(1, 0, 0), nullvector, glide);
ent_animate(my, "walk", 9*time_step, anm_cycle); // animate the model (use "walk")
}
if (key_cud == on) // press and hold the "Down" arrow key
{
c_move (my, vector(-1, 0, 0), nullvector, glide);
ent_animate(my, "walk", 1*time, anm_cycle); // animate the model (use "walk")
}
wait(1);
}
}

starter init_cameras()
{
sleep (0.5); // wait until the level is loaded
camera.visible = off; // disable the default "camera" view
adv_camera.pos_x = 0;
adv_camera.pos_y = 0;
adv_camera.size_x = screen_size.x;
adv_camera.size_y = screen_size.y;
adv_camera.visible = on; // show the new camera
adv_camera.x = 820; // set the initial camera position and angles
adv_camera.y = -1150;
adv_camera.z = 620;
adv_camera.pan = 120;
adv_camera.tilt = -25;
adv_camera.roll = 0;
}

// uses cam_number, cam_range
action detect_player
{
my.invisible = on; // hide the model
my.passable = on;
while (player == null) {wait (1);} // wait until the player is loaded
if (my.cam_number == 0) {beep; beep; beep; exit;}
if (my.cam_range == 0) {beep; beep; beep; exit;}
while (1)
{
temp.x = 360; // horizontal scanning angle
temp.y = 180; // vertical scanning angle
temp.z = my.cam_range; // scanning range
scan_entity (my.x, temp);
if (result > 0) // got something?
{
set_camera(my.cam_number); // then set the proper camera position and angles
}
wait (1);
}
}

function set_camera(number)
{
if (number == 1)
{
adv_camera.x = -40;
adv_camera.y = 340;
adv_camera.z = 1260;
adv_camera.pan = 270;
adv_camera.tilt = -72;
adv_camera.roll = 0;
}
if (number == 2)
{
adv_camera.x = -1915;
adv_camera.y = -1550;
adv_camera.z = 680;
adv_camera.pan = 40;
adv_camera.tilt = -35;
adv_camera.roll = 0;
}
if (number == 3)
{
adv_camera.x = 1790;
adv_camera.y = -1430;
adv_camera.z = 730;
adv_camera.pan = 150;
adv_camera.tilt = -38;
adv_camera.roll = 0;
}
if (number == 4)
{
adv_camera.x = -1880;
adv_camera.y = 1390;
adv_camera.z = 905;
adv_camera.pan = 325;
adv_camera.tilt = -38;
adv_camera.roll = 0;
}
if (number == 5)
{
adv_camera.x = 1900;
adv_camera.y = 1460;
adv_camera.z = 800;
adv_camera.pan = 220;
adv_camera.tilt = -35;
adv_camera.roll = 0;
}
}




This is all from aum 42, the thing tha i haven't undersant is how the action detect the player, cause this doesn't work


~Vision Divine~