862 || `heInvulnerable` || Wether hog is invulnerable || Any non-zero value turns on invulnerability. `0` turns it off. || |
862 || `heInvulnerable` || Wether hog is invulnerable || Any non-zero value turns on invulnerability. `0` turns it off. || |
863 || `hePoisoned` || Poison damage, damages hog each turn. || Amount of damage per turn. Use `0` to disable poisoning. || |
863 || `hePoisoned` || Poison damage, damages hog each turn. || Amount of damage per turn. Use `0` to disable poisoning. || |
864 || `heResurrectable` || Whether to resurrect the hog on death || With a non-zero value, the hedgehog will be resurrected and teleported to a random location on death. `0` disables this. || |
864 || `heResurrectable` || Whether to resurrect the hog on death || With a non-zero value, the hedgehog will be resurrected and teleported to a random location on death. `0` disables this. || |
865 || `heResurrected` || Whether the hedgehog has been resurrected once. This is only a subtle graphical effect. || With a non-zero value, the hedgehog was resurrected, `0` otherwise. || |
865 || `heResurrected` || Whether the hedgehog has been resurrected once. This is only a subtle graphical effect. || With a non-zero value, the hedgehog was resurrected, `0` otherwise. || |
866 || `heFrozen` || Freeze level. Frozen hedgehogs skip turn, are heavy and take half damage || The hog is considered frozen if the value is `256` or higher, otherwise not. A number of `256` or higher denotes “how frozen” the hedgehog is, i.e. how long it takes to melt. The freezer sets this to `199999` initially. The value will be reduced by `50000` each round. Being hit by a flame reduces this number by `1000`. The values `0` to `255` are used for the freeze/melt animations. || |
866 || `heFrozen` || Freeze level. Frozen hedgehogs skip turn, are heavy and take half damage || The hog is considered frozen if the value is `256` or higher, otherwise not. A number of `256` or higher denotes “how frozen” the hedgehog is, i.e. how long it takes to melt. The freezer sets this to `199999` initially. The value will be reduced by `50000` each round. Being hit by a flame reduces this number by `1000`. The values `0` to `255` are used for the freeze/melt animations. || |
867 || `heArtillery` || 0.9.24 or later! If enabled, the hedgehog can't walk. || `0` = disabled. `1` = permanently enabled. `2` = temporarily enabled (used by sniper rifle between shots) || |
867 || `heArtillery` || If enabled, the hedgehog can't walk (since 0.9.24). || `0` = disabled. `1` = permanently enabled. `2` = temporarily enabled (used by sniper rifle between shots) || |
868 |
868 |
869 Example (sets all bots poisoned with poison damage of 1): |
869 Example (sets all bots poisoned with poison damage of 1): |
870 |
870 |
871 <code language="lua"> function onGearAdd(gear) |
871 <code language="lua"> function onGearAdd(gear) |
872 if (GetGearType(gear) == gtHedgehog) and (GetHogLevel(gear) > 0) then |
872 if (GetGearType(gear) == gtHedgehog) and (GetHogLevel(gear) > 0) then |
1189 This function will switch to the hedgehog with the specifiedd `gearUid`. |
1189 This function will switch to the hedgehog with the specifiedd `gearUid`. |
1190 |
1190 |
1191 ==== <tt>!SetWeapon(ammoType)</tt> ==== |
1191 ==== <tt>!SetWeapon(ammoType)</tt> ==== |
1192 Sets the selected weapon of `CurrentHedgehog` to one of the [AmmoTypes Ammo Type]. |
1192 Sets the selected weapon of `CurrentHedgehog` to one of the [AmmoTypes Ammo Type]. |
1193 |
1193 |
1194 Example: |
1194 Examples: |
1195 |
1195 |
1196 <code language="lua"> |
1196 <code language="lua"> |
1197 AddAmmo(CurrentHedgehog, amBazooka, 1) -- give the CurrentHedgehog a bazooka |
1197 SetWeapon(amBazooka) -- select the bazooka (if hog has one) |
1198 SetWeapon(amBazooka) -- select the Bazooka.</code> |
1198 </code> |
|
1199 <code language="lua"> |
|
1200 SetWeapon(amNothing) -- unselects the weapon. |
|
1201 </code> |
1199 |
1202 |
1200 ==== <tt>!SetNextWeapon()</tt> ==== |
1203 ==== <tt>!SetNextWeapon()</tt> ==== |
1201 This function makes the current hedgehog switch to the next weapon in list of available weapons. It can be used for example in trainings to pre-select a weapon. |
1204 This function makes the current hedgehog switch to the next weapon in list of available weapons. It can be used for example in trainings to pre-select a weapon. |
1202 |
1205 |
1203 ==== <tt>!SetInputMask(mask)</tt> ==== |
1206 ==== <tt>!SetInputMask(mask)</tt> ==== |