effectiveCommander: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]Arma[ _]2(\|.*)\]\]" to "{{GameCategory|arma2|Scripting Commands}}")
m (Text replacement - "_{10,} " to "")
Line 1: Line 1:
{{Command|Comments=
{{Command|Comments=
____________________________________________________________________________________________


| arma1 |Game name=
| arma1 |Game name=
Line 7: Line 6:


|gr1= Unit Control |GROUP1=
|gr1= Unit Control |GROUP1=
____________________________________________________________________________________________


| Returns the effective commander of the vehicle. Effective commander is the player whom driver AI will listen to. So if in a tank there is a gunner and a commander and AI driver, if the [[effectiveCommander]] is gunner, then gunner pressing WASD will give AI orders to move. If gunner jumps out and then enters tank again, the [[effectiveCommander]] role most likely has changed to commander that remained in tank. Also the assignment seems to work on first come first served basis. |DESCRIPTION=
| Returns the effective commander of the vehicle. Effective commander is the player whom driver AI will listen to. So if in a tank there is a gunner and a commander and AI driver, if the [[effectiveCommander]] is gunner, then gunner pressing WASD will give AI orders to move. If gunner jumps out and then enters tank again, the [[effectiveCommander]] role most likely has changed to commander that remained in tank. Also the assignment seems to work on first come first served basis. |DESCRIPTION=
____________________________________________________________________________________________


| '''effectiveCommander''' vehicle |SYNTAX=
| '''effectiveCommander''' vehicle |SYNTAX=
Line 21: Line 18:
|x1= <code>_commander = [[effectiveCommander]] tank;
|x1= <code>_commander = [[effectiveCommander]] tank;
</code>|EXAMPLE1=  
</code>|EXAMPLE1=  
____________________________________________________________________________________________


| [[setEffectiveCommander]], [[commander]], [[driver]], [[gunner]], [[currentPilot]], [[vehicleMoveInfo]]  |SEEALSO=
| [[setEffectiveCommander]], [[commander]], [[driver]], [[gunner]], [[currentPilot]], [[vehicleMoveInfo]]  |SEEALSO=

Revision as of 02:11, 17 January 2021

Hover & click on the images for description

Description

Description:
Returns the effective commander of the vehicle. Effective commander is the player whom driver AI will listen to. So if in a tank there is a gunner and a commander and AI driver, if the effectiveCommander is gunner, then gunner pressing WASD will give AI orders to move. If gunner jumps out and then enters tank again, the effectiveCommander role most likely has changed to commander that remained in tank. Also the assignment seems to work on first come first served basis.
Groups:
Unit Control

Syntax

Syntax:
effectiveCommander vehicle
Parameters:
vehicle: Object
Return Value:
Object - commander unit

Examples

Example 1:
_commander = effectiveCommander tank;

Additional Information

See also:
setEffectiveCommandercommanderdrivergunnercurrentPilotvehicleMoveInfo

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