# HG changeset patch # User RedGrinner # Date 1291646116 0 # Node ID 3c5d26c1562a48c5e0975d943bc81754ddd2d744 # Parent adf440f87f1e4dd5772225e29731d701ef2523f6 Edited wiki page LuaAPI through web user interface. diff -r adf440f87f1e -r 3c5d26c1562a LuaAPI.wiki --- 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.