hostMission: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " \| *(game[0-9]|version[0-9]|gr[0-9]|serverExec|mp|pr|descr|s[0-9]|p[0-9]{1,3}|r[0-9]|x1?[0-9]|seealso) *= +" to " |$1= ")
m (Some wiki formatting)
Line 12: Line 12:
|gr1= Multiplayer
|gr1= Multiplayer


|descr= Host the mp mission described by config class. Should be called as reaction to some UI action in some dialog.<br>
|descr= Host the multiplayer mission defined in the config class and opens the lobby with the scenario loaded. Must be called in UI action from a dialog.
For example you can start a MP scenario from a button. It creates a host and takes you to the lobby with the scenario loaded.<br>
You need to provide the display which is active when the hostMission command is called.


|s1= [[hostMission]] [pConfig, pDisplay]
|s1= [[hostMission]] [configEntry, activeDisplay]


|p1= [pConfig, pDisplay]: [[Array]]
|p1= configEntry: [[Config]]


|p2= pConfig: [[Config]]
|p2= activeDisplay: [[Display]]
 
|p3= pDisplay: [[Display]]


|r1= [[Nothing]]
|r1= [[Nothing]]


|x1= <code>[[hostMission]] [configMissionName, display];</code>
|x1= <code>[[hostMission]] [<nowiki/>[[configFile]] >> "CfgMissions" >> "MPMissions" >> _scenarioClassName, _currentlyActiveDisplay];</code>


|x2= <code>[[hostMission]] [<nowiki/>[[configFile]] >> "CfgMissions" >> "MPMissions" >> _scenarioClassName, _currentlyActiveDisplay];</code>
|x2= '''{{arma3}}:''' Launch host mission dialog from a client on dedicated server:
 
|x3= '''{{arma3}}:''' Launch host mission dialog from a client on dedicated server:
<code>[[hostMission]] [
<code>[[hostMission]] [
[[configFile]] >> "CfgMissions" >> "MPmissions" >> "MP_COOP_m01",
[[configFile]] >> "CfgMissions" >> "MPmissions" >> "MP_COOP_m01",
Line 39: Line 33:
}}
}}


<dl class="command_description">
{{Note
 
|user= kju
<dt><dt>
|timestamp= 20110103165100
<dd class="notedate">Posted on January 03, 2011</dd>
|text= The command must be called in the main menu or something similar menu it seems.
<dt class="note">[[User:kju|kju]]</dt>
}}
<dd class="note">
The command must be called in the main menu or something similar menu it seems.
 
</dl>

Revision as of 14:10, 24 November 2021

Hover & click on the images for description

Description

Description:
Host the multiplayer mission defined in the config class and opens the lobby with the scenario loaded. Must be called in UI action from a dialog.
Groups:
Multiplayer

Syntax

Syntax:
hostMission [configEntry, activeDisplay]
Parameters:
configEntry: Config
activeDisplay: Display
Return Value:
Nothing

Examples

Example 1:
hostMission [configFile >> "CfgMissions" >> "MPMissions" >> _scenarioClassName, _currentlyActiveDisplay];
Example 2:
Arma 3: Launch host mission dialog from a client on dedicated server: hostMission [ configFile >> "CfgMissions" >> "MPmissions" >> "MP_COOP_m01", findDisplay 46 ];

Additional Information

See also:
playScriptedMissionplayMission

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
kju - c
Posted on Jan 03, 2011 - 16:51 (UTC)
The command must be called in the main menu or something similar menu it seems.