BIS fnc onLoad: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Generated by BIS_fnc_exportFunctionsToWiki)
 
m (Text replacement - "<code>([^<]+)<\/code>" to "<sqf>$1</sqf>")
 
(29 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{RV|type=function


{{Function|= Comments
|game1= tkoh
____________________________________________________________________________________________
|version1= 1.00


| tkoh |= Game name
|game2= arma3
|version2= 0.50


|1.00|= Game version
|gr1= Event Handlers
____________________________________________________________________________________________


| <pre>/*
|descr= Register code to be executed after a mission load (from a save, for example).
{{Feature|important|Replaced by [[Arma 3: Mission Event Handlers#Loaded|"loaded" mission event handler]].<br>
This function now exists only because of backward compatibility}}


Description:
|s1= parameter call [[BIS_fnc_onLoad]]
Register code to be executed after mission load.
Replaced by "loaded" mission event handler, function now exists only because of backward compatibility


Parameter(s):
|p1= parameter: [[Code]] or [[Number]]:
_this:
* [[Code]] - code to be executed on mission load
CODE
* [[Number]] - index of code to remove
NUMBER - remove code of given index
&nbsp;


Returns:
|r1= [[Number]] - index of onLoad code
NUMBER - index of onLoad code
*/


</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
|x1= <sqf>private _codeIndex = { hint "Welcome back!"; } call BIS_fnc_onLoad;</sqf>
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_onLoad]]; --> |= Syntax
|x2= <sqf>0 call BIS_fnc_onLoad; // removes code with index 0</sqf>
 
|p1= |= Parameter 1
 
| |= Return value
____________________________________________________________________________________________
 
|x1= <code></code> |=
____________________________________________________________________________________________
 
| |= See also


|seealso= [[Arma 3: Mission Event Handlers|Mission Event Handlers]] [[addMissionEventHandler]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Function Group: Misc|{{uc:onLoad}}]]
[[Category:Functions|{{uc:onLoad}}]]
[[Category:{{Name|tkoh}}: Functions|{{uc:onLoad}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:onLoad}}]]

Latest revision as of 17:11, 13 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