BIS fnc onEnd: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Page filling)
m (Some wiki formatting)
 
(31 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Function|= Comments
{{RV|type=function
____________________________________________________________________________________________


| tkoh |= Game name
|game1= tkoh
|version1= 1.00


|1.00|= Game version
|game2= arma3
____________________________________________________________________________________________
|version2= 0.50


| Register code to be executed after mission end. |= Description
|gr1= Event Handlers
____________________________________________________________________________________________


| argument call [[BIS_fnc_onEnd]] |= Syntax
|descr= Register code to be executed after mission end.
{{Feature|arma3|
Replaced by [[Arma 3: Mission Event Handlers#Ended|"Ended" mission event handler]].<br>
This function now exists only because of backward compatibility.
}}


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


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


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


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


| [[Event Scripts]], [[Arma_3:_Event_Handlers/addMissionEventHandler#Ended|Ended Mission Event Handler]] |= See also
|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