BIS fnc onLoad: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<code>([^<]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^<]*) *<\/code>" to "<code>$1$2$3</code>")
m (Text replacement - "<code>([^<]*)\{\{cc\|([^{}]+)\}\} *<\/code>" to "<code>$1// $2</code>")
Line 24: Line 24:
|x1= <code>private _codeIndex = { hint "Welcome back!"; } call BIS_fnc_onLoad;</code>
|x1= <code>private _codeIndex = { hint "Welcome back!"; } call BIS_fnc_onLoad;</code>


|x2= <code>0 call BIS_fnc_onLoad; {{cc|removes code with index 0}}</code>
|x2= <code>0 call BIS_fnc_onLoad; // removes code with index 0</code>


|seealso= [[Arma 3: Mission Event Handlers|Mission Event Handlers]] [[addMissionEventHandler]]
|seealso= [[Arma 3: Mission Event Handlers|Mission Event Handlers]] [[addMissionEventHandler]]
}}
}}

Revision as of 23:23, 12 July 2022

Hover & click on the images for description

Description

Description:
Register code to be executed after a mission load (from a save, for example).
Replaced by "loaded" mission event handler.
This function now exists only because of backward compatibility
Execution:
call
Groups:
Event Handlers

Syntax

Syntax:
parameter call BIS_fnc_onLoad
Parameters:
parameter: Code or Number:
  • Code - code to be executed on mission load
  • Number - index of code to remove
 
Return Value:
Number - index of onLoad code

Examples

Example 1:
private _codeIndex = { hint "Welcome back!"; } call BIS_fnc_onLoad;
Example 2:
0 call BIS_fnc_onLoad; // removes code with index 0

Additional Information

See also:
Mission Event Handlers addMissionEventHandler

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