LuaAPI.wiki
changeset 48 3c5d26c1562a
parent 47 adf440f87f1e
child 49 863995d12a27
--- a/LuaAPI.wiki	Mon Dec 06 14:20:34 2010 +0000
+++ b/LuaAPI.wiki	Mon Dec 06 14:35:16 2010 +0000
@@ -249,17 +249,18 @@
 
 <blockquote>Sets the health of the specified gear.
 </blockquote>
-=== <tt>!SetEffect(gearUid, effect, true/false)</tt> (0.9.14) ===
+=== <tt>!SetEffect(gearUid, effect, true/false)</tt> (0.9.14 / dev) ===
 
 <blockquote>Enables (true) or disables (false) one of the effects <tt>heInvulnerable, heResurrectable, hePoisoned</tt> for the specified hedgehog gear.
 </blockquote>
 Example: (sets all bots poisoned)
 
 <code lang="lua">    function onGearAdd(gear)
-        if (!GetGearType(gear) === gtHedgehog) and (!GetBotLevel(gear) > 0) then
+        if (!GetGearType(gear) == gtHedgehog) and (!GetBotLevel(gear) > 0) then
             !SetEffect(gear, hePoisoned, true)
         end
     end</code>
+Notice: In 0.9.14 this function takes 0 or 1 instead of true/false.
 === <tt>CopyPV(gearUid, gearUid)</tt> ===
 
 <blockquote>This sets the position and velocity of the second gear to the first one.