Create shrinking radiation zones for BR style event

Supported Games
GameServerKingsGameServerKings

Creates a radiation bubble that shrinks around the players inside. Requires no other plugins to use. It can also be used for what ever you can think of using it for via the commands provided below.

Note: Zones will not self-destroy! They get to a point where they stop shrinking, at which stage you must remove them once you are done with them by using the command /shrink stop.

Only the gap between the inner sphere and the outer sphere will deal radiation damage!

Chat Commands

Requires auth level 2 or permission shrinkingradzone.use.

  • /shrink - Shows help
  • /shrink on me - Starts a shrinking radiation zone on your position
  • /shrink on <x> <z> - Starts a shrinking radiation zone on the specified position
  • /shrink stop - Destroys all radiation zones
  • /shrink buffer <## value> - Set the radiation buffer size
  • /shrink startsize <## value> - Set the initial zone size
  • /shrink endsize <## value> - Set the final zone size
  • /shrink strength <## value> - Set the radiation strength (rads per second)
  • /shrink time <## value> - Set the time it takes to shrink (in seconds)

Console Commands

For use via rcon, not in-game console

  • shrink - Shows help
  • shrink on <x> <z> - Starts a shrinking radiation zone on the specified position
  • shrink stop - Destroys all radiation zones
  • shrink buffer <## value> - Set the radiation buffer size
  • shrink startsize <## value> - Set the initial zone size
  • shrink endsize <## value> - Set the final zone size
  • shrink strength <## value> - Set the radiation strength (rads per second)
  • shrink time <## value> - Set the time it takes to shrink (in seconds)

Configuration

{
  "FinalZoneSize": 20.0, // The size of the zone where it will stop shrinking
  "InitialZoneSize": 150.0, // The initial size of the zone before it starts shrinking
  "RadiationBuffer": 50.0, // The distance between the inner (safe) zone and the edge of the radiation
  "RadiationStrength": 40.0, // The strength of the radiations (rads per second)
  "ShrinkTime": 120.0, // The time in seconds it will take to shrink to minimum size
  "DomeShade":  4, // The darkness of the spheres (achieved by stacking multiple on top of each other)
}

Developer API

private string CreateShrinkZone(Vector3 position, float radius, float time)

Creates a new shrinking radiation zones using the values specified. Returns a (string) ID of the generated zone.

private void DestroyShrinkZone(string id)

Forcefully destroy a rad zone using its ID.

Hooks

private void OnRadiationZoneShrunk(string zoneId)

Is called when a zone has stopped shrinking.

MIT License


Copyright (c) 2020 k1lly0u


Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:


The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.


THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.