1. I'm trying to set respawn time of loots but can't figure it out.
    I have an object as
    Code:
    LootContainer container = getContainer(x);
    When the container destroyed, its marking as destroyed by game. Which means container.isDestroyed is true after that.
    And I'm trying to reinitialize it for respawn as
    Code:
    container.Spawn();
    Giving me error like this:

    Code:
    [Oxide] 05:53 [Debug]   at (wrapper managed-to-native) UnityEngine.Component:get_transform ()
      at BaseCombatEntity.ServerInit () [0x00000] in <filename unknown>:0
      at StorageContainer.ServerInit () [0x00000] in <filename unknown>:0
      at LootContainer.ServerInit () [0x00000] in <filename unknown>:0
      at BaseNetworkable.Spawn (Boolean networked) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Loot.OnTick () [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Loot.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (System.Reflection.MethodInfo method, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String hookname, System.Object[] args) [0x00000] in <filename unknown>:0
    How can I respawn a destroyed container and do you think can game force an another container at same place if I do this?

    Notes:
    I have tested to create a new container with old's position but I even couldn't get that values from destroyed container. The object actually wasn't disposed on runtime I guess but I don't know whats going on it.
     
    Last edited by a moderator: May 4, 2016