setFormDir: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
Killzone Kid (talk | contribs) No edit summary |
||
Line 47: | Line 47: | ||
[[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 November 22, 2014 - 20:03 (UTC)</dd> | |||
<dt class="note">[[User:Killzone Kid|Killzone Kid]]</dt> | |||
<dd class="note"> | |||
When applied to AI, [[setFormDir]] will set unit formation which in turn will force unit to change direction to match formation direction, however unit will stop turning as soon as unit direction is +/- 30 degrees of the formation direction. To precisely match formation direction, additional [[setDir]] is required: | |||
<code>_unit [[setFormDir]] 45; | |||
_unit [[setDir]] 45; | |||
[[hint]] [[str]] [[direction]] _unit; //45</code> | |||
</dd> | |||
</dl> | |||
<!-- DISCONTINUE Notes --> |
Revision as of 21:03, 22 November 2014
Description
- Description:
- Set group formation heading. Accepted heading range is 0 to 360. Formation is facing this direction unless enemy is seen. When group is moving, this value is overriden by movement direction.
- Groups:
- Uncategorised
Syntax
- Syntax:
- group setFormDir heading
- Parameters:
- group: Object or Group
- heading: Number
- Return Value:
- Nothing
Examples
- Example 1:
_group1 setFormDir 180;
- Example 2:
_unit1 setFormDir random 360;
- Example 3:
//center the main turret (group BIS_Crew1) setFormDir (getDir BIS_Armor); (group BIS_Crew2) setFormDir (getDir BIS_Armor);
Additional Information
- See also:
- setDir
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
Bottom Section
- Posted on November 22, 2014 - 20:03 (UTC)
- Killzone Kid
-
When applied to AI, setFormDir will set unit formation which in turn will force unit to change direction to match formation direction, however unit will stop turning as soon as unit direction is +/- 30 degrees of the formation direction. To precisely match formation direction, additional setDir is required:
_unit setFormDir 45; _unit setDir 45; hint str direction _unit; //45
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
- Scripting Commands ArmA2
- Scripting Commands Arma 3
- Scripting Commands Take On Helicopters