Comment on page
EntityDamage
Fires when an Entity is damaged
Example usage:
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)
The entity getting damaged.
The attacker (if one exists).
Amount of damage that will be dealt.
Amount of knockback that will be applied.
If set to true the damage will be cancelled.
Last modified 4mo ago