playScriptedMission: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "_{10,} " to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...) |
||
Line 1: | Line 1: | ||
{{Command | {{Command | ||
| arma2 | | arma2 | ||
|1.00 | |1.00 | ||
|gr1= System | |gr1= System | ||
| Load the given world, launch an empty mission, and execute the given expression. | | Load the given world, launch an empty mission, and execute the given expression. | ||
Config (optional) can reference to the config entry, replacing [[Description.ext]] for this mission. | Config (optional) can reference to the config entry, replacing [[Description.ext]] for this mission. | ||
| '''playScriptedMission''' [world, expression, config, ignoreChildWindow] | | '''playScriptedMission''' [world, expression, config, ignoreChildWindow] | ||
|p1= world: [[String]] | |p1= world: [[String]] | ||
|p2= expression: [[Code]] | |p2= expression: [[Code]] | ||
|p3= config (Optional): [[Config]] | |p3= config (Optional): [[Config]] | ||
|p4= ignoreChildWindow (Optional): [[Boolean]] | |p4= ignoreChildWindow (Optional): [[Boolean]] | ||
| [[Nothing]] | | [[Nothing]] | ||
|x1= <code>[[playScriptedMission]] | |x1= <code>[[playScriptedMission]] | ||
Line 30: | Line 30: | ||
[[configFile]] / "CfgMissions" / "Cutscenes" / "Credits" | [[configFile]] / "CfgMissions" / "Cutscenes" / "Credits" | ||
]; | ]; | ||
</code> | </code> | ||
| [[hostMission]], [[playMission]] | | [[hostMission]], [[playMission]] | ||
}} | }} | ||
Revision as of 01:20, 18 January 2021
Description
- Description:
- Load the given world, launch an empty mission, and execute the given expression. Config (optional) can reference to the config entry, replacing Description.ext for this mission.
- Groups:
- System
Syntax
- Syntax:
- playScriptedMission [world, expression, config, ignoreChildWindow]
- Parameters:
- world: String
- expression: Code
- config (Optional): Config
- ignoreChildWindow (Optional): Boolean
- Return Value:
- Nothing
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
Notes
Bottom Section
- Posted on December 31, 2015 - 17:55 (UTC)
- SkaceKachna
-
For this command to work, you will need to:
- call command with ignoreChildWindow param set to true (in VBS docs its called fromMission)
- 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)
- end mission
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)
disableSerialization; playScriptedMission ['Stratis', { private _grp = createGroup west; private _player = _grp createUnit ["B_Soldier_F", [0,0,0], [], 0, "NONE"]; selectPlayer _player; }, missionConfigFile, true];
(tested in Arma 3 1.54.133741)
// 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";