BIS fnc onLoad: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (1 revision)
(Page filling)
Line 1: Line 1:
{{Function|= Comments
{{Function|= Comments
____________________________________________________________________________________________
____________________________________________________________________________________________


| tkoh |= Game name
| tkoh |Game name=


|1.00|= Game version
|1.00|Game version=
____________________________________________________________________________________________
____________________________________________________________________________________________


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


Parameter(s):
| parameter call [[BIS_fnc_onLoad]] |Syntax=
_this:
CODE
NUMBER - remove code of given index


Returns:
|p1= parameter: [[Code]] or [[Number]]:
NUMBER - index of onLoad code
* [[Code]] - code to be executed on mission load
*/
* [[Number]] - index of code to remove
&nbsp; |Parameter 1=


</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
| [[Number]] - index of onLoad code |Return value=
____________________________________________________________________________________________
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_onLoad]]; --> |= Syntax
|x1= <code>_codeIndex = { [[hint]] "Welcome back!"; } [[call]] [[BIS_fnc_onLoad]];</code> |Example 1=


|p1= |= Parameter 1
|x2= <code>0 [[call]] [[BIS_fnc_onLoad]]; {{codecomment|// removes code with index 0}}</code> |Example 2=
 
| |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code></code> |=
| [[Arma 3: Event Handlers/addMissionEventHandler|Mission Event Handlers]], [[addMissionEventHandler]] |See also=
____________________________________________________________________________________________
 
| |= See also
 
}}
}}



Revision as of 14:50, 29 May 2018

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:
Uncategorised

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:
_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 HandlersaddMissionEventHandler

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