diff -r a651a8ab85d5 -r efa379b5510e LuaAPI.wiki --- a/LuaAPI.wiki Tue Dec 07 23:00:51 2010 +0000 +++ b/LuaAPI.wiki Wed Dec 08 20:13:37 2010 +0000 @@ -75,11 +75,10 @@
This function is called when a gear is damaged.-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. Example: -
function !OnGearDamage(gear, damage)
+ function !onGearDamage(gear, damage)
if (!GetGearType(gear) == gtHedgehog) then
-- adds a message saying, e.g. "Hoggy H took 25 points of damage"
!AddCaption(!GetHogName(gear) .. ' took ' .. damage .. ' points of damage')