equal
deleted
inserted
replaced
68 </blockquote> |
68 </blockquote> |
69 === <tt>onGearDamage(gearUid, damage)</tt> === |
69 === <tt>onGearDamage(gearUid, damage)</tt> === |
70 |
70 |
71 <blockquote>This function is called when a gear is damaged. |
71 <blockquote>This function is called when a gear is damaged. |
72 </blockquote> |
72 </blockquote> |
73 Notice: Lua is case-sensitive. The 'O' in 'OnGearDamage' needs to be capitalised, or Hedgewars won't pick up this function call. This unusual capitalisation will probably be fixed in 0.9.15. |
73 Notice: Lua is case-sensitive. The 'O' in '!OnGearDamage' needs to be capitalised, or Hedgewars won't pick up this function call. This unusual capitalisation will probably be fixed in 0.9.15. |
74 |
74 |
75 Example: |
75 Example: |
76 |
76 |
77 <code lang="lua"> function !OnGearDamage(gear, damage) |
77 <code lang="lua"> function !OnGearDamage(gear, damage) |
78 if (!GetGearType(gear) == gtHedgehog) then |
78 if (!GetGearType(gear) == gtHedgehog) then |