BIS fnc onLoad: 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 | ||
| tkoh | | tkoh | ||
|1.00 | |1.00 | ||
|gr1 = Event Handlers | |gr1 = Event Handlers | ||
| Register code to be executed after a mission load (from a save, for example). | | 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> | {{Important|Replaced by [[Arma 3: Event Handlers/addMissionEventHandler#Loaded|"loaded" mission event handler]].<br> | ||
This function now exists only because of backward compatibility}} | This function now exists only because of backward compatibility}} | ||
| parameter call [[BIS_fnc_onLoad]] | | parameter call [[BIS_fnc_onLoad]] | ||
|p1= parameter: [[Code]] or [[Number]]: | |p1= parameter: [[Code]] or [[Number]]: | ||
* [[Code]] - code to be executed on mission load | * [[Code]] - code to be executed on mission load | ||
* [[Number]] - index of code to remove | * [[Number]] - index of code to remove | ||
| | ||
| [[Number]] - index of onLoad code | | [[Number]] - index of onLoad code | ||
|x1= <code>_codeIndex = { [[hint]] "Welcome back!"; } [[call]] [[BIS_fnc_onLoad]];</code> | |x1= <code>_codeIndex = { [[hint]] "Welcome back!"; } [[call]] [[BIS_fnc_onLoad]];</code> | ||
|x2= <code>0 [[call]] [[BIS_fnc_onLoad]]; {{codecomment|// removes code with index 0}}</code> | |x2= <code>0 [[call]] [[BIS_fnc_onLoad]]; {{codecomment|// removes code with index 0}}</code> | ||
| [[Arma 3: Event Handlers/addMissionEventHandler|Mission Event Handlers]], [[addMissionEventHandler]] | | [[Arma 3: Event Handlers/addMissionEventHandler|Mission Event Handlers]], [[addMissionEventHandler]] | ||
}} | }} | ||
Revision as of 23:39, 17 January 2021
Description
- Description:
- Register code to be executed after a mission load (from a save, for example).
- Execution:
- call
- Groups:
- Event Handlers
Syntax
- Syntax:
- parameter call BIS_fnc_onLoad
- Parameters:
- parameter: Code or Number:
- 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
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