BIS fnc runLater: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " <h3 style="display:none">Notes</h3> <dl class="command_description"> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl> " to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments \("local" or "global"\)|Multiplayer Effects \("local" or "global"\)|Multiplayer Execution \("server" o...) |
||
Line 1: | Line 1: | ||
{{Function | {{Function | ||
| arma3 | | arma3 | ||
|1.16 | |1.16 | ||
|gr1 = Program Flow | |gr1 = Program Flow | ||
| Stack code/function that should be run later, after some time/frames or/and custom condition. | | Stack code/function that should be run later, after some time/frames or/and custom condition. | ||
| param call [[BIS_fnc_runLater]]; | | param call [[BIS_fnc_runLater]]; | ||
|p1= Unique Id : [[String]] | |p1= Unique Id : [[String]] | ||
|p2= Code/function that is executed later : [<nowiki/>[[Code]], [[String]]<nowiki>]</nowiki> | |p2= Code/function that is executed later : [<nowiki/>[[Code]], [[String]]<nowiki>]</nowiki> | ||
|p3= The timer value (can be in seconds or frames) : [[Number]] | |p3= The timer value (can be in seconds or frames) : [[Number]] | ||
|p4= The timer type, can be "seconds" or "frames" : [[String]] | |p4= The timer type, can be "seconds" or "frames" : [[String]] | ||
|p5= The custom condition, code is only executed if timer is validated and condition is met : [[Code]] | |p5= The custom condition, code is only executed if timer is validated and condition is met : [[Code]] | ||
| [[Nothing]] | | [[Nothing]] | ||
|x1= <code>//Hints current game time in the next frame after 5 seconds have passed | |x1= <code>//Hints current game time in the next frame after 5 seconds have passed | ||
["uniqueId", { hint str time; }, 5] call BIS_fnc_runLater;</code> | ["uniqueId", { hint str time; }, 5] call BIS_fnc_runLater;</code> | ||
|x2= <code>//Hints current game time in the next frame after 120 frames have passed | |x2= <code>//Hints current game time in the next frame after 120 frames have passed | ||
["uniqueId", { hint str time; }, 120, "frames"] call BIS_fnc_runLater;</code> | ["uniqueId", { hint str time; }, 120, "frames"] call BIS_fnc_runLater;</code> | ||
|x3= <code>//Hints current game time in the next frame after BIS_variable is assigned | |x3= <code>//Hints current game time in the next frame after BIS_variable is assigned | ||
["uniqueId", { hint str time; }, nil, nil, { !isNil { BIS_variable } }] call BIS_fnc_runLater;</code> | ["uniqueId", { hint str time; }, nil, nil, { !isNil { BIS_variable } }] call BIS_fnc_runLater;</code> | ||
|x4= <code>//Hints current game time in the next frame after 5 seconds have passed and BIS_variable is assigned | |x4= <code>//Hints current game time in the next frame after 5 seconds have passed and BIS_variable is assigned | ||
["uniqueId", { hint str time; }, 5, "seconds", { !isNil { BIS_variable } }] call BIS_fnc_runLater;</code> | ["uniqueId", { hint str time; }, 5, "seconds", { !isNil { BIS_variable } }] call BIS_fnc_runLater;</code> | ||
|x5= <code>//Hints current game time in the next frame | |x5= <code>//Hints current game time in the next frame | ||
["uniqueId", { hint str time; }] call BIS_fnc_runLater;</code> | ["uniqueId", { hint str time; }] call BIS_fnc_runLater;</code> | ||
| | | | ||
}} | }} |
Revision as of 23:49, 17 January 2021
Description
- Description:
- Stack code/function that should be run later, after some time/frames or/and custom condition.
- Execution:
- call
- Groups:
- Program Flow
Syntax
- Syntax:
- param call BIS_fnc_runLater;
- Parameters:
- Unique Id : String
- Code/function that is executed later : [Code, String]
- The timer value (can be in seconds or frames) : Number
- The timer type, can be "seconds" or "frames" : String
- The custom condition, code is only executed if timer is validated and condition is met : Code
- Return Value:
- Nothing
Examples
- Example 1:
//Hints current game time in the next frame after 5 seconds have passed ["uniqueId", { hint str time; }, 5] call BIS_fnc_runLater;
- Example 2:
//Hints current game time in the next frame after 120 frames have passed ["uniqueId", { hint str time; }, 120, "frames"] call BIS_fnc_runLater;
- Example 3:
//Hints current game time in the next frame after BIS_variable is assigned ["uniqueId", { hint str time; }, nil, nil, { !isNil { BIS_variable } }] call BIS_fnc_runLater;
- Example 4:
//Hints current game time in the next frame after 5 seconds have passed and BIS_variable is assigned ["uniqueId", { hint str time; }, 5, "seconds", { !isNil { BIS_variable } }] call BIS_fnc_runLater;
- Example 5:
//Hints current game time in the next frame ["uniqueId", { hint str time; }] call BIS_fnc_runLater;
Additional Information
- See also:
- See also needed
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