BIS fnc onLoad: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
Lou Montana (talk | contribs) m (Text replacement - "_{10,} " to "") |
||
Line 1: | Line 1: | ||
{{Function|Comments= | {{Function|Comments= | ||
| tkoh |Game name= | | tkoh |Game name= | ||
Line 7: | Line 6: | ||
|gr1 = Event Handlers |GROUP1= | |gr1 = Event Handlers |GROUP1= | ||
| 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}} |Description= | This function now exists only because of backward compatibility}} |Description= | ||
| parameter call [[BIS_fnc_onLoad]] |Syntax= | | parameter call [[BIS_fnc_onLoad]] |Syntax= | ||
Line 22: | Line 19: | ||
| [[Number]] - index of onLoad code |Return value= | | [[Number]] - index of onLoad code |Return value= | ||
|x1= <code>_codeIndex = { [[hint]] "Welcome back!"; } [[call]] [[BIS_fnc_onLoad]];</code> |Example 1= | |x1= <code>_codeIndex = { [[hint]] "Welcome back!"; } [[call]] [[BIS_fnc_onLoad]];</code> |Example 1= | ||
|x2= <code>0 [[call]] [[BIS_fnc_onLoad]]; {{codecomment|// removes code with index 0}}</code> |Example 2= | |x2= <code>0 [[call]] [[BIS_fnc_onLoad]]; {{codecomment|// removes code with index 0}}</code> |Example 2= | ||
| [[Arma 3: Event Handlers/addMissionEventHandler|Mission Event Handlers]], [[addMissionEventHandler]] |See also= | | [[Arma 3: Event Handlers/addMissionEventHandler|Mission Event Handlers]], [[addMissionEventHandler]] |See also= |
Revision as of 23:49, 16 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