Camera.sqs: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (+ info about clipboard.txt and special keys, added links to scripting commands)
m (Wiki format)
Line 3: Line 3:
It won't take you long to discover that the original Operation Flashpoint camera options which are found in the editor don't give you the same versatility that you have seen in the official missions or quality user-created cutscenes. The "editor driven cutscene" has long been frowned upon by serious mission makers and for good reason. Seeing the same spinning camera shot and slow zooms over and over make the editor driven cutscene instantly recognisable as novice and that's without mentioning the annoying split second delay before the cutscene gets going.
It won't take you long to discover that the original Operation Flashpoint camera options which are found in the editor don't give you the same versatility that you have seen in the official missions or quality user-created cutscenes. The "editor driven cutscene" has long been frowned upon by serious mission makers and for good reason. Seeing the same spinning camera shot and slow zooms over and over make the editor driven cutscene instantly recognisable as novice and that's without mentioning the annoying split second delay before the cutscene gets going.


Thankfully BIS accounted for this by having its own method of creating camera cutscenes bypassing the editor options altogether. It is a script which simulates a real camera, which literally lets you point and click your angles, thus allowing you to create cutscenes with minimum fuss.
Thankfully BI accounted for this by having its own method of creating camera cutscenes bypassing the editor options altogether. It is a script which simulates a real camera, which literally lets you point and click your angles, thus allowing you to create cutscenes with minimum fuss.


This script already exists within Flashpoint. By executing the script in-game you can activate a camera which is controlled using the keyboard. It can be moved into practically any position, and a 'snapshot' can be taken containing all the relevant information for that shot. The information can then be pasted into your cutscene script.  
This script already exists within Flashpoint. By executing the script in-game you can activate a camera which is controlled using the keyboard. It can be moved into practically any position, and a 'snapshot' can be taken containing all the relevant information for that shot. The information can then be pasted into your cutscene script.  


 
== Usage ==
To execute the script create an object - doesn't need to be a soldier - and in its init field type
To execute the script create an object - doesn't need to be a soldier - and in its init field type


Line 14: Line 14:
Now when you preview the mission you will see the cinematic border at the top and bottom of the screen and a view looking North from the object you created. There will be a crosshair in the centre of the screen.
Now when you preview the mission you will see the cinematic border at the top and bottom of the screen and a view looking North from the object you created. There will be a crosshair in the centre of the screen.


 
=== Controls ===
Camera movement is controlled using the following keys:
Camera movement is controlled using the following keys:
 
'''W'''  forward
 
'''E'''  fast forward
'''W'''  forward<br />
'''A'''  left
'''E'''  forward more quickly<br />
'''D'''  right
'''A'''  left<br />
'''S'''  backwards
'''D'''  right<br />
'''Q'''  up
'''S'''  backwards<br />
'''Z'''  down
'''Q'''  up<br />
'''Z'''  down<br />
 


The camera can be rotated and tilted using the numeric keyboard:
The camera can be rotated and tilted using the numeric keyboard:
 
'''8'''  tilt upward
 
'''2'''  tilt downward
'''8'''  tilt upward<br />
'''4'''  rotate left
'''2'''  tilt downward<br />
'''6'''  rotate right
'''4'''  rotate left<br />
'''6'''  rotate right<br />
 


There is also a zoom function, again using the numeric keyboard:
There is also a zoom function, again using the numeric keyboard:
 
'''+'''  zoom in
 
'''-'''  zoom out
'''+'''  zoom in<br />
'''-'''  zoom out<br />
 


Here is list of remaining functions:
Here is list of remaining functions:
 
'''L'''  get rid of the crosshair
 
'''/'''  (on NumPad) target nearest object
'''L'''  get rid of the crosshair<br />
'''Del'''  Turn on/off floating mode
'''/'''  (on NumPad) target nearest object<br />
'''Del'''  Turn on/off floating mode<br />




Pressing '''V''' will cancel the camera view and return back to normal control.
Pressing '''V''' will cancel the camera view and return back to normal control.


 
=== Using in script ===
Finally, once you have framed your shot, press the right-hand '''Ctrl''' key. This stores the camera information in the clipboard. You can then press Alt+Tab to return to the desktop, and paste the camera information into a text-editor such as Notepad using Ctrl+V. Text is also saved into '''clipboard.txt''' file in OFP main directory.
Finally, once you have framed your shot, press the '''Ctrl''' key. This stores the camera information in the clipboard. You can then press Alt+Tab to return to the desktop, and paste the camera information into a text-editor such as Notepad using Ctrl+V. Text is also saved into '''clipboard.txt''' file in OFP main directory.




The result will look something like this:
The result will look something like this:
 
_camera [[camSetTarget]] [104843.30,23202.12,-23940.18]
 
_camera [[camSetPos]] [9673.62,4028.58,12.44]
_camera [[camSetTarget]] [104843.30,23202.12,-23940.18] <br />
_camera [[camSetFov|camSetFOV]] 0.700
_camera [[camSetPos]] [9673.62,4028.58,12.44] <br />
_camera [[camCommit]] 0
_camera [[camSetFov|camSetFOV]] 0.700 <br />
@[[camCommitted]] _camera
_camera [[camCommit]] 0 <br />
@[[camCommitted]] _camera




Line 70: Line 57:




For more advanced cutscene tutorials visit [http://www.ofpec.com OFPEC]
== External links ==
For more advanced cutscene tutorials visit [http://www.armaeditingcenter.com OFPEC]

Revision as of 07:47, 13 October 2006


It won't take you long to discover that the original Operation Flashpoint camera options which are found in the editor don't give you the same versatility that you have seen in the official missions or quality user-created cutscenes. The "editor driven cutscene" has long been frowned upon by serious mission makers and for good reason. Seeing the same spinning camera shot and slow zooms over and over make the editor driven cutscene instantly recognisable as novice and that's without mentioning the annoying split second delay before the cutscene gets going.

Thankfully BI accounted for this by having its own method of creating camera cutscenes bypassing the editor options altogether. It is a script which simulates a real camera, which literally lets you point and click your angles, thus allowing you to create cutscenes with minimum fuss.

This script already exists within Flashpoint. By executing the script in-game you can activate a camera which is controlled using the keyboard. It can be moved into practically any position, and a 'snapshot' can be taken containing all the relevant information for that shot. The information can then be pasted into your cutscene script.

Usage

To execute the script create an object - doesn't need to be a soldier - and in its init field type

this exec "camera.sqs"

Now when you preview the mission you will see the cinematic border at the top and bottom of the screen and a view looking North from the object you created. There will be a crosshair in the centre of the screen.

Controls

Camera movement is controlled using the following keys:

W  forward
E  fast forward
A  left
D  right
S  backwards
Q  up
Z  down

The camera can be rotated and tilted using the numeric keyboard:

8  tilt upward
2  tilt downward
4  rotate left
6  rotate right

There is also a zoom function, again using the numeric keyboard:

+  zoom in
-  zoom out

Here is list of remaining functions:

L  get rid of the crosshair
/  (on NumPad) target nearest object
Del  Turn on/off floating mode


Pressing V will cancel the camera view and return back to normal control.

Using in script

Finally, once you have framed your shot, press the Ctrl key. This stores the camera information in the clipboard. You can then press Alt+Tab to return to the desktop, and paste the camera information into a text-editor such as Notepad using Ctrl+V. Text is also saved into clipboard.txt file in OFP main directory.


The result will look something like this:

_camera camSetTarget [104843.30,23202.12,-23940.18]
_camera camSetPos [9673.62,4028.58,12.44]
_camera camSetFOV 0.700
_camera camCommit 0
@camCommitted _camera


Note that the keyboard controls above are the default settings. If you have reconfigured your keyboard controls you'll have to find the equivalent keys.


External links

For more advanced cutscene tutorials visit OFPEC