object - commandobject - platoon


void SetCannonFireMode(int nUnit, int nCannonNum, int nMode)

Scope: private

Parameters
nCannonNum - cannon number.
nFireMode - cannon working mode:
0 - cannon fires ony to target given by script,
1 - cannon itself searches for targets and fire to them.

Return values
none

Description
This function is used for setting or clearing automatic fire mode. In automatic mode when cannon will find target it's calling event OnCannonFoundTarget and if event return false cannon will fire to found target.
If nCannonNum == -1 then we change mode for all cannons on tank.

See also