Game Maker

Entity Death

Trigger actions when a non-player entity dies within a region.

This event fires when any non-player entity (mob, armor stand, etc.) dies within the region.

Action Values

  • Entity: The entity that died.
  • Killer: The entity that dealt the killing blow. This can be a Player or another mob. This value can be null if the death was from natural causes (e.g., falling).

Event Configuration

  • Entity Type: Filter the event to only trigger for a specific type of entity (e.g., only ZOMBIE).
  • Cancel Event: If true, the entity will not die and will be left with a small amount of health.
  • Execution Mode: Control how often this event can be triggered.

Use Cases

  • Creating custom loot drops for mobs.
  • Spawning a new wave of enemies after a boss is defeated.
  • Awarding points in a PvE game mode.

Example: Custom Zombie Loot Drop

  1. Region: Your main gameplay area.
  2. Event: Entity Death.
  3. Configuration: Set Entity Type to ZOMBIE.
  4. Actions:
    • Random Action:
      • Function 1 (Weight 1): Spawn Item action that spawns a DIAMOND at the Entity's location.
      • Function 2 (Weight 9): Spawn Item action that spawns a ROTTEN_FLESH.