This article relates to the game "Dota 2". Click here for more information.
This article relates to the SDK/Workshop Tools for "Dota 2 Workshop Tools". Click here for more information.
This article's documentation is for Source 2. Click here for more information.

Script Filters

From Valve Developer Community
Jump to: navigation, search

Script filters allow custom game authors the ability to intercept and modify pending actions. Each script filter passes in a table with the information that describes the event that is about to occur. Modifying values in the table will change the behavior of the action that is about to happen. Return true from the filter function so continue with the action and return false to abort. The best way to see what values are in each filter is to print the contents of the table when the filter is called.

  • ExecuteOrders - All Player issued and forced actions get routed through here.
  • RuneSpawn - A rune is about to spawn on the given spawner.
  • Damage - Damage is about to be applied (after all reductions).
  • ModifyGold - A player is having their gold value modified for the specified reason.
  • ModifyExperience - A player is having their gold value modified for the specified reason.