LuaAPI.wiki
changeset 373 0f9322acd00a
parent 369 cbde2d9686a5
child 379 3552b458f1ea
--- a/LuaAPI.wiki	Fri Jan 03 20:09:49 2014 +0000
+++ b/LuaAPI.wiki	Tue Jan 14 11:20:29 2014 +0000
@@ -352,6 +352,8 @@
 
 <blockquote>Returns the state of given effect for the given hedgehog gear.  
 </blockquote>
+
+see !SetEffect for further details
 === <tt>!GetHogHat(gearUid)</tt> ===
 
 <blockquote>Returns the hat of the specified hedgehog gear
@@ -532,18 +534,21 @@
 
 
 </blockquote>
-=== <tt>!SetEffect(gearUid, effect, true/false)</tt> ===
+=== <tt>!SetEffect(gearUid, effect, effectState)</tt> ===
 
-<blockquote>Enables (true) or disables (false) one of the effects <tt>heInvulnerable, heResurrectable, hePoisoned</tt> for the specified hedgehog gear.
+<blockquote>Sets the state for one of the effects <tt>heInvulnerable, heResurrectable, hePoisoned, heResurrected, heFrozen</tt> for the specified hedgehog gear.
+A value of 0 usually means the effect is disabled, values other than that indicate that it is enabled and in some cases specify e.g. the remaining time of that effect.
 </blockquote>
 Example: (sets all bots poisoned)
 
 <code lang="lua">    function onGearAdd(gear)
         if (GetGearType(gear) == gtHedgehog) and (GetBotLevel(gear) > 0) then
-            SetEffect(gear, hePoisoned, true)
+            SetEffect(gear, hePoisoned, 1)
         end
     end</code>
 
+Note: prior to the ice-gun release, 0.9.19 (commit 10a0a31804f3 ) effectState was of boolean type (true = effect enabled, false = effect disabled)
+
 === <tt>CopyPV(gearUid, gearUid)</tt> ===
 
 <blockquote>This sets the position and velocity of the second gear to the first one.