triggerActivated: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<dt class="note">'''\[\[.*\]\]'''" to "<dt class="note">$1")
m (Fix username deletion mistake)
Line 11: Line 11:
| Returns true if the trigger has been activated.
| Returns true if the trigger has been activated.


<br><br>{{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 info.}} |DESCRIPTION=
{{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 info.}} |DESCRIPTION=
____________________________________________________________________________________________
____________________________________________________________________________________________


| '''triggerActivated''' trigger |SYNTAX=
| [[triggerActivated]] trigger |SYNTAX=


|p1= trigger: [[Object]] |PARAMETER1=  
|p1= trigger: [[Object]] |PARAMETER1=  
|p2= |PARAMETER2=
|p3= |PARAMETER3=


| [[Boolean]] |RETURNVALUE=  
| [[Boolean]] |RETURNVALUE=  


|x1= <code>[[if]] ([[triggerActivated]] trg1) [[then]] {
|x1= <code>[[if]] ([[triggerActivated]] trg1) [[then]] {
    // Code
{{cc|code}}
};</code>|EXAMPLE1=  
};</code>|EXAMPLE1=  
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[setTriggerActivation]], [[triggerActivation]], [[triggerInterval]], [[setTriggerInterval]], [[enableSimulation]], [[simulationEnabled]] |SEEALSO=  
| [[setTriggerActivation]], [[triggerActivation]], [[triggerInterval]], [[setTriggerInterval]], [[enableSimulation]], [[simulationEnabled]] |SEEALSO=  
|  |MPBEHAVIOUR=
____________________________________________________________________________________________
}}
}}


Line 41: Line 32:
<!-- Note Section BEGIN -->
<!-- Note Section BEGIN -->
<dd class="notedate">14:50, 9 June 2015 (CEST)</dd>
<dd class="notedate">14:50, 9 June 2015 (CEST)</dd>
<dt class="note">[[]]
<dt class="note">[[User:MisterGoodson|MisterGoodson]]
<dd class="note">If trigger already activated at least once, [[triggerActivated]] will only return false if trigger is set to activate Repeatedly.<br>
<dd class="note">If trigger already activated at least once, [[triggerActivated]] will only return false if trigger is set to activate Repeatedly.<br>
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).
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).
Line 52: Line 43:
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Activators|{{uc:{{PAGENAME}}}}]]
[[Category:Command Group: Activators|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

Revision as of 19:42, 19 May 2020

Hover & click on the images for description

Description

Description:
Returns true if the trigger has been activated.
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 info.
Groups:
Uncategorised

Syntax

Syntax:
triggerActivated trigger
Parameters:
trigger: Object
Return Value:
Boolean

Examples

Example 1:
if (triggerActivated trg1) then { // code };

Additional Information

See also:
setTriggerActivationtriggerActivationtriggerIntervalsetTriggerIntervalenableSimulationsimulationEnabled

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

14:50, 9 June 2015 (CEST)
MisterGoodson
If 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).

Bottom Section