deer_SWAG submitted a new resource:
Rect Zones - Creates polygonal zones
Read more about this resource...

Rect Zones
Creates polygonal zones
Total Downloads: 677 - First Release: Jul 21, 2016 - Last Update: Mar 30, 2017
- 5/5, 8 likes
-
Just spotted this and wondered why I hadn't seen it before. Then saw it was only released 3 hours ago. Awesome!
Perfect for adding nostabilty to a lighthouse. Will this be compatible with 'zone Domes' or something similar to visualise the zone?
...and is 'height' measured per building level? -
Ok, might be worth adding that height is approx 3 x per Building level. So my lighthouse is 15 levels and to cover this I set
Code:/rect add 45
Placing the points was fantastic and easy, really great work. you can check the height on the first one etc...
I couldn't get the command '/rect options' to work after creating the zone or after I typed '/rect done'. Nothing appears in chat or console.
After trying to edit the .json file it error-ed as I tried to guess the flags were the same as ZoneManager. Would it be possible to list the options available in the overview?
Code:], "o": [], "enmsg": "Welcome to the Lighthouse.", "exmsg": "Good bye and farewell." }
-
[DOUBLEPOST=1469141092][/DOUBLEPOST] -
Also, referring to zone domes, obviously not using that plugin itself (it's just spawning a prefab display sphere and sizing it to a radius), is there no way to permanently visually represent the zone? -
PvpGod, UnDestr, NoDecay, NoStability? -
-
Fantastic. I think if that was the case I would completely replace ZoneManager with this.
One question. In the Rcon when I refresh or update a plugin [RectZones] appears to shout the plugin name for some reason?
Code:(10:23:47) | [Oxide] 11:23 [Info] Unloaded plugin Prod v2.2.2 by Reneb (10:23:47) | [Oxide] 11:23 [Info] Loaded plugin Prod v2.2.2 by Reneb (10:23:47) | [Oxide] 11:23 [Info] [RectZones] Prod
-
-
deer_SWAG updated Rect Zones with a new update entry:
0.0.2
-
Last edited by a moderator: Jul 22, 2016
-
deer_SWAG updated Rect Zones with a new update entry:
0.0.21
-
All good here. Works like a charm. Might be worth mentioning that you need to add each flag separately.
Code:/rect options nostabilty /rect options nobuild
e.g
Code:/rect add 20 HOMEZONE
-
Absolutely perfect script for areas like this.
-
-
deer_SWAG updated Rect Zones with a new update entry:
0.0.22
-
My entermsg is not working and I verified it was done correctly... I did it with the following commands:
/rect options entermsg="asdfasdf"
/rect options nobuild entermsg="asdfasdf"
/rect options entermsg "asdfasdf"
None of those produced a message.
When I use nobuild or nobuildex they work perfectly. -
Try again. Maybe you forgot /rect done.Last edited by a moderator: Jul 23, 2016 -
My friend created a nodestroy and nopvp code for your plugin. You can add it to your plugin if you want.
Code:void OnEntityTakeDamage(BaseCombatEntity entity, HitInfo hitinfo) { bool blockDamage = false; //If the the entity is a building block foreach(GameObject zone in currentZones) { RectZone zoneComponent = zone.GetComponent<RectZone>(); if ( ( entity is BuildingBlock && zoneComponent.Definition.Options.ContainsKey("nodestroy") ) || ( entity is BasePlayer && (hitinfo.Initiator is BasePlayer || hitinfo.Initiator is FireBall ) && zoneComponent.Definition.Options.ContainsKey("nopvp") ) ) { if (zoneComponent.GetComponent<Collider>().bounds.Contains(entity.transform.position)) { blockDamage = true; } } } if (blockDamage) { hitinfo.damageTypes = new Rust.DamageTypeList(); hitinfo.DoHitEffects = false; hitinfo.HitMaterial = 0; } }
Code:Dictionary<string, string> availableOptions = new Dictionary<string, string>() { { "entermsg", "Shows message when a player enters a zone" }, { "exitmsg", "Shows message when a player exits a zone" }, { "nobuild", "Players can't build in zone" }, { "nobuildex", "Players can't build in zone. All buildings in a zone will be demolished" }, { "nostability", "Removes stability from buildings" }, { "nodestroy", "Players will be unable to destroy buildings and deployables" }, { "nopvp", "Players won't get hurt by another player" } };
-
deer_SWAG updated Rect Zones with a new update entry:
0.0.24