BIS fnc endMission: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Added note to description)
m (Some wiki formatting)
 
(42 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Function|= Comments
{{TabView
____________________________________________________________________________________________


| arma3 |= Game name
|selected= 2


|0.50|= Game version
|title1= {{TabView/GameTitle|tkoh}}
|content1=
{{RV|type=function


|eff= local |=
|game1= tkoh
____________________________________________________________________________________________
|version1= 1.00


| Ends mission with a fade effect.<br>
|eff= local
{{Feature arma3|This should always be used instead of the simple end1-end_n endings one can set on trigger activation.<br>Otherwise singleplayer scenarios will not properly be marked as played/ ended in Arma 3 and on Steam!}}|= Description
____________________________________________________________________________________________


| [endName,isVictory,fadeType,playMusic,completeTasks] [[spawn]] [[BIS_fnc_endMission]]; |= Syntax
|gr1= Missions


|p1= '''endName''' (Opional): <br/>[[String]] - end type, as used in [[endMission]] command (default: "end1") <br/>[[Array]] - in format [endName,ID], will be composed to "endName_ID" string |=
|descr= Ends mission with the specified ending. Always ends with a 4 seconds black out effect.
|p2= '''isVictory''' (Opional): [[Boolean]] - true to successful end, false for failed end (default: true) |=
{{Feature|informative|''nextMission'' and ''endingId'' parameters are assembled together to define which ending is called, in format {{hl|nextMission_endType}}.}}
|p3= '''fadeType''' (Optional): [[Boolean]] or [[Number]] - true for signature [[Debriefing|closing shot]]. When number, simple fade to black of given duration is used. |=
|p4= '''playMusic''' (Optional): [[Boolean]] - false to disable automatic music during [[Debriefing|closing shot]]. (default: true) |=
|p5= '''completeTasks''' (Optional): [[Boolean]] - true to cancel all pending tasks. (default: false) |=


| [[Boolean]] |= Return value
|s1= [nextMission, endingId, displayText, isSuccess, code] call [[BIS_fnc_endMission]]
____________________________________________________________________________________________
 
|x1= <code>"end1" [[call]] [[BIS_fnc_endMission]];</code> |=


|x2= <code><nowiki>[</nowiki>"epicFail",[[false]],2] [[call]] [[BIS_fnc_endMission]];</code> |=
|p1= nextMission: [[String]] - (Optional, default [[worldName]])
____________________________________________________________________________________________


| [[Debriefing]] |= See also
|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= <sqf>["mission2", 1, "You won"] call BIS_fnc_endMission; // endMission "mission2_1"</sqf>
|x2= <sqf>["mission2", 1, "You lose", false] call BIS_fnc_endMission; // failMission "mission2_1"</sqf>
|seealso= [[Debriefing]] [[endMission]] [[failMission]]
}}
}}


<h3 style="display:none">Notes</h3>
|title2= {{TabView/GameTitle|arma3}}
<dl class="command_description">
|content2=
<!-- Note Section BEGIN -->
{{RV|type=function
 
|game1= arma3
|version1= 0.50
 
|eff= local
 
|gr1= Missions
 
|descr= Ends mission with a signature shot or a fade effect, marks it finished for Steam and activates a key in format <sqf inline>activateKey format ["BIS_%1.%2_done", missionName, worldName];</sqf>.


<!-- Note Section END -->
{{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!}}
</dl>


<h3 style="display:none">Bottom Section</h3>
|s1= [endName, isVictory, fadeType, playMusic, cancelTasks] call [[BIS_fnc_endMission]]
[[Category:Function Group: Misc|{{uc:endMission}}]]
[[Category:Functions|{{uc:endMission}}]]
[[Category:{{Name|tkoh}}: Functions|{{uc:endMission}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:endMission}}]]


<!-- CONTINUE Notes -->
|p1= endName (Optional, default "end1"):
<dl class="command_description">
* [[String]] - end type from <sqf inline>configFile >> "CfgDebriefing"</sqf>. Same as with [[endMission]] and [[failMission]]
<dd class="notedate">Posted on March 21, 2016 - 11:12 (UTC)</dd>
* [[Array]] - in format [endName, ID], will be composed to "endName_ID" string
<dt class="note">[[User:Revo|Revo]]</dt>
 
<dd class="note">
|p2= isVictory: [[Boolean]] - (Optional, default [[true]]) [[true]] for successful end, false for failed end
To end a mission properly on a server, use [[BIS_fnc_endMissionServer]] instead
 
</dd>
|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
</dl>
 
<!-- DISCONTINUE Notes -->
|p4= playMusic: [[Boolean]] - (Optional, default [[true]]) [[false]] to disable automatic music during [[Debriefing|closing shot]]
 
|p5= cancelTasks: [[Boolean]] - (Optional, default [[false]]) [[true]] to cancel all pending tasks
 
|r1= [[Boolean]]
 
|x1= <sqf>"end1" call BIS_fnc_endMission;</sqf>
 
|x2= <sqf>["epicFail", false, 2] call BIS_fnc_endMission;</sqf>
 
|seealso= [[BIS_fnc_endMissionServer]] [[Debriefing]] [[endMission]] [[markAsFinishedOnSteam]]
}}
 
}}
 
{{Note
|user= R3vo
|timestamp= 20160321111200
|text= To end a multiplayer mission one can use <sqf inline>["end1", true] remoteExecCall ["BIS_fnc_endMission"];</sqf> - see also [[BIS_fnc_endMissionServer]].
}}

Latest revision as of 01:44, 22 May 2023

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:
Debriefing endMission failMission

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: Boolean - (Optional, default false) 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_endMissionServer Debriefing endMission markAsFinishedOnSteam

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