Arma 3 Scripting

Command in Triggers

triggerActivated

Also available as Markdown and JSON, or read the original wiki page.

Description

Returns true if the trigger has been activated.

Syntax

triggerActivated trigger

Parameters:

Returns: Boolean

Examples

Example 1

if (triggerActivated trg1) then { hint "trigger trg1 activated!" };

Multiplayer

Important

The trigger could be local or remote but the result returned by this command will be for the trigger activated status on the client that executed the command. See createTrigger for more information.

See also

setTriggerActivation · triggerActivation · triggerInterval · setTriggerInterval · enableSimulation · simulationEnabled · createTrigger

Community notes

MisterGoodson

If the trigger already activated at least once, triggerActivated will only return false if trigger is set to activate Repeatedly.

In other words, a trigger set to activate Once will always return true once activated at least once (even if trigger is no longer activated).

Killzone_Kid

The engine does not provide a precise way of detecting which player activated the trigger. The trigger has a default triggerInterval of ~0.5 seconds, so every half a second it checks if there is anyone in the zone. There could be 100 people in the zone on the next scan, which one was the first? There is simply no data for this. You can make an imprecise guess by taking 1st person from thisList or list. Also you should do it on server only trigger. This will still not guarantee that person first on the list is the one who was first to activate trigger, but on balance will probably be the one.