BIS fnc onLoad: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\{\{( *)Important( *)\|" to "{{$1Feature$2|$2important$2|")
m (codecomment → cc)
Line 1: Line 1:
{{RV|type=function
{{RV|type=function


| tkoh
|game1= tkoh


|1.00
|version1= 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).
Line 11: Line 11:
This function now exists only because of backward compatibility}}
This function now exists only because of backward compatibility}}


| parameter call [[BIS_fnc_onLoad]]
|s1= parameter call [[BIS_fnc_onLoad]]


|p1= parameter: [[Code]] or [[Number]]:
|p1= parameter: [[Code]] or [[Number]]:
Line 18: Line 18:
 
 


| [[Number]] - index of onLoad code
|r1= [[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]]; {{cc|removes code with index 0}}</code>


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


[[Category:{{Name|tkoh}}: Functions|{{uc:onLoad}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:onLoad}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:onLoad}}]]

Revision as of 17:57, 7 February 2021

Hover & click on the images for description

Description

Description:
Description needed
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:
_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