By George — February 11, 2018
Returns the color slot being currently used by the specified player.
Argument | Type | Description |
---|
player | :real | ID of the player to get the color of |
Example, called from post_draw.gml:
if (get_player_color( player ) == 3) {
draw_sprite(sprite_get( "aura_particles" ), aura_timer, x, y );
}
Categories: Functions, Programming, Workshop | Comments: 0
By George — February 11, 2018
Sets the number of stocks for the specified player.
Argument | Type | Description |
---|
player | :real | ID of the player to set the stocks of |
value | :real | The value to set |
Example, called from attack_update.gml:
if (window == 2 && window_timer == 200) {
set_player_stocks( player, get_player_stocks( player ) + 1 );
}
Categories: Functions, Programming, Workshop | Comments: 0
By George — February 11, 2018
Returns the number of stocks the specified player has.
Argument | Type | Description |
---|
player | :real | ID of the player to get the stocks of |
Example, called from got_hit.gml:
if (get_player_stocks( hit_player ) == 1) {
old_hsp *= .5;
old_vsp *= .5;
}
Categories: Functions, Programming, Workshop | Comments: 0
By George — February 11, 2018
Sets the team for the specified player.
Argument | Type | Description |
---|
player | :real | ID of the player to get the team of |
value | :real | The value to set. Should be either 1 or 2 |
Example, called from attack_update.gml:
if (attack == AT_TAUNT && window == 1 && window_timer == 1) {
if (get_player_team( player ) == 1) {
set_player_team( player, 2 );
} else {
set_player_team( player, 1 );
}
}
Categories: Functions, Programming, Workshop | Comments: 0
By George — February 11, 2018
Returns the team of the specified player. If team mode is off, it will return the player number.
Argument | Type | Description |
---|
player | :real | ID of the player to get the team of |
Example, called from hit_player.gml:
if (get_player_team( hit_player ) == get_player_team( player )) {
sound_play( sound_get( "oops" ));
}
Categories: Functions, Programming, Workshop | Comments: 0