How c_scan work?
I want a camera to be set if player enter the yellow circle, but by the F1 guide I haven't undersand nothing, someone can create an example?
I've this code now, and only one camera work (and not good).
Code:
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
c_scan(my.x,my.pan,vector(120,180,my.cam_range),SCAN_ENTs);
if (result > 0) // got something?
{
set_camera(my.cam_number); // then set the proper camera position and angles
}
wait (1);
}
}
More from one AUM