camCreate: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
mNo edit summary
(92 intermediate revisions by 14 users not shown)
Line 1: Line 1:
back to [[Scripting_Reference#C|COMREF]]
{{RV|type=command


<h2 style="color:#000066">'''''type'' camCreate ''position'''''</h2>
|game1= ofp
|version1= 1.00


|game2= ofpe
|version2= 1.00


'''Operand types:'''
|game3= arma1
|version3= 1.00


'''type:''' [[String]]
|game4= arma2
|version4= 1.00


'''position:''' [[Array]]
|game5= arma2oa
|version5= 1.50


'''Type of returned value:'''
|game6= tkoh
|version6= 1.00


[[Object]]
|game7= arma3
|version7= 0.50


'''Description:'''
|gr1= Camera Control


Create camera or actor of given '''type''' at given initial '''position''' (format [[Position]]).
|eff= local


Type is one of:
|descr= Create a camera or a seagull object on the given position. The creation happens immediately and doesn't wait for [[camCommit]].<br>
Among other commands, [[cameraEffect]] must be used to enter the camera's view and [[camDestroy]] to delete the created camera. See also [[:Category:Command Group: Camera Control|Camera Control]].{{Feature|important|
* Other objects can be created this way, but vehicles created with [[camCreate]] cannot be entered
* Any unit created with [[camCreate]] will remain static
* Unlike [[createVehicle]], objects are created exactly at the given position, without consideration of the surrounding objects}}


* '''"CAMERA"'''
|s1= type [[camCreate]] position
* '''"SEAGULL"'''


|p1= type: [[String]] - camera type, one of the following:
* "camera"
* "seagull" (a crow in Arma 2)
* "camconstruct"
* "camcurator" (Since Arma 3 Zeus)
* "crowe" (crow - Arma 3)
* or any vehicle class suitable to be spawned with cam


'''Example:'''
|p2= position: [[Array]] format [[Position#PositionAGL|PositionAGL]] - position to create the object at


_camera = '''"camera"''' '''camCreate''' [[getPos]] [[player]]
|r1= [[Object]] - the created camera


|x1= <sqf>_cam = "camera" camCreate (ASLToAGL eyePos player);</sqf>


'''Comments:'''
|x2= <sqf>_flr = "flare" camCreate (position _myPlane); // works too</sqf>


In multiplayer '''camCreated''' objects are only visible locally (meaning they are client-side effects).
|mp= camCreated objects are only visible locally (meaning they are client-side effects).


In version '''1.90+''' [[createVehicle]] is a valid replacement (with special consideration to locality).
|seealso= [[camCommand]] [[camDestroy]] [[camSetFocus]] [[camCommit]] [[setPiPEffect]] [[createVehicle]] [[createUnit]] [[showCinemaBorder]] [[cameraEffect]] [[cameraEffectEnableHUD]]
 
}}
 
You can also use camCreate to create objects.
 
For example:
 
flare1 = "flare" '''camCreate''' [[getPos]] gameLogic_1
 
However, soldier units created in this way have little or no AI.

Revision as of 22:25, 28 September 2023

Hover & click on the images for description

Description

Description:
Create a camera or a seagull object on the given position. The creation happens immediately and doesn't wait for camCommit.
Among other commands, cameraEffect must be used to enter the camera's view and camDestroy to delete the created camera. See also Camera Control.
  • Other objects can be created this way, but vehicles created with camCreate cannot be entered
  • Any unit created with camCreate will remain static
  • Unlike createVehicle, objects are created exactly at the given position, without consideration of the surrounding objects
Multiplayer:
camCreated objects are only visible locally (meaning they are client-side effects).
Groups:
Camera Control

Syntax

Syntax:
type camCreate position
Parameters:
type: String - camera type, one of the following:
  • "camera"
  • "seagull" (a crow in Arma 2)
  • "camconstruct"
  • "camcurator" (Since Arma 3 Zeus)
  • "crowe" (crow - Arma 3)
  • or any vehicle class suitable to be spawned with cam
position: Array format PositionAGL - position to create the object at
Return Value:
Object - the created camera

Examples

Example 1:
_cam = "camera" camCreate (ASLToAGL eyePos player);
Example 2:
_flr = "flare" camCreate (position _myPlane); // works too

Additional Information

See also:
camCommand camDestroy camSetFocus camCommit setPiPEffect createVehicle createUnit showCinemaBorder cameraEffect cameraEffectEnableHUD

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note