RJ Wattenhofer

Tech writing, 3D model building and game design.

December 16, 2017

ArmA 2 | Making an Intro with the In-game Camera

Instructions on setup, movement and sound for your mission intro

arma 2 operation arrowhead logo

Begin by opening your text editor (MS Notepad or similar) and copying & pasting the code below into it:




playMusic "beethoven"

_camera = "camera" camcreate [3116.49,4343.34,2.00]
_camera cameraeffect ["internal", "back"]


;comment "2:10:08";
_camera camPrepareTarget [-73242.38,68922.07,1.99];
_camera camPreparePos [3116.49,4343.34,2.00];
_camera camPrepareFOV 0.700;
_camera camCommitPrepared 0
@camCommitted _camera

~3

showcinemaborder false


;comment "2:10:39";
_camera camPrepareTarget [-73242.38,68922.07,1.99];
_camera camPreparePos [3092.98,4374.91,35.93];
_camera camPrepareFOV 0.700;
_camera camCommitPrepared 5
@camCommitted _camera


6 Fademusic 0
titlecut ["Semper Fi!","BLACK out",3]
~5

player cameraEffect ["terminate","back"]
camDestroy _camera
~1


titlecut ["","BLACK in",3]
~3

introover=true

exit 




Save the file as intro.sqs and drop it into your mission folder. Reopen it and keep it open throughout the remainder of this tutorial. Now launch ArmA 2 and enter the editor. Pull up your mission and place a civilian unit on the map location where you would like to begin shooting. Change the control to 'Player' and place this line of code it its 'Intialization' field:

this exec "camera.sqs"

arma 2 camera intro 01

Hit the 'Preview' button and enter the mission. There will be a set of white crosshairs in the center of the screen which indicates you are in camera mode via the civilian unit. You will want to maneuver the camera over to its first shooting position using the following commands:

W = forward
A = left
D = right
S = backwards
Q = up
Z = down
8 = tilt upward
2 = tilt downward
4 = rotate left
6 = rotate right
+ = zoom in
- = zoom out
F = tracks targeted object OR position on ground nearest to crosshairs
Space Bar = targets nearest object OR position on ground
Del = Turn on/off floating mode
Shift+[movement key] = faster camera movement


Once you are in position, click the left mouse button. This records the starting camera position. Then click Alt + Tab to exit the editor. Go over to your intro.sqs file and drag your mouse over (highlight) the first camera position, hit Ctrl + V and then paste the new position over it. The code you are replacing is four lines down and looks like this:

;comment "2:10:08";
_camera camPrepareTarget [-73242.38,68922.07,1.99];
_camera camPreparePos [3116.49,4343.34,2.00];
_camera camPrepareFOV 0.700;
_camera camCommitPrepared 0"

Copy the numbers from the sixth line down (3116.49,4343.34,2.00) and past them into the brackets of line two, so it will now look like this:

_camera = "camera" camcreate [3116.49,4343.34,2.00]

Return to the ArmA 2 editor and move to the second shooting position. when you reach it click the left mouse button once again, repeating the process above but this time replacing the code that starts on line twelve:

;comment "2:10:39";
_camera camPrepareTarget [-73242.38,68922.07,1.99];
_camera camPreparePos [3092.98,4374.91,35.93];
_camera camPrepareFOV 0.700;
_camera camCommitPrepared 5

arma 2 camera intro 02
arma 2 camera intro 03

On the very last line of the code you just pasted (_camera camCommitPrepared 5) make sure to enter a number in seconds that you would like the camera to run in between positions one and two.

Return to the editor and delete the civilian unit. Click the 'Units' button and create a 'Game Logic' unit. Enter this code in the 'Intialization' field:

[]exec "intro.sqs"

The intro will run at this point when you play the mission. In regard to music, I have used Beethoven's 'Fur Elise' for my intro. if you would like to add music it will need to be in the .ogg format and the approximate length of your intro.

Create a new folder in your mission folder titled 'music' and drop your song into it. In the root of the mission folder create a new file named description.ext and copy & past this code into it:




class CfgMusic
{
	tracks[]={beethoven};

	class beethoven
	{
		name = "beethoven";
		sound[] = {"\music\beethoven.ogg", db+10, 1.0};
	};
	
};





Place the name of your song on the first line of the intro.sqs file and your music will play.

This has given you a basic overview of how to run the camera to create an intro. There are a myriad of other things you can do and I encourage you to experiment. Keep in mind that the camera is not capturing video footage; it is recording viewing positions. You could easily move your intro to another map and it would run but would appear entirely different.

You can check out the video below to see the end product of the above tutorial.


Related article: Adding Mission Tasks [ArmA 2]
Related article: Creating a Mission Intro Splash Screen [ArmA 2]
Related article: Creating Multiplayer Missions [ArmA 2]
Related article: General assembly: ArmA 2 VPN Setup [ArmA 2]
Related article: Spawning Soldiers with Timers [ArmA 2]
Related article: Implement Looping Waypoints [ArmA 2]
Related article: Code Design Potpourri [ArmA 2]


written by

raymond wattenhofer ad rust custom workshop items ad World First Release, Only This drone quadcopter with both FPV&
 Auto-follow functions, can be controlled by Phone or Remote Control Sony Creative Software Inc. the power level ad airport madness game airport madness game 02 please dont touch anything game please dont touch anything game 02 pre-civilization marble age game pre-civilization marble age game 02 nendoroid link action figure nendoroid link action figure 02
  • xing social button
  • linkedin social button
  • buffer social button
  • reddit social button
  • stumbleupon social button
  • facebook social button
  • google plus button
  • twitter social button
  • renren social button Renren
  • vkontakte social button Share in VK