1. So I am turning off a turret with:
    Code:
                                turret.SetFlag(BaseEntity.Flags.On, false);
                                turret.SendNetworkUpdateImmediate();
    Now with this of course it should turn it off. However if the turret is locked onto someone it sometimes turns off but the animation still locks onto a player and moves. Is there any way to clear its locked on list then turn it off? Or how do you suggest I do it.
     
  2. Have you tried calling SetIsOnline(bool online) on the AutoTurret?
    Code:
    turret.SetIsOnline(false);
    Or if you want to play the server effect (sound), InitiateShutdown()
    Code:
    turret.InitiateShutdown();
     
  3. So I see where you are going. How would I go about turning a entity into Auto Turret? Im using a Vis.Entities to pull nearby entities. With those vis entities how can i convert? As I need AutoTurret to preform those.
     
  4. If you have a BaseEntity that is actually an AutoTurret you should be able to cast it.
     
  5. I ended up doing: if (turret is AutoTurret) turret.GetComponent<AutoTurret>().target = null;