equal
deleted
inserted
replaced
662 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. |
662 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. |
663 |
663 |
664 Example (sets all bots poisoned): |
664 Example (sets all bots poisoned): |
665 |
665 |
666 <code language="lua"> function onGearAdd(gear) |
666 <code language="lua"> function onGearAdd(gear) |
667 if (GetGearType(gear) == gtHedgehog) and (GetBotLevel(gear) > 0) then |
667 if (GetGearType(gear) == gtHedgehog) and (GetHogLevel(gear) > 0) then |
668 SetEffect(gear, hePoisoned, 1) |
668 SetEffect(gear, hePoisoned, 1) |
669 end |
669 end |
670 end</code> |
670 end</code> |
671 |
671 |
672 *Note*: prior to the ice-gun release, 0.9.19 (commit r10a0a31804f3) `effectState` was of boolean type (`true` = effect enabled, `false` = effect disabled) |
672 *Note*: prior to the ice-gun release, 0.9.19 (commit r10a0a31804f3) `effectState` was of boolean type (`true` = effect enabled, `false` = effect disabled) |