setFormDir: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\[\[Category:Scripting Commands OFP 1.[4-9]{2}(\|(\{\{uc:\{\{PAGENAME\}\}\}\}|#|[A-Z]+))?\]\] " to "") |
m (formatting) |
||
Line 1: | Line 1: | ||
{{RV|type=command | {{RV|type=command | ||
| ofp | |game1= ofp | ||
|1.00 | |version1= 1.00 | ||
|game2= ofpe | |||
|version2= 1.00 | |||
|game3= arma1 | |||
|version3= 1.00 | |||
|game4= arma2 | |||
|version4= 1.00 | |||
|game5= arma2oa | |||
|version5= 1.51 | |||
|game6= tkoh | |||
|version6= 1.00 | |||
|game7= arma3 | |||
|version7= 0.50 | |||
|arg= local | |arg= local | ||
Line 11: | Line 35: | ||
|gr1= Groups | |gr1= Groups | ||
| Sets 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 overridden by movement direction. If the new direction is noticeably different from the old direction (approx +/- 15 degrees), units will change positions changing [[formationDirection]]. | |descr= Sets 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 overridden by movement direction. If the new direction is noticeably different from the old direction (approx +/- 15 degrees), units will change positions changing [[formationDirection]]. | ||
| group '''setFormDir''' heading | |s1= group '''setFormDir''' heading | ||
|p1= group: [[Object]] or [[Group]] | |p1= group: [[Object]] or [[Group]] | ||
Line 19: | Line 43: | ||
|p2= heading: [[Number]] | |p2= heading: [[Number]] | ||
| [[Nothing]] | |r1= [[Nothing]] | ||
|x1= <code>_group1 [[setFormDir]] 180;</code> | |x1= <code>_group1 [[setFormDir]] 180;</code> | ||
|x2= <code>_unit1 [[setFormDir]] [[random]] 360;</code> | |x2= <code>_unit1 [[setFormDir]] [[random]] 360;</code> | ||
Line 30: | Line 55: | ||
}} | }} | ||
<dl class="command_description"> | <dl class="command_description"> | ||
<dd class="notedate">Posted on November 22, 2014 - 20:03 (UTC)</dd> | <dd class="notedate">Posted on November 22, 2014 - 20:03 (UTC)</dd> | ||
<dt class="note">[[User:Killzone Kid|Killzone Kid]]</dt> | <dt class="note">[[User:Killzone Kid|Killzone Kid]]</dt> | ||
<dd class="note"> | <dd class="note"> | ||
When applied to AI, [[setFormDir]] will set unit formation direction, 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: | When applied to AI, [[setFormDir]] will set unit formation direction, 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; | <code>_unit [[setFormDir]] 45; | ||
Line 49: | Line 66: | ||
</dd> | </dd> | ||
</dl> | </dl> | ||
Revision as of 00:58, 29 March 2021
Description
- Description:
- Sets 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 overridden by movement direction. If the new direction is noticeably different from the old direction (approx +/- 15 degrees), units will change positions changing formationDirection.
- Groups:
- Groups
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);
Additional Information
- See also:
- setDirsetVectorDirsetVectorDirAndUpresetSubgroupDirectionformationformationLeaderformationMembersformationTaskformationDirectionformationPosition
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
- Posted on November 22, 2014 - 20:03 (UTC)
- Killzone Kid
-
When applied to AI, setFormDir will set unit formation direction, 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
- Operation Flashpoint: Elite: Scripting Commands
- ArmA: Armed Assault: Scripting Commands
- Arma 2: Scripting Commands
- Arma 2: Operation Arrowhead: Scripting Commands
- Take On Helicopters: Scripting Commands
- Arma 3: Scripting Commands
- Command Group: Groups
- Scripting Commands: Global Effect