Talk:@Damage
From SphereWiki
Revision as of 20:09, 26 January 2010 by MrSugarCube (talk | contribs)
I think the wiki about this trigger is wrong. I tested the @damage and typed this code into the script of a custom executioner's axe.
On=@Damage src.say I'm the SRC
and the SRC is the one who took the damage and not who dealt it.
SRC is not the one who dealt the damage or the one who was damaged, but is the one 'responsible' for the damage - it means something different depending on the situation.
For example:
- When a weapon takes damage during combat, SRC is the character hit by the weapon.
- When a piece of armour (or shield) is damaged during combat, SRC is the character who dealt the damage.
- When a tool takes damage when using a skill (mining, lumberjack, lockpicking), SRC is the character performing the action.
- When a spider web takes damage, SRC is the character walking on it.
- When an item is damaged due to someone targeting it with a weapon, SRC is the character who targeted it.
- When an item is hit by a harmful spell, SRC is the character who cast the spell.
- When an item is hit by an explosion potion, SRC is the character who used the potion.
- When the DAMAGE function is used, SRC is the source of the damage (third parameter, or SRC from the script calling the function)