User Tools

Site Tools


arma:missions:intro_tutorial

Mission Intro Tutorial

Mission Intro Tutorial by Misinformed, Kelly's Heroes.

Properly done Introduction clips before a mission simply make your work look bitching, they can also tell the player a little bit about the map/mission without having played it and set the tone for the atmosphere.

A relatively quick step by step guide to getting your 1st working intro, so you can get on with the fun stuff.

Things you need to know before you start

You need to have a little experience with working in the editor.

Copying and pasting in the editor, CTRL-C to copy, CTRL-V to paste. Works with text, units, triggers, pretty much anything.

The difference between Singleplayer and Multiplayer Intro's: At the top right of the editor screen there's a button that says “Mission”. Click on it, changing it to Intro/outro win/ loose will give you a clean slate in which to put your intro/outro clip on without any of the units present on the actual mission. However its only possible to do multiplayer Intro's/outro's in the actual mission itself. So we'll leave that on “Mission” for now.

The Init.sqs is a file that's loaded up in your mission folder when a player joins It can often contains various commands and often executes other scripts.

This is also where your mission.sqm file is located (the file the editor generates when you press the save button in the map editor, and everything else that relates to this particular map).

To create an Init.sqs file simply create a text file in word pad, plonk it in your mission folder and rename it to an .sqs file. Its empty at the moment but we'll add things to it later for it to execute.

That's the preparation finished. Now we get down to it.

Put a Rifleman down in the editor, set him to be the player. In his Init field (Initialisation field) type: this exec “camera.sqs”; showCinemaBorder false;

Now preview the map. You should have a cross hair in the middle of your screen. This view is what your camera is seeing. Press Q to gain elevation, Z to move downwards. W will move the camera forwards, S backwards. The number keys 4, 8 , 6, and 2 will move your camera so it orientates itself left, up, right, and down. Moving the mouse forward of back will also get you around a bit quicker. Press and hold numpad plus or minus to zoom in, telescopic zooms (ie zooming in, cause your FOV to be reduced, whereas wide angle lenses or zooming out, increase your FOV and allow you to get more in your shot).

Once you've found a spot you want in your clip, press and hold CTRL and left click, you've just copied all the pertaining information required to get the exact shot your looking at into your Intro. Use ALT-TAB to return to your missions folder and create another .sqs file this time called “Intro.sqs”. Place Intro.sqs into your mission folder and open it with notepad, press CTRL-V to paste the information about the camera settings into Intro.sqs.

It should look something like this:

;=== 15:39:59
_camera camPrepareTarget [12679.93,107980.64,48.42];
_camera camPreparePos [12679.93,7980.60,2.00];
_camera camPrepareFOV 0.700;
_camera camCommitPrepared 0;
@camCommitted _camera;

Ill explain a little bit about what you've got there. A time stamp of when you took this information in the editor.

_camera is a local variable name used only inside this script/sqs file it is the camera (you can rename it to whatever you want as long as it has an underscore before the name, meaning it is a local variable. I usually use “_cam”. It is before or after various commands in the above denoting that the camera executes those commands. Make sure whatever you call it that you always call it that without fail. Otherwise things wont work.

campreparetarget prepares the camera for the position in brackets. http://community.bistudio.com/wiki/camPrepareTarget

campreparepos prepares the format position http://community.bistudio.com/wiki/camPreparePos

campreparefov prepares the camera's field of view (default fov is 0.700) http://community.bistudio.com/wiki/camPrepareFov

camcommitprepared 0: sets the time taken for a smooth transition from one camera position/target to another. 0 is instant, anything above that will move the camera over the terrain to the new camera position. Depending on the distance between camera positions you may need upwards of 10, 20 etc to slow the camera down enough. http://community.bistudio.com/wiki/camCommitPrepared

@camcommited _camera tells the camera to apply the above settings.

But because we want the camera to set these first settings right away. We have to change some commands from camprepare to camset. So we end up with things looking like this in our Intro.sqs.

http://community.bistudio.com/wiki/camSetTarget

http://community.bistudio.com/wiki/camSetPos

http://community.bistudio.com/wiki/camSetFov

Now weve got this first camera shot.

;=== 15:39:59
_cam camsetTarget [12679.93,107980.64,48.42];
_cam camsetPos [12679.93,7980.60,2.00];
_cam camsetFOV 0.700;
_cam camCommitPrepared 0;
@camCommitted _cam;

But were a bit ahead of ourselves at the moment since we havnt told the script that the local variable _cam is referring to a camera so we add these few lines right at the beginning of our Intro.sqs file, before the first camera shots. This also sets an arbitrary position, target and effects that the camera wants when you create it. This in itself is a camera shot attached to the players position, but you wont see it because the transition to the next shot is instantaneous.

_cam = "camera" camCreate (position player);
_cam cameraEffect ["Internal", "Back"];
_cam camSetTarget camtarget;
_cam camCommit 0;

So we end up with the Intro.sqs looking like this:

_cam = "camera" camCreate (position player);
_cam cameraEffect ["Internal", "Back"];
_cam camSetTarget camtarget;
_cam camCommit 0;
 
;=== 15:39:59
_cam camsetTarget [12679.93,107980.64,48.42];
_cam camsetPos [12679.93,7980.60,2.00];
_cam camsetFOV 0.700;
_cam camCommitPrepared 0;
@camCommitted _cam;

Now we want to create another shot that the camera will smoothly transition to. Create another shot and copy its info into your Into.sqs, rename the local variables and rename all the prepare commands to set commands.

We now add the new shot below the first one. So your into.sqs will have two shots, something like this (camsettarget positions and setpos will obviously be different because you took your shot in a different position on the map than mine).

If you want a smooth transition to the new shot simply add a number higher than 0 to the second shots _cam camcommitprepared command line.

Also add a few seconds pause after the 1st shot if you want it to wait before it moves position to the new shot. So we add ~3 seconds.

It should look like this:

_cam = "camera" camCreate (position player);
_cam cameraEffect ["Internal", "Back"];
_cam camSetTarget camtarget;
_cam camCommit 0;
 
;=== 15:39:59
_cam camsetTarget [12679.93,107980.64,48.42];
_cam camsetPos [12679.93,7980.60,2.00];
_cam camsetFOV 0.700;
_cam camCommitPrepared 0;
@camCommitted _cam;
~3
 
;=== 16:18:36
_cam camsetTarget [-80053.84,45255.97,-3264.27];
_cam camsetPos [12670.82,7984.03,0.20];
_cam camsetFOV 0.700;
_cam camCommitPrepared 1;
@camCommitted _cam;

Now were almost done, time to destroy the camera, and finish it up allowing the player to start team killing or whatever you do when you actually play arma.

Add this to the end of Intro.sqs.

_cam cameraEffect ["Terminate", "Back"];
camDestroy _cam;

Its also nice if it has some transition effects to smooth away the rough edges so we add some fade in/fade outs.

We also disable the radio to prevent any nasty interruptions and enable it at the end of the intro.

And finally if you dont want the player to fiddle about while the intro's playing, disable user input, remember it to enable it again before the script ends.

enableRadio false;
Disableuserinput true;
titleCut["", "BLACK IN",5];
_cam = "camera" camCreate (position player);
_cam cameraEffect ["Internal", "Back"];
_cam camSetTarget camtarget;
_cam camCommit 0;
 
;=== 15:39:59
_cam camsetTarget [12679.93,107980.64,48.42];
_cam camsetPos [12679.93,7980.60,2.00];
_cam camsetFOV 0.700;
_cam camCommitPrepared 0;
@camCommitted _cam;
~3
 
;=== 16:18:36
_cam camsetTarget [-80053.84,45255.97,-3264.27];
_cam camsetPos [12670.82,7984.03,0.20];
_cam camsetFOV 0.700;
_cam camCommitPrepared 1;
@camCommitted _cam;
~3
 
cutText["", "BLACK OUT",5];
~3
 
cutText ["", "BLACK IN",5];
 
Disableuserinput false;
enableRadio true;
_cam cameraEffect ["Terminate", "Back"];
camDestroy _cam;

Now all we have to do is open our Init.sqs that we made earlier and add: [] exec “Intro.sqs”and the intro should play upon starting the map after the briefing in multiplayer. And add “exit” to get out of the Init.sqs since we have no further use for it.

And that's it!

Notes

This tutorial is hosted here with permissions from Kelly's Heroes, thanks guys.

arma/missions/intro_tutorial.txt · Last modified: 2009-05-14 09:22 by snakeman