BIS fnc endMission: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\|s([0-9])= ([^ ]+) (\[\[call\]\]) ([^ ]+) " to "|s$1= $2 call $4 ")
(Add TKOH version)
Line 1: Line 1:
{{Template:TabView
|selected= 2
|title1= {{Icon|tkoh|24|link=}} {{tkoh}}
|content1=
{{RV|type=function
|game1= tkoh
|version1= 1.00
|eff= local
|gr1= Missions
|descr= Ends mission with the specified ending. Always ends with a 4 seconds black out effect.
{{Feature|informative|''nextMission'' and ''endingId'' parameters are assembled together to define which ending is called, in format <tt>nextMission_endType</tt>.}}
|s1= [nextMission, endingId, displayText, isSuccess, code] call [[BIS_fnc_endMission]]
|p1= nextMission: [[String]] - (Optional, default [[worldName]])
|p2= endingId: [[Number]] - (Optional, default 1)
|p3= displayText: [[String]] - (Optional, default "") text displayed on black out
|p4= isSuccess: [[Boolean]] - (Optional, default [[true]]) [[true]] to [[endMission]], [[false]] to [[failMission]]
|p5= successCode: [[Code]] - code executed right before mission ends, only if ''isSuccess'' is set to [[true]]
|r1= [[Boolean]]
|x1= <code>["mission2", 1, "You won"] [[call]] [[BIS_fnc_endMission]]; {{cc|[[endMission]] "mission2_1"}}</code>
|x2= <code>["mission2", 1, "You lose", [[false]]] [[call]] [[BIS_fnc_endMission]]; {{cc|[[failMission]] "mission2_1"}}</code>
|seealso= [[Debriefing]], [[endMission]], [[failMission]]
}}
|title2= {{Icon|arma3|24|link=}} {{arma3}}
|content2=
{{RV|type=function
{{RV|type=function


|game1= arma3
|game1= arma3
|version1= 0.50
|version1= 0.50
|game2= tkoh
|version2= 1.00


|eff= local
|eff= local
Line 11: Line 49:
|gr1= Missions
|gr1= Missions


|descr= Ends mission with a fade effect, marks it finished for Steam and activates a key in format {{ic|[[activateKey]] [[format]] ["BIS_%1.%2_done", [[missionName]], [[worldName]]];}}. See [[Debriefing]] for more information. This should always be used instead of the simple <tt>end1-end_n</tt> endings one can set on trigger activation.<br>Otherwise singleplayer scenarios will not properly be marked as played/finished in Arma 3 and on Steam! See [[markAsFinishedOnSteam]].
|descr= Ends mission with a signature shot or a fade effect, marks it finished for Steam and activates a key in format {{ic|[[activateKey]] [[format]] ["BIS_%1.%2_done", [[missionName]], [[worldName]]];}}.


|s1= [endName, isVictory, fadeType, playMusic, cancelTasks] call [[BIS_fnc_endMission]] |= Syntax
{{Feature|important|This function should always be used instead of the simple [[endMission]]/[[failMission]] commands or trigger endings; otherwise, singleplayer scenarios will not properly be marked as played/finished in the game and on Steam!}}
 
|s1= [endName, isVictory, fadeType, playMusic, cancelTasks] call [[BIS_fnc_endMission]]


|p1= endName (Optional, default "end1"):
|p1= endName (Optional, default "end1"):
* [[String]] - End type from {{ic|[[configfile]] >> "CfgDebriefing"}}. Same as with [[endMission]] and [[failMission]]
* [[String]] - End type from {{ic|[[configfile]] >> "CfgDebriefing"}}. Same as with [[endMission]] and [[failMission]]
* [[Array]] - In format [endName, ID], will be composed to "endName_ID" string
* [[Array]] - In format [endName, ID], will be composed to "endName_ID" string
|p2= isVictory: [[Boolean]] - (Optional, default [[true]]) [[true|True]] for successful end, false for failed end
|p2= isVictory: [[Boolean]] - (Optional, default [[true]]) [[true|True]] for successful end, false for failed end
|p3= fadeType: [[Boolean]] or [[Number]] - (Optional, default [[true]]) true for signature [[Debriefing|closing shot]]. When number, simple fade to black of given duration is used
|p3= fadeType: [[Boolean]] or [[Number]] - (Optional, default [[true]]) true for signature [[Debriefing|closing shot]]. When number, simple fade to black of given duration is used
|p4= playMusic: [[Boolean]] - (Optional, default [[true]]) [[false|False]] to disable automatic music during [[Debriefing|closing shot]]
|p4= playMusic: [[Boolean]] - (Optional, default [[true]]) [[false|False]] to disable automatic music during [[Debriefing|closing shot]]
|p5= cancelTasks: (Optional, default [[false]]): [[Boolean]] - [[true|True]] to cancel all pending tasks
|p5= cancelTasks: (Optional, default [[false]]): [[Boolean]] - [[true|True]] to cancel all pending tasks


Line 27: Line 71:
|x1= <code>"end1" [[call]] [[BIS_fnc_endMission]];</code>
|x1= <code>"end1" [[call]] [[BIS_fnc_endMission]];</code>


|x2= <code><nowiki>[</nowiki>"epicFail", [[false]], 2] [[call]] [[BIS_fnc_endMission]];</code>
|x2= <code>["epicFail", [[false]], 2] [[call]] [[BIS_fnc_endMission]];</code>


|seealso= [[BIS_fnc_endMissionServer]], [[Debriefing]], [[endMission]], [[markAsFinishedOnSteam]]
|seealso= [[BIS_fnc_endMissionServer]], [[Debriefing]], [[endMission]], [[markAsFinishedOnSteam]]
}}
}}
}}


Line 37: Line 83:
<dd class="notedate">Posted on March 21, 2016 - 11:12 (UTC)</dd>
<dd class="notedate">Posted on March 21, 2016 - 11:12 (UTC)</dd>
<dt class="note">[[User:R3vo|R3vo]]</dt>
<dt class="note">[[User:R3vo|R3vo]]</dt>
<dd class="note">
<dd class="note">To end a multiplayer mission one can use {{ic|["end1", [[true]]] [[remoteExecCall]] ["[[BIS_fnc_endMission]]", 0];}} - see also [[BIS_fnc_endMissionServer]].</dd>
To end a multiplayer mission one can use {{ic|["end1", [[true]]<nowiki>]</nowiki> [[remoteExecCall]] ["[[BIS_fnc_endMission]]", 0];}} or [[BIS_fnc_endMissionServer]].
</dd>


</dl>
</dl>

Revision as of 20:35, 21 August 2021

tkoh logo small.png Take On Helicopters
Arma 3 logo black.png Arma 3
Hover & click on the images for description

Description

Description:
Ends mission with the specified ending. Always ends with a 4 seconds black out effect.
nextMission and endingId parameters are assembled together to define which ending is called, in format nextMission_endType.
Execution:
call
Groups:
Missions

Syntax

Syntax:
[nextMission, endingId, displayText, isSuccess, code] call BIS_fnc_endMission
Parameters:
nextMission: String - (Optional, default worldName)
endingId: Number - (Optional, default 1)
displayText: String - (Optional, default "") text displayed on black out
isSuccess: Boolean - (Optional, default true) true to endMission, false to failMission
successCode: Code - code executed right before mission ends, only if isSuccess is set to true
Return Value:
Boolean

Examples

Example 1:
["mission2", 1, "You won"] call BIS_fnc_endMission; // endMission "mission2_1"
Example 2:
["mission2", 1, "You lose", false] call BIS_fnc_endMission; // failMission "mission2_1"

Additional Information

See also:
DebriefingendMissionfailMission

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
Hover & click on the images for description

Description

Description:
Ends mission with a signature shot or a fade effect, marks it finished for Steam and activates a key in format activateKey format ["BIS_%1.%2_done", missionName, worldName];.
This function should always be used instead of the simple endMission/failMission commands or trigger endings; otherwise, singleplayer scenarios will not properly be marked as played/finished in the game and on Steam!
Execution:
call
Groups:
Missions

Syntax

Syntax:
[endName, isVictory, fadeType, playMusic, cancelTasks] call BIS_fnc_endMission
Parameters:
endName (Optional, default "end1"):
isVictory: Boolean - (Optional, default true) True for successful end, false for failed end
fadeType: Boolean or Number - (Optional, default true) true for signature closing shot. When number, simple fade to black of given duration is used
playMusic: Boolean - (Optional, default true) False to disable automatic music during closing shot
cancelTasks: (Optional, default false): Boolean - True to cancel all pending tasks
Return Value:
Boolean

Examples

Example 1:
"end1" call BIS_fnc_endMission;
Example 2:
["epicFail", false, 2] call BIS_fnc_endMission;

Additional Information

See also:
BIS_fnc_endMissionServerDebriefingendMissionmarkAsFinishedOnSteam

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
Posted on March 21, 2016 - 11:12 (UTC)
R3vo
To end a multiplayer mission one can use ["end1", true] remoteExecCall ["BIS_fnc_endMission", 0]; - see also BIS_fnc_endMissionServer.