BIS fnc onEnd: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (1 revision)
m (Some wiki formatting)
 
(32 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{RV|type=function


{{Function|= Comments
|game1= tkoh
____________________________________________________________________________________________
|version1= 1.00


| tkoh |= Game name
|game2= arma3
|version2= 0.50


|1.00|= Game version
|gr1= Event Handlers
____________________________________________________________________________________________


| <pre>/*
|descr= Register code to be executed after mission end.
 
{{Feature|arma3|
Description:
Replaced by [[Arma 3: Mission Event Handlers#Ended|"Ended" mission event handler]].<br>
Register code to be executed after mission end.
This function now exists only because of backward compatibility.
 
}}
Parameter(s):
_this:
CODE
ARRAY - code with custom arguments in format [CODE,ARG1,ARG2,...]
NUMBER - remove code of given index
 
Returns:
NUMBER - index of onEnd code
*/
 
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_onEnd]]; --> |= Syntax
|s1= argument call [[BIS_fnc_onEnd]]


|p1= |= Parameter 1
|p1= argument: [[Code]], [[Array]] or [[Number]]:
* [[Code]] - code to be executed
* [[Array]] - code with arguments in format [code, arguments]
* [[Number]] - remove code at given index


| |= Return value
|r1= [[Number]] - index of onEnd code
____________________________________________________________________________________________


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


| |= See also
|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]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Function Group: Misc|{{uc:onEnd}}]]
[[Category:Functions|{{uc:onEnd}}]]
[[Category:{{Name|tkoh}}: Functions|{{uc:onEnd}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:onEnd}}]]

Latest revision as of 14:27, 3 August 2022

Hover & click on the images for description

Description

Description:
Register code to be executed after mission end.
Arma 3
Replaced by "Ended" mission event handler.
This function now exists only because of backward compatibility.
Execution:
call
Groups:
Event Handlers

Syntax

Syntax:
argument call BIS_fnc_onEnd
Parameters:
argument: Code, Array or Number:
  • 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