switchCamera: Difference between revisions
Categories: Scripting CommandsIntroduced with Operation Flashpoint version 1.00Operation Flashpoint: New Scripting CommandsOperation Flashpoint: Scripting CommandsCommand Group: UncategorisedScripting Commands OFP 1.99Scripting Commands OFP 1.96Scripting Commands OFP 1.46Scripting Commands ArmACommand Group: Camera ControlScripting Commands ArmA2Scripting Commands Arma 3Scripting Commands Take On Helicopters
m (added a note to the description about having control over the switched unit) |
Killzone Kid (talk | contribs) No edit summary |
||
Line 56: | Line 56: | ||
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]] | [[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]] | ||
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]] | [[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]] | ||
<!-- CONTINUE Notes --> | |||
<dl class="command_description"> | |||
<dd class="notedate">Posted on May 16, 2015 - 13:14 (UTC)</dd> | |||
<dt class="note">[[User:Killzone Kid|Killzone Kid]]</dt> | |||
<dd class="note"> | |||
Force top down view: <code>cam <nowiki>=</nowiki> "Land_HandyCam_F" [[createVehicleLocal]] [0,0,0]; | |||
cam [[hideObject]] [[true]]; | |||
cam [[attachTo]] <nowiki>[</nowiki>[[player]], [0,0,10]]; | |||
cam [[setVectorUp]] [0,0.99,0.01]; | |||
cam [[switchCamera]] "Internal"; | |||
[[findDisplay]] 46 [[displayAddEventHandler]] ["MouseButtonDown", { | |||
[[if]] (_this [[select]] 1 <nowiki>==</nowiki> 0) [[then]] { | |||
[[player]] [[forceWeaponFire]] <nowiki>[</nowiki>[[currentMuzzle]] [[player]], [[currentWeaponMode]] [[player]]]; | |||
}; | |||
[[false]] | |||
}]; | |||
[[findDisplay]] 46 [[displayAddEventHandler]] ["KeyDown", { | |||
[[if]] (_this [[select]] 1 [[in]] [[actionKeys]] "ReloadMagazine") [[then]] { | |||
[[reload]] [[player]]; | |||
}; | |||
[[false]] | |||
}];</code> | |||
</dd> | |||
</dl> | |||
<!-- DISCONTINUE Notes --> |
Revision as of 15:14, 16 May 2015
Description
- Description:
- Switch camera to given vehicle / camera. Mode is one of:
- "INTERNAL": 1st person
- "GUNNER": optics / sights
- "EXTERNAL": 3rd person
- "GROUP": group
- "VIEW": exactly what spectated unit sees (gun optics, binoculars, TI and NV, etc.) (VBS2 1.30+ only)
Note: Control over the unit is not given to the player. Use selectPlayer or a combination of switchCamera and remoteControl to achieve this. - Groups:
- Uncategorised
Syntax
Examples
- Example 1:
_loon1 switchCamera "External"
Additional Information
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
Notes
-
If you switchCamera to a group leader, you can control his group as if it were your own.
- Posted on January 17th, 2010 - 01:04
- Lou Montana
- Apparently, in Arma 2 if you switchCamera to a group leader, you won't be able to control his group anymore.
Bottom Section
- Posted on May 16, 2015 - 13:14 (UTC)
- Killzone Kid
-
Force top down view:
cam = "Land_HandyCam_F" createVehicleLocal [0,0,0]; cam hideObject true; cam attachTo [player, [0,0,10]]; cam setVectorUp [0,0.99,0.01]; cam switchCamera "Internal"; findDisplay 46 displayAddEventHandler ["MouseButtonDown", { if (_this select 1 == 0) then { player forceWeaponFire [currentMuzzle player, currentWeaponMode player]; }; false }]; findDisplay 46 displayAddEventHandler ["KeyDown", { if (_this select 1 in actionKeys "ReloadMagazine") then { reload player; }; false }];
Categories:
- Scripting Commands
- Introduced with Operation Flashpoint version 1.00
- Operation Flashpoint: New Scripting Commands
- Operation Flashpoint: Scripting Commands
- Command Group: Uncategorised
- Scripting Commands OFP 1.99
- Scripting Commands OFP 1.96
- Scripting Commands OFP 1.46
- Scripting Commands ArmA
- Command Group: Camera Control
- Scripting Commands ArmA2
- Scripting Commands Arma 3
- Scripting Commands Take On Helicopters