getClientStateNumber: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|= Game name" to "|Game name=")
m (Fix table)
Line 7: Line 7:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Returns client state in network game. Works on both, client and dedicated server. The following states are possible:<br><br>
| Returns client state in network game. Works on both, client and dedicated server. The following states are possible:
<table>
 
<tr>
{{{!}} class{{=}}"bikitable"
<td>[[getClientStateNumber]]&nbsp;&nbsp;&nbsp;&nbsp;</td>
! [[getClientStateNumber]]
<td>[[getClientState]]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
! [[getClientState]]
<td>'''Description'''</td>
! Description
</tr><tr>
{{!}}-
<td>0</td>
{{!}} 0 {{!}}{{!}} "NONE" {{!}}{{!}} No client (or singleplayer)
<td>"NONE"</td>
{{!}}-
<td>No client (or singleplayer)</td>
{{!}} 1 {{!}}{{!}} "CREATED" {{!}}{{!}} Client is created
</tr><tr>
{{!}}-
<td>1</td>
{{!}} 2 {{!}}{{!}} "CONNECTED" {{!}}{{!}} Client is connected to server, message formats are registered
<td>"CREATED"</td>
{{!}}-
<td>Client is created</td>
{{!}} 3 {{!}}{{!}} "LOGGED IN" {{!}}{{!}} Identity is created
</tr><tr>
{{!}}-
<td>2</td>
{{!}} 4 {{!}}{{!}} "MISSION SELECTED" {{!}}{{!}}Mission is selected
<td>"CONNECTED"</td>
{{!}}-
<td>Client is connected to server, message formats are registered</td>
{{!}} 5 {{!}}{{!}} "MISSION ASKED" {{!}}{{!}} Server was asked to send / not send mission
</tr><tr>
{{!}}-
<td>3</td>
{{!}} 6 {{!}}{{!}} "ROLE ASSIGNED" {{!}}{{!}} Role was assigned (and confirmed)
<td>"LOGGED IN"</td>
{{!}}-
<td>Identity is created</td>
{{!}} 7 {{!}}{{!}} "MISSION RECEIVED" {{!}}{{!}} Mission received
</tr><tr>
{{!}}-
<td>4</td>
{{!}} 8 {{!}}{{!}} "GAME LOADED" {{!}}{{!}} Island loaded, vehicles received
<td>"MISSION SELECTED"</td>
{{!}}-
<td>Mission is selected</td>
{{!}} 9 {{!}}{{!}} "BRIEFING SHOWN" {{!}}{{!}} Briefing was displayed
</tr><tr>
{{!}}-
<td>5</td>
{{!}} 10 {{!}}{{!}} "BRIEFING READ" {{!}}{{!}} Ready to play mission
<td>"MISSION ASKED"</td>
{{!}}-
<td>Server was asked to send / not send mission</td>
{{!}} 11 {{!}}{{!}} "GAME FINISHED" {{!}}{{!}} Game was finished
</tr><tr>
{{!}}-
<td>6</td>
{{!}} 12 {{!}}{{!}} "DEBRIEFING READ" {{!}}{{!}} Debriefing read, ready to continue with next mission
<td>"ROLE ASSIGNED"</td>
{{!}}}
<td>Role was assigned (and confirmed)</td>
|DESCRIPTION=
</tr><tr>
<td>7</td>
<td>"MISSION RECEIVED"</td>
<td>Mission received</td>
</tr><tr>
<td>8</td>
<td>"GAME LOADED"</td>
<td>Island loaded, vehicles received</td>
</tr><tr>
<td>9</td>
<td>"BRIEFING SHOWN"</td>
<td>Briefing was displayed</td>
</tr><tr>
<td>10</td>
<td>"BRIEFING READ"</td>
<td>Ready to play mission</td>
</tr><tr>
<td>11</td>
<td>"GAME FINISHED"</td>
<td>Game was finished</td>
</tr><tr>
<td>12</td>
<td>"DEBRIEFING READ"</td>
<td>Debriefing read, ready to continue with next mission</td>
</tr>
</table>|DESCRIPTION=
____________________________________________________________________________________________
____________________________________________________________________________________________


| '''getClientStateNumber''' |SYNTAX=
| [[getClientStateNumber]] |SYNTAX=


| [[Number]] - Client state (see table above)
| [[Number]] - Client state (see table above) |RETURNVALUE=


|RETURNVALUE=  
|x1= <code>_state = [[getClientStateNumber]];</code>|EXAMPLE1=


|x1= <code>_state = [[getClientStateNumber]];</code>|EXAMPLE1=
|x2= <code>_inGame = [[getClientStateNumber]] > 8;</code>|EXAMPLE2=
|x2= <code>_inGame = [[getClientStateNumber]] > 8;</code>|EXAMPLE1=  
____________________________________________________________________________________________
____________________________________________________________________________________________



Revision as of 22:45, 1 November 2019

Hover & click on the images for description

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:
getClientStateNumber
Return Value:
Number - Client state (see table above)

Examples

Example 1:
_state = getClientStateNumber;
Example 2:
_inGame = getClientStateNumber > 8;

Additional Information

See also:
getClientStategetPlayerUID

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