triggerTimeoutCurrent: Difference between revisions

From Bohemia Interactive Community
m (Text replacement - ">Posted on November ([0-9]{2})[ a-zA-Z]*, ([0-9]{4})" to ">Posted on $2-11-$1")
m (Some wiki formatting)
 
Line 10: Line 10:
|descr= Returns current timeout of the given trigger or -1 if countdown is not in progress.  
|descr= Returns current timeout of the given trigger or -1 if countdown is not in progress.  


{{Feature | important | The trigger could be [[Multiplayer Scripting#Locality|local]] or remote but the result returned by this command will be for the current trigger timeout local to the client that executed the command. See [[createTrigger]] for more info.}}
{{Feature|important|
The trigger could be [[Multiplayer Scripting#Locality|local]] or remote but the result returned by this command will be for the current trigger timeout local to the client that executed the command.
See [[createTrigger]] for more info.
}}


|s1= [[triggerTimeoutCurrent]] trigger
|s1= [[triggerTimeoutCurrent]] trigger
Line 18: Line 21:
|r1= [[Number]] - time remaining before trigger activation.
|r1= [[Number]] - time remaining before trigger activation.


|x1= <sqf>private _remaining = triggerTimeoutCurrent _trigger;</sqf>
|x1= <sqf>_remaining = triggerTimeoutCurrent _trigger;</sqf>


|seealso= [[triggerTimeout]] [[setTriggerTimeout]] [[waypointTimeoutCurrent]]
|seealso= [[triggerTimeout]] [[setTriggerTimeout]] [[waypointTimeoutCurrent]]
}}
}}


<dl class="command_description">
{{Note
 
|user= Killzone_Kid
<dt></dt>
|timestamp= 20131126121600
<dd class="notedate">Posted on 2013-11-26</dd>
|text= Triggers have their own schedule. If you create a trigger with timeout and try to read [[triggerTimeoutCurrent]] immediately it will return -1.
<dt class="note">[[User:Killzone_Kid|Killzone_Kid]]</dt>
This is because the countdown will not start until the next scheduled trigger check is due, and this could take up to 0.5 seconds.
<dd class="note">
}}
Triggers have their own schedule. If you create a trigger with timeout and try to read [[triggerTimeoutCurrent]] immediately it will return -1. This is because the countdown will not start until the next scheduled trigger check is due, and this could take up to 0.5 seconds.
 
</dl>

Latest revision as of 10:15, 1 September 2025

Hover & click on the images for description

Description

Description:
Returns current timeout of the given trigger or -1 if countdown is not in progress.
The trigger could be local or remote but the result returned by this command will be for the current trigger timeout local to the client that executed the command. See createTrigger for more info.
Groups:
Triggers

Syntax

Syntax:
triggerTimeoutCurrent trigger
Parameters:
trigger: Object - trigger object
Return Value:
Number - time remaining before trigger activation.

Examples

Example 1:
_remaining = triggerTimeoutCurrent _trigger;

Additional Information

See also:
triggerTimeout setTriggerTimeout waypointTimeoutCurrent

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
Killzone_Kid - c
Posted on Nov 26, 2013 - 12:16 (UTC)
Triggers have their own schedule. If you create a trigger with timeout and try to read triggerTimeoutCurrent immediately it will return -1. This is because the countdown will not start until the next scheduled trigger check is due, and this could take up to 0.5 seconds.