Hi, what it's the solution of subj?
I need players can unlock doors in some area, but can't pickup doors and codelocks or place their own code on door.
There is no problem with rewriting codes on door on timer and spawning picked up codelocks, but the door still can be picked up and i can't respawn door.
Tried to spawn door in doorway, but it's getting destroyed on spawn
Don't know how to restrict codelock picking up and Zones Manager flag "nopickup" is not an option because i need picking up in zoneCode:door = GameManager.server.CreateEntity("assets/prefabs/building/door.hinged/door.hinged.toptier.prefab", <some Vector3()>, new Quaternion(), true); door.Spawn();
Solved Restricting door pickups, else spawning a door?
Discussion in 'Rust Development' started by wazzzup, Oct 3, 2016.
-
When you look into the doors code, there's the pickup check:
Code:// Door public override bool CanPickup(BasePlayer player) { return base.IsOpen() && !base.GetSlot(BaseEntity.Slot.Lock) && base.CanPickup(player); }
Code:// BaseCombatEntity public virtual bool CanPickup(BasePlayer player) { return this.pickup.enabled; }
Code:// BaseCombatEntity public BaseCombatEntity.Pickup pickup;
This should in conclusion help to fix your pickup problem... -
thanks, it's working now
-
-
@wazzzup Did you manage to successfully spawn a door into a doorway? Because I'm currently struggeling at that point.
-