Advertisement
Guest User

Untitled

a guest
May 12th, 2019
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 1.60 KB | None | 0 0
  1. // by ALIAS
  2. // _camera_shot= [position_1_name, position_2_name, target_name, duration, zoom_level1, zoom_level_2, attached, x_rel_coord, y_rel_coord, z_rel_coord,last_shot] execVM "camera_work.sqf";
  3. _campos1= _this select 0;
  4. _campos2= _this select 1;
  5. _targetcam = _this select 2;
  6. _camera_duration = _this select 3;
  7. _zoom_level1 = _this select 4;
  8. _zoom_level2 = _this select 5;
  9. _cam_attached = _this select 6;
  10. _x_coord = _this select 7;
  11. _y_coord = _this select 8;
  12. _z_coord = _this select 9;
  13. _last_shot = _this select 10;
  14.  
  15. // ----------------------
  16.  
  17. if (!loopdone) then
  18. {
  19.     if (_cam_attached) then {
  20.  
  21.         _camera = "camera" camCreate (getpos _campos1);
  22.                 showCinemaBorder true;
  23.         _camera attachTo [_campos2, [_x_coord,_y_coord,_z_coord]];     
  24.         _camera cameraEffect ["internal", "BACK"];
  25.         _camera camCommand "inertia on";
  26.         _camera camPrepareTarget _targetcam;
  27.         _camera camPrepareFOV _zoom_level1;
  28.         _camera camCommitPrepared _camera_duration;
  29.         sleep _camera_duration;
  30.  
  31.     } else
  32.         {
  33.         // initial/start position where camera is created
  34.         _camera = "camera" camCreate (getpos _campos1);
  35.                 showCinemaBorder true;
  36.         _camera cameraEffect ["internal", "BACK"];
  37.         _camera camCommand "inertia on";
  38.         _camera camPrepareTarget _targetcam;
  39.         _camera camPrepareFOV _zoom_level1;
  40.         _camera camCommitPrepared 0;
  41.  
  42.         // poz 2 - where camera is moving next - target2
  43.         _camera camPreparePos (getpos _campos2);
  44.         _camera camPrepareTarget _targetcam;
  45.         _camera camPrepareFOV _zoom_level2;
  46.         _camera camCommitPrepared _camera_duration;
  47.         sleep _camera_duration;
  48.         }; 
  49.     if (_last_shot) then {loopdone = true};
  50. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement