updated onGearDamage to reflect lack of capitalisation in dev
authorRedGrinner
Wed, 08 Dec 2010 20:13:37 +0000
changeset 65 efa379b5510e
parent 64 a651a8ab85d5
child 66 7586adb1eace
updated onGearDamage to reflect lack of capitalisation in dev
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 @@
 
 <blockquote>This function is called when a gear is damaged.
 </blockquote>
-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:
 
-<code lang="lua">    function !OnGearDamage(gear, damage)
+<code lang="lua">    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')