User Tools

Site Tools


arma:missions:cutscene_tutorial

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

arma:missions:cutscene_tutorial [2009-09-16 17:38] (current)
Line 1: Line 1:
 +====== Cutscene Tutorial ======
  
 +You can and should use SQF for camera scripts also, like this:
 +<code cpp>
 +// camera basic initialization
 +_camera = "​camera"​ camCreate [0,0,0];
 +_camera cameraEffect ["​internal","​back"​];​
 +
 +[]; execVM "​PMC\PMC_ArmA_Default_Music.sqf";​
 +
 +// start
 +_camera camPrepareFOV 0.700;
 +_camera camCommitPrepared 0;
 +waitUntil { camCommitted _camera; };
 +sleep 3;
 +
 +titleText ["",​ "plain down", 3];;;
 +
 +titleText ["",​ "plain down", 2];
 +titleCut ["",​ "black out", 3];
 +3 fademusic 0;
 +sleep 4;
 +
 +// Destroy the camera
 +camDestroy _camera;
 +
 +// end the intro
 +endcut = true;
 +</​code>​
 +Note that the above is just a example, its not working script in itself.
 +
 +
 +====== Making SP cutscene ======
 +
 +Mission editor, choose Intro from the drop down.
 +
 +Place soldier and make it player.
 +
 +Place trigger, END#1 and put on condition line: endcut
 +
 +On the mission / cutscene dir, make a script file called: movie.sqf
 +
 +Place a gamelogic where you want to start your first camera run, and put on its init line this:
 +<code cpp>
 +this exec "​camera.sqs";​
 +</​code>​
 +
 +Preview mission and camera is activated on the gamelogic'​s position.
 +
 +Now with the default ArmA key configuration settings you can move the camera by using mouse, A S D W Q and Z keys. Camera rotates from the keypad numbers 4 left, 6 right, 8 tilt down, 2 tilt up etc. Most importantly every time you press FIRE button on your mouse, a clipboard.txt file in ArmA profiles directory root is updated with the camera settings for this particular viewpoint.
 +
 +Do all your camera viewpoint savings like this, when you are done, press either ESC -> Abort, or V to exit camera and then ESC -> Abort to abort the cutscene/​mission.
 +
 +Open the clipboard.txt file in your ArmA profiles dir, copy paste the contents into your movie.sqf file, perhaps it might look something likes this now:
 +<code cpp>
 +
 +// camera basic initialization
 +_camera = "​camera"​ camCreate [0,0,0];
 +_camera cameraEffect ["​internal","​back"​];​
 +
 +[] execVM "​PMC\PMC_ArmA_Default_Music.sqf";​
 +
 +// start
 +_camera camPrepareTarget [-89221.44,​12628.88,​-17693.45];​
 +_camera camPreparePos [8883.85,​4817.06,​2.84];​
 +_camera camPrepareFOV 0.700;
 +_camera camCommitPrepared 0;
 +waitUntil { camCommitted _camera; };
 +sleep 3;
 +
 +titleText ["​Special Forces are waiting on the shore for regular infantry to arrive.",​ "plain down", 3];
 +
 +sleep 2;
 +
 +// pan 1
 +_camera camPrepareTarget [-41745.95,​91052.38,​309.53];​
 +_camera camPreparePos [8883.85,​4817.06,​2.84];​
 +_camera camCommitPrepared 10;
 +waitUntil { camCommitted _camera; };
 +// pan 2
 +_camera camPrepareTarget [-41745.95,​91052.38,​309.75];​
 +_camera camPreparePos [8883.85,​4817.06,​2.84];​
 +_camera camPrepareFOV 0.120;
 +_camera camCommitPrepared 10;
 +waitUntil { camCommitted _camera; };
 +sleep 3;
 +
 +// pan other side start
 +_camera camPrepareTarget [2127.08,​-94323.03,​-5927.63];​
 +_camera camPreparePos [8662.31,​5286.23,​2.00];​
 +_camera camPrepareFOV 0.700;
 +_camera camCommitPrepared 0;
 +waitUntil { camCommitted _camera; };
 +sleep 3;
 +
 +// pan 1
 +_camera camPrepareTarget [73720.75,​-69923.09,​-10517.73];​
 +_camera camPreparePos [8662.31,​5286.23,​12.08];​
 +_camera camCommitPrepared 10;
 +waitUntil { camCommitted _camera; };
 +// pan 2
 +_camera camPrepareTarget [68009.46,​-75128.52,​-3350.77];​
 +_camera camPreparePos [8662.31,​5286.23,​12.08];​
 +_camera camPrepareFOV 0.233;
 +_camera camCommitPrepared 10;
 +waitUntil { camCommitted _camera; };
 +sleep 5;
 +
 +titleText ["",​ "plain down", 2];
 +titleCut ["",​ "black out", 3];
 +3 fademusic 0;
 +sleep 4;
 +
 +// Destroy the camera
 +camDestroy _camera;
 +
 +// end the intro
 +endcut = true;
 +</​code>​
 +Remember to save movie.sqf script file.
 +
 +Now go back to the mission editor and to you player character, on its init line put
 +<code cpp>
 +this = [] execVM "​movie.sqf";​
 +</​code>​
 +
 +Preview mission and your finished cutscene :)
arma/missions/cutscene_tutorial.txt ยท Last modified: 2009-09-16 17:38 (external edit)