LuaAPI.wiki
changeset 1271 006fe546bd26
parent 1270 2c4320387c2f
child 1272 4f93f837c427
equal deleted inserted replaced
1270:2c4320387c2f 1271:006fe546bd26
   991 Sets the maximum building distance for of girders and rubber bands in pixels to `distInPx`. If `distInPx` is `0`, the limit is disabled. If called without arguments, the distance will be reset to the default value.
   991 Sets the maximum building distance for of girders and rubber bands in pixels to `distInPx`. If `distInPx` is `0`, the limit is disabled. If called without arguments, the distance will be reset to the default value.
   992 
   992 
   993 ==== `Explode(x, y, radius[, options])` (0.9.24) ====
   993 ==== `Explode(x, y, radius[, options])` (0.9.24) ====
   994 Cause an explosion or erase land, push or damage gears.
   994 Cause an explosion or erase land, push or damage gears.
   995 
   995 
   996 By default, causes an explosion at the coordinates `(x, y)` with the given `radius`. Explosions destroy land, and damage and push gears in its radius. Assuming 100% damage, the explosion damage at the center equals the explosion radius.
   996 By default, an explosion destroys a circular piece of land and damages and pushes gears in its radius.
       
   997 
       
   998 The explosion occours at coordinates `(x, y)` with the given `radius`. Assuming 100% damage, the explosion damage at the center equals the explosion radius.
   997 
   999 
   998 `options` is a bitmask which can be used to tweak how the explosion behaves:
  1000 `options` is a bitmask which can be used to tweak how the explosion behaves:
   999 
  1001 
  1000 || *Flag* || *Meaning* ||
  1002 || *Flag* || *Meaning* ||
  1001 || `EXPLAutoSound` || Plays an appropriate sound ||
  1003 || `EXPLAutoSound` || Plays an appropriate sound ||
  1014 Explode(100, 50, 50)
  1016 Explode(100, 50, 50)
  1015 
  1017 
  1016 -- Simlpe explosion without sound
  1018 -- Simlpe explosion without sound
  1017 Explode(100, 50, 50, 0)
  1019 Explode(100, 50, 50, 0)
  1018 
  1020 
  1019 -- Fake explosion which only cause a push but deals no damage to gears an terrain
  1021 -- Fake explosion which only pushes gears but deals no damage to gears and terrain
  1020 Explode(500, 1000, 50, EXPLAutoSound + EXPLNoDamage + EXPLDontDraw)
  1022 Explode(500, 1000, 50, EXPLAutoSound + EXPLNoDamage + EXPLDontDraw)
  1021 
  1023 
  1022 -- Erase land without side effects:
  1024 -- Erase a circle of land without side effects
  1023 Explode(500, 100, 100, EXPLNoDamage + EXPLDoNotTouchAny + EXPLNoGfx)
  1025 Explode(500, 100, 100, EXPLNoDamage + EXPLDoNotTouchAny + EXPLNoGfx)
  1024 </code>
  1026 </code>
  1025 
  1027 
  1026 ==== `SkipTurn()` (0.9.24) ====
  1028 ==== `SkipTurn()` (0.9.24) ====
  1027 Forces the current hedgehog to skip its turn.
  1029 Forces the current hedgehog to skip its turn.