-
Notifications
You must be signed in to change notification settings - Fork 1
Unit Behavior
You can set specific DynAI behavior for editor-placed units (indoor for infantries, vehicle hold for vehicles).
There are 2 behaviours available:
-
"indoor"
(infantry will hold his position and will turn around looking for a targets; if hostiles are detected in close range - infantry may rush to fight hostiles) -
"vehicle hold"
(vehicle will hold it's position, gunner and commander will scan horizon; if hostiles detected - vehicle will not hold it's position and will step in fight according to Arma3 AI FSMs) -
"vehicle 45 hold"
(vehicle will hold it's position, gunner and commander will scan horizon in +-45 degrees in front of the vehicle; if hostiles detected - vehicle will not hold it's position and will step in fight according to Arma3 AI FSMs) -
"vehicle 90 hold"
(vehicle will hold it's position, gunner and commander will scan horizon in +-90 degrees in front of the vehicle; if hostiles detected - vehicle will not hold it's position and will step in fight according to Arma3 AI FSMs)
Add next code to unit's init in the editor (e.g. for "indoor" behavior): this setVariable ["dzn_dynai_setBehavior", "indoor"]; It's enough to set variable to single unit from group.
Place GameLogic object and add next code to it's init in the editor: this setVariable ["dzn_dynai_setBehavior", "vehicle hold"]; Now synchronize all units you want apply behavior to with this GameLogic. It's enough to synchronize single unit from group.
[@Unit, @Behavior] call dzn_fnc_dynai_addUnitBehavior -- where @Unit(OBJECT) is a Infantry Unit or Vehicle (not a crew); @Behavior(STRING) is the name of behavior (see the list above). You are free to spawn this function.