commander: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
[[Category:Scripting Commands|COMMANDER]]
[[Category:Scripting Commands|COMMANDER]]
[[Category:Scripting Commands OFP 1.97|COMMANDER]]
[[Category:Scripting Commands OFP 1.96|COMMANDER]]
[[Category:Scripting Commands OFP 1.46|COMMANDER]]
[[Category:Scripting Commands OFP 1.46|COMMANDER]]
[[Category:Scripting Commands ArmA|COMMANDER]]
[[Category:Scripting Commands ArmA|COMMANDER]]

Revision as of 20:03, 1 June 2006


commander vehicle


Operand types:

vehicle: Object

Type of returned value:

Object

Description:

Commander of the vehicle, if vehicle is not a vehicle but is a person, then the person is returned.


Example:

_unit = commander vehicle player


Notes:

It is also possible to find the commander of a vehicle by placing a C after the name of the vehicle so Tank1C and commander Tank1 both refer to the same unit, providing the original commander has not got out of the tank.

The difference between the two is Tank1C is always the unit that was commander of the tank when the mission started, whilst commander Tank1 is the commander which is now there.