equal
deleted
inserted
replaced
76 <blockquote>This function is called when a gear is damaged. |
76 <blockquote>This function is called when a gear is damaged. |
77 </blockquote> |
77 </blockquote> |
78 |
78 |
79 Example: |
79 Example: |
80 |
80 |
81 <code lang="lua"> function !onGearDamage(gear, damage) |
81 <code lang="lua"> function onGearDamage(gear, damage) |
82 if (!GetGearType(gear) == gtHedgehog) then |
82 if (!GetGearType(gear) == gtHedgehog) then |
83 -- adds a message saying, e.g. "Hoggy H took 25 points of damage" |
83 -- adds a message saying, e.g. "Hoggy H took 25 points of damage" |
84 !AddCaption(!GetHogName(gear) .. ' took ' .. damage .. ' points of damage') |
84 !AddCaption(!GetHogName(gear) .. ' took ' .. damage .. ' points of damage') |
85 end |
85 end |
86 end</code> |
86 end</code> |