I want to handle the player's camera after enter the game,such as creating a camera to replace the player's camera and moving it along a path.
But there are some trouble. I check those script file in \maps.and i found the two files "_camsys.gsc" and "_createcam.gsc" which may be writed to control the camera.But it seemed that they just build the camera for "intro" or "end" of a level.
I also tried to write some code.but failed.The result is that when i hit the trigger.the player and the camera was freezed. But i could see the ent of the camera moving along the curve.
below is the code and screenshot
My question is that:
How does the camera work in game.and how to handle the camera in sp? Is there any article which described that?
Any advice will be appreciated, Thank you!

Code:
camera_control()
{
 getent("cutscene_begin","targetname") waittill ("trigger", player);
 //maps\_camsys::playback_scene( "smash" );
 player freezecontrols(true);
 
 level.smash_cam = spawn("script_camera", (64 ,1856 ,-512));
 /#
 valid_player = false;
 players = get_players();
 for( i = 0; i < players.size; i++ )
 {
  if( player == players[i] )
  {
   valid_player = true;
  }
 }
 assert( valid_player );
 #/
 player thread first_shot(player);
}
first_shot(player)
{
 points = []; times = [];
 i = 0;
 
 points[i] = (64 ,1856 ,-512); times[i] = 0;  i = i + 1;
 points[i] = (64 ,1536, -320); times[i] = 3;  i = i + 1;
 points[i] = (64 ,1224 ,-512); times[i] = 5;  i = i + 1;
 points[i] = (64 ,968 ,-320); times[i] = 7;  i = i + 1;
 
 curve1 = getcurve();
 
 for(i = 0; i < points.size; i ++)
 {
  addnodetocurve(curve1, points[i], times[i]);
 }
 
 buildcurve(curve1);
 /#
 drawcurve(curve1);
 #/
 setcurvenotifyent(curve1, player);
 
 //
 //  Assign cam to curve, give target point, turn on camera.
 //
 
 tar= getstruct("target","targetname");
 targetPoint = tar.origin;
 
 level.smash_cam cameralinktocurve(curve1);
 level.smash_cam setlookatorigin(targetPoint);
 player playerlinktocamera(level.smash_cam);
 
 startcurve(curve1);
 player waittill("curve_end", curve1); 
 freecurve(curve1);
}