playScriptedMission: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\| *((\[\[[a-zA-Z0-9_ |()]+\]\],? ?)+) * \}\}" to "|seealso= $1 }}")
m (Text replacement - "<dl class="command_description"> <dd class="notedate">" to "<dl class="command_description"> <dt></dt> <dd class="notedate">")
Line 41: Line 41:
<!-- CONTINUE Notes -->
<!-- CONTINUE Notes -->
<dl class="command_description">
<dl class="command_description">
<dt></dt>
<dd class="notedate">Posted on December 31, 2015 - 17:55 (UTC)</dd>
<dd class="notedate">Posted on December 31, 2015 - 17:55 (UTC)</dd>
<dt class="note">[[User:SkaceKachna|SkaceKachna]]</dt>
<dt class="note">[[User:SkaceKachna|SkaceKachna]]</dt>

Revision as of 13:39, 5 April 2021

Hover & click on the images for description

Description

Description:
Description needed
Groups:
System

Syntax

Syntax:
Syntax needed
Parameters:
world: String
expression: Code
config (Optional): Config
ignoreChildWindow (Optional): Boolean
Return Value:
Return value needed

Examples

Example 1:
playScriptedMission [ "desert_e", { execVM "\ca\missions_e\data\scenes\credits1\init.sqf"; }, configFile / "CfgMissions" / "Cutscenes" / "Credits" ];

Additional Information

See also:
hostMissionplayMission

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 December 31, 2015 - 17:55 (UTC)
SkaceKachna
For this command to work, you will need to:
  1. call command with ignoreChildWindow param set to true (in VBS docs its called fromMission)
  2. close any opened display (not sure about this part, but closing every display (but #0) seems to work):
    • If mission is run from 2D editor, you can just close RscDisplayArcadeMap display (idd 26) (because this was done from 2D editor, so RscDisplayArcadeMap is still active in background -- benargee)
    • If mission is run from single mission browser, you can just close RscDisplaySingleMission (idd 2)
  3. end mission
Debriefing will show and player will be moved to new mission after clicking on Continue.

Command is a bit bugged:
  • Third (config) param doesn't seem to work
  • If you run this command in mission loaded from pbo, said pbo won't be writable until you close the game (you can't update it)
Following code will change change island to Stratis and spawns player as basic soldier at [0,0,0] coordinates. disableSerialization; playScriptedMission ['Stratis', { private _grp = createGroup west; private _player = _grp createUnit ["B_Soldier_F", [0,0,0], [], 0, "NONE"]; selectPlayer _player; }, missionConfigFile, true];
// Close all displays that could be the background display ... this is essentialy forceEnd command // Closing #0 will cause game to fail _zero = findDisplay 0; { if (_x != _zero) then { _x closeDisplay 1; }; } foreach allDisplays;
failMission "END1";
(tested in Arma 3 1.54.133741)