BIS fnc runLater: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Generated by BIS_fnc_exportFunctionsToWiki)
 
(Created page with "{{Function|= Comments ____________________________________________________________________________________________ | arma3 |= Game name |1.14|= Game version ________________...")
Line 1: Line 1:
{{Function|= Comments
{{Function|= Comments
____________________________________________________________________________________________
____________________________________________________________________________________________
Line 5: Line 4:
| arma3 |= Game name
| arma3 |= Game name


|1.00|= Game version
|1.14|= Game version
____________________________________________________________________________________________
 
| Stack code/function that should be run later, after some time/frames or/and custom condition |= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


| <pre>/*
| param call [[BIS_fnc_loop]]; |= Syntax
Description:
Run some code later
Delay can be in seconds, frames and/or custom condition
Code and conditions are executed in non-schedule environment
Parameters:
_this select 0: Unique id
_this select 1: Code/function that is executed later
_this select 2: The timer value (can be in seconds or frames)
_this select 3: The timer type, can be "seconds" or "frames"
_this select 4: The custom condition, code is only executed if timer is validated and condition is met
Returns:
NOTHING
Examples:
["uniqueId", { hint str time; }, 5] call BIS_fnc_runLater; //Hints current game time in the next frame after 5 seconds have passed
["uniqueId", { hint str time; }, 120, "frames"] call BIS_fnc_runLater; //Hints current game time in the next frame after 120 frames have passed
["uniqueId", { hint str time; }, nil, nil, { !isNil { BIS_variable } }] call BIS_fnc_runLater; //Hints current game time in the next frame after BIS_variable is assigned
["uniqueId", { hint str time; }, 5, "seconds", { !isNil { BIS_variable } }] call BIS_fnc_runLater; //Hints current game time in the next frame after 5 seconds have passed and BIS_variable is assigned
["uniqueId", { hint str time; }] call BIS_fnc_runLater; //Hints current game time in the next frame
*/


//Parameters
|p1= Unique Id : [[String]] |= Parameter 1
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
|p2= Code/function that is executed later : [[Code, String]] |= Parameter 2
|p3= The timer value (can be in seconds or frames) : [[Number]] |= Parameter 3
|p4= The timer type, can be "seconds" or "frames" : [[String]] |= Parameter 4
|p5= The custom condition, code is only executed if timer is validated and condition is met : [[Code]] |= Parameter 5
 
| [[Nothing]] |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________
 
|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> |=


| <!-- [] call [[BIS_fnc_runLater]]; --> |= Syntax
|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> |=  


|p1= |= Parameter 1
|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> |=  


| |= Return value
|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> |=  


|x1= <code></code> |=  
|x5= <code>//Hints current game time in the next frame
____________________________________________________________________________________________
["uniqueId", { hint str time; }] call BIS_fnc_runLater;</code> |=  
_______________________________________________________________________________________


| |= See also
| |= See also
Line 59: Line 49:


<h3 style="display:none">Bottom Section</h3>
<h3 style="display:none">Bottom Section</h3>
[[Category:Function Group: Misc|{{uc:runLater}}]]
 
[[Category:Functions|{{uc:runLater}}]]
[[Category:Arma 3:_Functions|log]]
[[Category:{{Name|arma3}}: Functions|{{uc:runLater}}]]
[[Category:Take_On_Helicopters:_Functions|log]]
[[Category:Function Group: Debug|log]]

Revision as of 12:49, 24 March 2014

Hover & click on the images for description

Description

Description:
Stack code/function that should be run later, after some time/frames or/and custom condition
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
param call BIS_fnc_loop;
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

Notes

Bottom Section