Workshop.codes
Create

Damage Last updated September 09, 2025

Description

Applies instantaneous damage to one or more players, possibly killing the players.

Snippet

Damage(Event Player, Null, 0);

Properties

Returns: Void
Parameters: Player, Damager, Amount

Player
Type: Player | Array (Player), Default: Event Player
The player or players who will receive damage.

Damager
Type: Player, Default: Null
The player who will receive credit for the damage. A damager of null indicates no player will receive credit.

Amount
Type: Float, Default: Number
The amount of damage to apply. This amount may be modified by buffs, debuffs, or armor.

Examples

    Damage(Victim, Players On Hero(Hero(Tracer), Team 1), 100);

This example displays the victim is receiving 100 damage, and the credit goes to all players on team 1 as hero Tracer.

Example 1

rule("Wuyang ultimate damage buff")
{
    event
    {
        Player Dealt Damage;
        All;
        Wuyang;
    }

    conditions
    {
        Is Using Ultimate(Event Player) == True;
    }

    actions
    {
        Damage(Victim, Event Player, 100);
    }
}
  
In this example: when hero Wuyang is using their ultimate and does damage, it causes the victim to receive an extra 100 damage. Though due to workshop limits, it wont track specifically the ultimates damage, and instead will be any damage event during the ultimate.
Example 2

rule("Roadhog damage during Take a breather")
{
    event
    {
        Ongoing - Each Player;
        Team 2;
        Roadhog;
    }

    conditions
    {
        Is Using Ability 2(Event Player) == True;
    }

    actions
    {
        Damage(Players Within Radius(Event Player, 5, Team 1, Surfaces And All Barriers), Event Player, 100);
        Wait(0.125, Abort When False);
        Loop If Condition Is True;
    }
}
  
This example uses a loop if true and a wait action. When a roadhog on team 2 uses his ability 2"take a breather" he will do damage to all players on team 1 within 5 meters for 100 damage every .125 seconds, till the ability ends.
Example 3

rule("Mercy deals damage around healee")
{
    event
    {
        Player Dealt Healing;
        All;
        Mercy;
    }

    actions
    {
        Damage(Players Within Radius(Healee, 6, Opposite Team Of(Team Of(Event Player)), Surfaces And All Barriers), Healer, 250);
        Wait(1, Abort When False);
        Loop If Condition Is True;
    }
}
  
For this example, a Mercy deals damage around the person (6 meters) she is healing for 250 damage every 1 second till she stops healing. the damage also checks line of sight.

Trivia

Workshop.codes