A lot better camera control code, sure still needs tweaking but this time makes the player stay put (thought didn't test the horse one) and uses game_keys!
#set camera switch just to be sure
(ti_before_mission_start, 0, 0, [], [(assign,"$camera_mode",0),(assign,"$xmax",0),]),
#camera toggle
(0, 0, 0,
[(key_clicked, key_numpad_0)],
[
(try_begin),
(eq,"$camera_mode",0),
(mission_cam_set_mode,1),
(assign,"$camera_mode",1),
(get_player_agent_no, ":player_agent"),
(agent_get_position,pos20,":player_agent"),
#high enough
(position_move_z,pos20,700),
#far enough
(position_move_y,pos20,-100),
(mission_cam_set_position, pos20),
(else_try),
(eq,"$camera_mode",1),
(mission_cam_set_mode,0),
(assign,"$camera_mode",0),
(assign,"$xmax",0),
(end_try),
]),
#This will render player immobile playing anim_unused_human_anim_1 (edited to last 0,1 so when camera mode returns player won't notice there was an animation playing) repeatedly while $camera_mode is 1.
(0,0,0, [(eq,"$camera_mode",1)],
[
(get_player_agent_no, ":player_agent"),
(agent_get_horse, ":horse_agent", ":player_agent"),
(agent_set_animation, ":player_agent", anim_unused_human_anim_1),
(try_begin),
(ge, ":horse_agent", 0),
(agent_set_animation, ":horse_agent", anim_unused_horse_anim_1),
(try_end),
]),
#Move camera
#Z? Forward/Backward
(0, 0, 0,
[(game_key_is_down, gk_move_forward)],[
(position_move_y,pos20,7),
(mission_cam_animate_to_position,pos20),
]),
(0, 0, 0,
[(game_key_is_down, gk_move_backward)],[
(position_move_y,pos20,-7),
(mission_cam_animate_to_position,pos20),]),
#X? Sides
(0, 0, 0,
[(game_key_is_down, gk_move_left)],
[(position_move_x,pos20,-7),
(mission_cam_animate_to_position,pos20),]),
(0, 0, 0,
[(game_key_is_down, gk_move_right),
(position_move_x,pos20,7),
(mission_cam_animate_to_position,pos20),],[]),
#Rotate up and down
(0, 0, 0,
#Make sure other rotation keys don't work
[(key_is_down, key_mouse_scroll_up)],
[(position_rotate_x,pos20,-30),
(mission_cam_animate_to_position,pos20),
(val_sub, "$xmax", -30),]),
(0, 0, 0,
[(key_is_down, key_mouse_scroll_down)],
[(position_rotate_x,pos20,30),
(mission_cam_animate_to_position,pos20),
(val_add, "$xmax", 30),]),
#fix camera
(0, 0, 0,
[(game_key_clicked, gk_jump)],
[
(val_mul, "$xmax", -1),
(position_rotate_x,pos20,"$xmax"),
(mission_cam_animate_to_position,pos20),
]),
anim codes;
["unused_horse_anim_1", 0,
[0.1, "anim_horse", horse_move+2000, horse_move+2001, arf_cyclic]],
["unused_human_anim_1", 0,
[0.1, "anim_human", 90, 100, arf_cyclic]],