1. How to check is entity in Rad Town zone?
    Code:
    private void GetObjects()
    {
        var allEntites = UnityEngine.Object.FindObjectsOfType<BaseCombatEntity>();    foreach (var entity in allEntites)
        {
            if (entity.isDestroyed) continue;
            // ?
        }
    }
     
  2. You could use the monuments location and do a distance check if you know what the entity is, or search for all entities within a radius and filter out what you need
    Check out MonumentRadiation to see how I get monument locations

    Off the top of my head this is how you check distance between 2 objects using their Vector3 position.
    Code:
    var distance = Vector3.Distance(position1, position2)
    if (distance < something)
    //do stuff
    If the distance is less the a variable you specify then proceed with the function

    Or to get a list of every entity with a radius of a position
    Code:
    List<BaseEntity> entitiesWithinRadius = new List<BaseEntity>();
    Vis.Entities(position, radius, out entitiesWithinRadius)
    You can then filter through that list to find what you want
     
  3. Thank you. I thought that is possible to check the RT no-build zone with some flags :)
    [DOUBLEPOST=1456387063][/DOUBLEPOST]Also, yesterday accidentally I'm removed RT objects (research tables and etc) and some players entity's (their cant spawn or move), how I can restore it?
     
    Last edited by a moderator: Feb 25, 2016
  4. You need a test server ;)
     
  5. /deleted/
     
    Last edited by a moderator: Mar 24, 2016