Hoyan 0 Posted March 10, 2007 Hi guys, does anyone know how to create cutscenes or point me to a tutorial please? I have tried taking and editing a script from one of the missions in the campaign which was a cutscene script all I get now is sky, I have tried messing about with the camera angle but still end up with sky. It used to be so much easier in ofp. Thanks in advance. Share this post Link to post Share on other sites
MulleDK13 0 Posted March 10, 2007 I assume you know some basic scripting for OFP/ArmA. Make a script in your mission folder. Call it init.sqs Enter this <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">player exec "camera.sqs" Start the mission and place the camera where you want it. W,S,A,D,Q,Z,L (crosshair),SHIFT and Numpad 4,8,6,2,+,- (and V turns of the camera) to control it. Press LEFT MOUSE BUTTON to copy the position of this camera into the clipboard. Go to your init.sqs and press Ctrl+V to insert that code. Should look similar to this <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">;=== 23:58:35 _camera camPrepareTarget [65260.85,74635.02,-29443.72] _camera camPreparePos [2535.93,2543.26,11.49] _camera camPrepareFOV 0.700 _camera camCommitPrepared 0 @camCommitted _camera Remove the <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">player exec "camera.sqs" and enter these lines at the top of the script <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_camera = "camera" camcreate [0,0,0] _camera cameraeffect ["internal", "back"] Save and preview the mission! There you go! Share this post Link to post Share on other sites
Törni 0 Posted March 11, 2007 OK. Lets take this a bit further. How about cutting from one camera to another as if the sequence would have shot with multiple cameras at different angles? Share this post Link to post Share on other sites
MulleDK13 0 Posted March 11, 2007 This is controlled by the line: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_camera camCommitPrepared 0 The number at the end defines how long it should take for the camera to reach it's new position. 0 means instantly. So this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">;=== 23:58:35 _camera camPrepareTarget [65260.85,74635.02,-29443.72] _camera camPreparePos [2535.93,2543.26,11.49] _camera camPrepareFOV 0.700 _camera camCommitPrepared 7 @camCommitted _camera Would make the camera take 7 seconds to get to the new position. Share this post Link to post Share on other sites
Hoyan 0 Posted March 11, 2007 That sounds nice and straight forward, thanks. I'll have a play with this and see what I can do. Share this post Link to post Share on other sites
Törni 0 Posted March 11, 2007 Ok, but what about the duration of each shot? I do not want camera panning or trucking just an instant cut from camera position to another. Like: - 4 seconds close up on a soldier's face - 5 seconds over the shoulder shot as troops get in a truck - 9 seconds of wide shot as trucks leave Ok. Figured it out myself -> just commit same camera values second time with a proper duration. When I want to cut, I just commit camera to a new location instantly. Too simple... Share this post Link to post Share on other sites
Mr Sarkey 0 Posted March 11, 2007 Do stop the panning motion leave <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_camera camCommitPrepared at <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_camera camCommitPrepared 0 The number at the end represents an amount of seconds. To have time delays, I will use this sample script.. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _camera = "camera" camcreate [0,0,0] _camera cameraeffect ["internal", "back"] ;=== 23:58:35 _camera camPrepareTarget [65260.85,74635.02,-29443.72] _camera camPreparePos [2535.93,2543.26,11.49] _camera camPrepareFOV 0.700 _camera camCommitPrepared 7 @camCommitted _camera ~5 ;=== 23:58:35 _camera camPrepareTarget [65260.85,74635.02,-29443.72] _camera camPreparePos [2535.93,2543.26,11.49] _camera camPrepareFOV 0.700 _camera camCommitPrepared 7 @camCommitted _camera ~5 The part '~5' is the time delay, so the shot will stay in the posistion for 5 seonds Share this post Link to post Share on other sites
MulleDK13 0 Posted March 11, 2007 (I hate when you reply simoultaniosly ) If you want it to wait after commiting one camera, put in a sleep function. The number represents the number of seconds to wait before executing next line in script <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">some code ~1 some more code Example: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">;=== 23:58:35 _camera camPrepareTarget [65260.85,74635.02,-29443.72] _camera camPreparePos [2535.93,2543.26,11.49] _camera camPrepareFOV 0.700 _camera camCommitPrepared 0 @camCommitted _camera ~3 _camera camPrepareTarget [65260.85,74635.02,-29443.72] _camera camPreparePos [0,0,0] _camera camPrepareFOV 0.700 _camera camCommitPrepared 7 @camCommitted _camera The above code makes the camera go to the initiate position, then wait 3 seconds and then again go to position 0,0,0 in 7 seconds. The line: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">@camCommitted _camera Is used to wait for the camera to move... The @ means "Wait for", and is used for lot of different scripts. The line stops execution of the script until the camera has moved into the new position. After this the script will be resumed. Other examples of @ use: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">guy1 doMove getMarkerPos "marker1" @unitReady guy1 titleText ["Guy 1 reached marker 1"] The code above, will make a unit called guy1 move to a marker called marker1. It will then stop executing the script until guy1 is ready (He won't be ready before he have completed his objective, which was to move to marker1). When he is ready, execution of script will continue. Btw, if you want to destroy the camera (to make the player be able to control again) execute this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_camera = "camera" camcreate [0,0,0] _camera cameraeffect ["internal", "back"] Hope some of this were understandable! Share this post Link to post Share on other sites
Hoyan 0 Posted March 11, 2007 This is all great stuff, I wasted 2 hours last night getting nowhere, five mins after seeing your relpy's and I am getting on with it. Thx. Share this post Link to post Share on other sites
Hoyan 0 Posted March 11, 2007 Is there anything you can do to stop the camera from travelling through buildings? Other than plotting it's path so it avoids them of course! Share this post Link to post Share on other sites
MulleDK13 0 Posted March 11, 2007 Not that I know of, sorry:( I think the only way is to guide it manually. Share this post Link to post Share on other sites
Balschoiw 0 Posted March 11, 2007 Quote[/b] ]Is there anything you can do to stop the camera from travelling through buildings? Other than plotting it's path so it avoids them of course! Plot it's path so it avoids them of course Share this post Link to post Share on other sites
-DirTyDeeDs--Ziggy- 0 Posted March 11, 2007 Btw, if you want to destroy the camera (to make the player be able to control again) execute this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_camera = "camera" camcreate [0,0,0] _camera cameraeffect ["internal", "back"] the end camera code should be <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_camera cameraeffect ["terminate", "back"] camdestroy _camera Share this post Link to post Share on other sites
MulleDK13 0 Posted March 11, 2007 Yeah.. Thnx Ziggy... Forgot to change the "internal" to "terminate" before posting... :P Share this post Link to post Share on other sites