# HG changeset patch # User sheepyluva@gmail.com # Date 1389698429 0 # Node ID 0f9322acd00ac62573edb9439f2645818a0d1d33 # Parent 3ba6ae9321dfad5884e0342b48ed24fe6cbb7324 update GetEffect/SetEffect info diff -r 3ba6ae9321df -r 0f9322acd00a LuaAPI.wiki --- 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 @@
Returns the state of given effect for the given hedgehog gear.
+ +see !SetEffect for further details === !GetHogHat(gearUid) ===
Returns the hat of the specified hedgehog gear @@ -532,18 +534,21 @@
-=== !SetEffect(gearUid, effect, true/false) === +=== !SetEffect(gearUid, effect, effectState) === -
Enables (true) or disables (false) one of the effects heInvulnerable, heResurrectable, hePoisoned for the specified hedgehog gear. +
Sets the state for one of the effects heInvulnerable, heResurrectable, hePoisoned, heResurrected, heFrozen 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.
Example: (sets all bots poisoned) function onGearAdd(gear) if (GetGearType(gear) == gtHedgehog) and (GetBotLevel(gear) > 0) then - SetEffect(gear, hePoisoned, true) + SetEffect(gear, hePoisoned, 1) end end +Note: prior to the ice-gun release, 0.9.19 (commit 10a0a31804f3 ) effectState was of boolean type (true = effect enabled, false = effect disabled) + === CopyPV(gearUid, gearUid) ===
This sets the position and velocity of the second gear to the first one.