Deals damage to the specified player.
Argument | Type | Description |
---|---|---|
damaged_player | :real | Player number of the player to damage |
attacking_player | :real | Attacker's player number. Only used for stat tracking, and should be set to -1 if the damage is not from another player |
damage | :real | The damage to deal. Negative damage values will heal the player instead |
Example, called from attack_update.gml:
// heals 10 damage to self:
if (attack == AT_NSPECIAL) {
if (window == 4 && window_timer > 30 && window_timer < 41) {
take_damage( player, -1, -1 );
}
}