1. I checked the API and did not see a method of spawning in external walls or foundations. Is there a method of doing this? Also I would like to know if there's a way to remove a foundation/external wall at a certain location. Thank you :)
     
  2. Hey @Sy | Unforgiven52 ,

    Here is a quick code snippet to spawn a foundation at your current location by using a "/foundation" command
    Code:
    [ChatCommand("foundation")]
            void commandFoundation(BasePlayer player, string cmd, string[] args)
            {
                BuildingBlock block = (BuildingBlock)GameManager.server.CreateEntity("assets/prefabs/building core/foundation/foundation.prefab");
                if (block == null) return;            block.transform.position = player.transform.position;
                block.transform.rotation = player.transform.rotation;
                block.gameObject.SetActive(true);
                block.blockDefinition = PrefabAttribute.server.Find<Construction>(block.prefabID);
                block.Spawn();
                block.SetGrade(BuildingGrade.Enum.Stone);
                block.SetHealthToMax();
                block.SendNetworkUpdate(BasePlayer.NetworkQueue.Update);
            }
    This should help to get you started! :)

    Greetings,
    Blackanges
     
  3. Thank you! This is a great help! Is there any way to see a list of prefabs I can place? I see you used
    Code:
     BuildingBlock block = (BuildingBlock)GameManager.server.CreateEntity("assets/prefabs/building core/foundation/foundation.prefab");
    
    But I want to know where I can find the list of the prefabs. Thank you :)
     
  4. Thats stuff you can google. A quick search for "rust prefab" already gives you the best way to get a prefab list. Here you go. Don't be lazy ;)

    Greetings,
    Blackanges