getClientState: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "|= Game version" to "|Game version=") |
Lou Montana (talk | contribs) m (Fix Category:Pages using duplicate arguments in template calls and fix table) |
||
Line 7: | Line 7: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| Returns client state in network game. Works on both, client and dedicated server. The following states are possible: | | Returns client state in network game. Works on both, client and dedicated server. The following states are possible: | ||
{{{!}} class{{=}}"bikitable" | |||
! [[getClientStateNumber]] | |||
! [[getClientState]] | |||
! Description | |||
{{!}}- | |||
{{!}} 0 {{!}}{{!}} "NONE" {{!}}{{!}} No client (or singleplayer) | |||
{{!}}- | |||
{{!}} 1 {{!}}{{!}} "CREATED" {{!}}{{!}} Client is created | |||
{{!}}- | |||
{{!}} 2 {{!}}{{!}} "CONNECTED" {{!}}{{!}} Client is connected to server, message formats are registered | |||
{{!}}- | |||
{{!}} 3 {{!}}{{!}} "LOGGED IN" {{!}}{{!}} Identity is created | |||
{{!}}- | |||
{{!}} 4 {{!}}{{!}} "MISSION SELECTED" {{!}}{{!}}Mission is selected | |||
{{!}}- | |||
{{!}} 5 {{!}}{{!}} "MISSION ASKED" {{!}}{{!}} Server was asked to send / not send mission | |||
{{!}}- | |||
{{!}} 6 {{!}}{{!}} "ROLE ASSIGNED" {{!}}{{!}} Role was assigned (and confirmed) | |||
{{!}}- | |||
{{!}} 7 {{!}}{{!}} "MISSION RECEIVED" {{!}}{{!}} Mission received | |||
{{!}}- | |||
{{!}} 8 {{!}}{{!}} "GAME LOADED" {{!}}{{!}} Island loaded, vehicles received | |||
{{!}}- | |||
{{!}} 9 {{!}}{{!}} "BRIEFING SHOWN" {{!}}{{!}} Briefing was displayed | |||
{{!}}- | |||
{{!}} 10 {{!}}{{!}} "BRIEFING READ" {{!}}{{!}} Ready to play mission | |||
{{!}}- | |||
{{!}} 11 {{!}}{{!}} "GAME FINISHED" {{!}}{{!}} Game was finished | |||
{{!}}- | |||
{{!}} 12 {{!}}{{!}} "DEBRIEFING READ" {{!}}{{!}} Debriefing read, ready to continue with next mission | |||
{{!}}} | |||
|DESCRIPTION= | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| | | [[getClientState]] |SYNTAX= | ||
| [[String]] - Client state (see table above) | | [[String]] - Client state (see table above) |RETURNVALUE= | ||
| | |x1= <code>_state = [[getClientState]];</code>|EXAMPLE1= | ||
|x2= <code>[[if]] ([[getClientState]] == "BRIEFING READ") [[then]] {[[hint]] "Let the show begin!"};</code>|EXAMPLE2= | |||
|x2= <code>[[if]] ([[getClientState]] == "BRIEFING READ") [[then]] {[[hint]] "Let the show begin!"};</code>| | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| [[getClientStateNumber]], [[getPlayerUID]] |SEEALSO= | | [[getClientStateNumber]], [[getPlayerUID]] |SEEALSO= | ||
| |MPBEHAVIOUR= | | |MPBEHAVIOUR= | ||
}} | }} | ||
Line 93: | Line 65: | ||
<h3 style='display:none'>Bottom Section</h3> | <h3 style='display:none'>Bottom Section</h3> | ||
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]] | [[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]] | ||
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]] | [[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]] |
Revision as of 22:48, 1 November 2019
Description
- Description:
- Returns client state in network game. Works on both, client and dedicated server. The following states are possible:
getClientStateNumber getClientState Description 0 "NONE" No client (or singleplayer) 1 "CREATED" Client is created 2 "CONNECTED" Client is connected to server, message formats are registered 3 "LOGGED IN" Identity is created 4 "MISSION SELECTED" Mission is selected 5 "MISSION ASKED" Server was asked to send / not send mission 6 "ROLE ASSIGNED" Role was assigned (and confirmed) 7 "MISSION RECEIVED" Mission received 8 "GAME LOADED" Island loaded, vehicles received 9 "BRIEFING SHOWN" Briefing was displayed 10 "BRIEFING READ" Ready to play mission 11 "GAME FINISHED" Game was finished 12 "DEBRIEFING READ" Debriefing read, ready to continue with next mission - Groups:
- Uncategorised
Syntax
- Syntax:
- getClientState
- Return Value:
- String - Client state (see table above)
Examples
- Example 1:
_state = getClientState;
- Example 2:
if (getClientState == "BRIEFING READ") then {hint "Let the show begin!"};
Additional Information
- See also:
- getClientStateNumbergetPlayerUID
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