Skip to content

Commit 4bc318b

Browse files
authored
Update Functions-(Players).md
1 parent 658417b commit 4bc318b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

docs/6.3/Functions-(Players).md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ for(var _player = 0; _player < INPUT_MAX_PLAYERS; _player++)
6565

6666
```gml
6767
//Grab the max number of players from the .JOIN source mode parameters
68-
var _max_players = input_join_params_get().max_players;
68+
var _max_players = input_join_params_get().__max_players;
6969

7070
//Build a string reporting the number of players connected, and then draw it
7171
var _string = string(input_players_connected_count()) + "/" + string(_max_players) + " players connected";
@@ -96,7 +96,7 @@ This function returns a struct that describes the state of each player's connect
9696
9797
```
9898
{
99-
any_changed: <boolean that indicates whether anything has changed at all>
99+
__any_changed: <boolean that indicates whether anything has changed at all>
100100
__new_connections: [
101101
<array of player indexes that are newly connected this step>
102102
],
@@ -123,21 +123,21 @@ The `INPUT_STATUS` enum contains the following members:
123123
```gml
124124
//Pick up incoming new players and outgoing old users
125125
var _status = input_players_get_status();
126-
if (_status.any_changed)
126+
if (_status.__any_changed)
127127
{
128128
//Iterate over new players and create a new player instance for each
129-
for(var _i = 0; _i < array_length(_status.new_connections); _i++)
129+
for(var _i = 0; _i < array_length(_status.__new_connections); _i++)
130130
{
131-
var _new_player = _status.new_connections[_i];
131+
var _new_player = _status.__new_connections[_i];
132132
133133
//Pass the player index into the new obj_player instance
134134
instance_create_depth(obj_spawn.x, obj_spawn.y, obj_player, {player_index: _new_player});
135135
}
136136
137137
//Find any obj_player instances for disconnected players and destroy them
138-
for(var _i = 0; _i < array_length(_status.new_disconnections); _i++)
138+
for(var _i = 0; _i < array_length(_status.__new_disconnections); _i++)
139139
{
140-
var _old_player = _status.new_connections[_i];
140+
var _old_player = _status.__new_connections[_i];
141141
with(obj_player)
142142
{
143143
if (player_index == _old_player) instance_destroy();

0 commit comments

Comments
 (0)