Difference between revisions of "Talk:@Damage"

From SphereWiki
Jump to: navigation, search
m
m ((tidying up a bit))
 
Line 1: Line 1:
 +
[[User:Lincemiope|Lincemiope]] 15:40, 26 January 2010 (UTC)
 +
 
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.
 
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.
  

Latest revision as of 20:14, 26 January 2010

Lincemiope 15:40, 26 January 2010 (UTC)

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.


MrSugarCube 19:13, 26 January 2010 (UTC)
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)