BIS fnc onEnd: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<code>([^<]*)\[\[[^|]+\| *([a-zA-Z= _]+) *\]\]([^<]*)<\/code>" to "<code>$1$2$3</code>")
m (Text replacement - "<code>([^<]+)<\/code>" to "<sqf>$1</sqf>")
Line 20: Line 20:
|r1= [[Number]] - index of onEnd code
|r1= [[Number]] - index of onEnd code


|x1= <code>private _onEndIndex = { player addRating 10000; } call BIS_fnc_onEnd;</code>
|x1= <sqf>private _onEndIndex = { player addRating 10000; } call BIS_fnc_onEnd;</sqf>


|x2= <code>private _onEndIndex = [{ { _x addRating 10000; } forEach _this; }, units group player] call BIS_fnc_onEnd;</code>
|x2= <sqf>private _onEndIndex = [{ { _x addRating 10000; } forEach _this; }, units group player] call BIS_fnc_onEnd;</sqf>


|seealso= [[Event Scripts]] [[Arma 3: Mission Event Handlers#Ended|Ended Mission Event Handler]]
|seealso= [[Event Scripts]] [[Arma 3: Mission Event Handlers#Ended|Ended Mission Event Handler]]
}}
}}

Revision as of 18:11, 13 July 2022

Hover & click on the images for description

Description

Description:
Register code to be executed after mission end.
Execution:
call
Groups:
Event Handlers

Syntax

Syntax:
argument call BIS_fnc_onEnd
Parameters:
argument:
  • Code - code to be executed
  • Array - code with arguments in format [code, arguments]
  • Number - remove code at given index
Return Value:
Number - index of onEnd code

Examples

Example 1:
private _onEndIndex = { player addRating 10000; } call BIS_fnc_onEnd;
Example 2:
private _onEndIndex = [{ { _x addRating 10000; } forEach _this; }, units group player] call BIS_fnc_onEnd;

Additional Information

See also:
Event Scripts Ended Mission Event Handler

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