Page tree
Skip to end of metadata
Go to start of metadata



Introduced in

Version:2.12

Description

Description:Invokes the danger FSM for the given unit, or units in the given radius.

Syntax

Syntax:setDanger [unit, cause, position, duration]
Parameters:
  • unit: Object - Person whose danger FSM should be triggered.
  • cause: String - Type of danger to simulate (see danger for options).
  • position: PositionAGL - Position the danger originates from.
  • duration: Number - For how long the danger should be perceived.
Return Value:Nothing

Alternative Syntax

Syntax:setDanger [radius, cause, position, duration]
Parameters:
  • radius: Number - All units within this radius of the danger position have their danger FSM triggered.
  • cause: String - Type of danger to simulate (see danger for options).
  • position: PositionAGL - Position danger originates from.
  • duration: Number - For how long the danger should be perceived.
Return Value:Nothing

Examples

Examples:
setDanger [soldier1,"deadbody",[2500,2500,0],20];

Additional Information

See also: danger, setCombatMode
Multiplayer:
Problems:

Notes