EntityDamage
Fires when an Entity is damaged
Events.EntityDamage(function(event)
local matchDurationSec = MatchService.getMatchDurationSec()
-- Double all damage in the game after 15 minutes
if (matchDurationSec > 15 * 60) then
event.damage = event.damage * 2
end
-- Disable damage in first 45s of the game
if (matchDurationSec < 45) then
event.cancelled = true;
end
end)Parameters
entity: Entity
fromEntity: Entity | nil
damage: number [modifiable]
knockback: Knockback [modifiable]
cancelled: bool [modifiable]
Last updated