playScriptedMission: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(params)
No edit summary
Line 63: Line 63:
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on December 31, 2015 - 17:55 (UTC)</dd>
<dt class="note">[[User:SkaceKachna|SkaceKachna]]</dt>
<dd class="note">
For this command to work, you will need to<br>
<ol>
<li>call command with fromMission param (fromMission is unlisted here, it's last param and must be set to true)</li>
<li>close RscDisplayArcadeMap display (idd 26) (why? I don't have a clue, found with trial and error)</li>
<li>end mission</li>
</ol>
Debriefing will show and player will be moved to new mission after clicking on Continue.<br><br>
Following code will change change island to Stratis and spawns player as basic soldier at [0,0,0] coordinates.
<code><nowiki>playScriptedMission ['Stratis',{
createCenter west;
_grp = createGroup west;
_player = _grp createUnit ["B_Soldier_F",[0,0,0],[],0,"NONE"];
selectPlayer _player;
},missionConfigFile,true];
(findDisplay 26) closeDisplay 1;
failMission "END1";</nowiki></code>
(tested in Arma 3 1.54.133741)
</dd>
</dl>
<!-- DISCONTINUE Notes -->

Revision as of 18:55, 31 December 2015

Hover & click on the images for description

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:
Uncategorised

Syntax

Syntax:
playScriptedMission [world,expression,config,ignoreChildWindow]
Parameters:
[world,expression,config,ignoreChildWindow]: Array -
world: String
expression: Code
config (Optional): Config
ignoreChildWindow (Optional): Boolean
Return Value:
Nothing

Examples

Example 1:
playScriptedMission
[
	"desert_e",
	{
		private["_handle"];
		_handle = 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

playScriptedMission ["Chernarus",{},missionConfigFile]; Does not work.

Bottom Section

Posted on December 31, 2015 - 17:55 (UTC)
SkaceKachna
For this command to work, you will need to
  1. call command with fromMission param (fromMission is unlisted here, it's last param and must be set to true)
  2. close RscDisplayArcadeMap display (idd 26) (why? I don't have a clue, found with trial and error)
  3. end mission

Debriefing will show and player will be moved to new mission after clicking on Continue.

Following code will change change island to Stratis and spawns player as basic soldier at [0,0,0] coordinates. playScriptedMission ['Stratis',{ createCenter west; _grp = createGroup west; _player = _grp createUnit ["B_Soldier_F",[0,0,0],[],0,"NONE"]; selectPlayer _player; },missionConfigFile,true]; (findDisplay 26) closeDisplay 1; failMission "END1"; (tested in Arma 3 1.54.133741)