1. Hey! I've found VisualCupboard plugin and I like the idea, but realization is quite poor. So I've rewritten it and now I'm stuck with adding an object visible only for one player - command caller. So here's a part of code I've stolen from original plugin:

    Code:
    class ToolCupboardSphere : MonoBehaviour
        {
            BaseEntity sphere;
            BaseEntity entity;        Vector3 pos = new Vector3(0, 0, 0);
            Quaternion rot = new Quaternion();
            string strPrefab = "assets/prefabs/visualization/sphere.prefab";        void Awake()
            {
                entity = GetComponent<BaseEntity>();
                sphere = GameManager.server.CreateEntity(strPrefab, pos, rot);
                SphereEntity ball = sphere.GetComponent<SphereEntity>();
                ball.currentRadius = 1f;
                ball.lerpRadius = 2.0f * VisualCupboards.cupboardRadius;
                ball.lerpSpeed = 100f;            sphere.SetParent(entity, "");
                sphere?.Spawn();
            }        void OnDestroy()
            {
                if (sphere == null) return;
                sphere.Kill();
            }
        }
    And now I need to make it visible for command caller only.
     
  2. You may wish to make use of the CanNetworkTo hook to check if that sphere should be networking with the player it is trying to.
     
  3. yes, JoeSheep is correct, the CanNetworkTo hook is what you need.

    But I will have a new version of VisualCupboard after tomorrows update that does include this very feature :)
    I know a lot of players have been asking for only the owner of cupboard to see the spheres. its something I have been slowly working on.
     
  4. I look forward to that :)
     
  5. Yea, that would be cool, but I've also rewritten the code and /showsphere + /killsphere commands to single command: /cupboards <delay 3-60>, which toggles them and no more /killsphere.
    [DOUBLEPOST=1492681808][/DOUBLEPOST]
    Thanks =)