ModAPI Hub keyboard_arrow_right Mods keyboard_arrow_right Stair

Stair

Hazard
Subscribe to this mod
Like
This mod requires BuilderMenu and BuilderCore and this file
Put the file in The Forest/Mods/Meshes/



Code:
using ModAPI; using UnityEngine; using BuilderCore; using BuilderMenu; using System.Collections.Generic; using TheForest.Items; using System.Collections; using ModAPI.Attributes; namespace Stair { public class Main : MonoBehaviour { [ExecuteOnGameStart] public static void AddMe() { new GameObject("StairStuff").AddComponent(); } public void Start() { Mesh m = Core.ReadMeshFromOBJ("Mods/Meshes/untitled.OBJ"); ModAPI.Log.Write(m.ToString()); Building b = new Building() { data = new BuildingData[] { new BuildingData() { mesh= m, MainColor = Color.cyan, EmissionColor = Color.cyan, AddCollider=true, Convex=true, } } }; Core.AddBuilding(b, 333); Dictionary ing = new Dictionary(); ing.Add(ItemDatabase.ItemIdByName("Rock"), 10); ing.Add(ItemDatabase.ItemIdByName("bone"), 2); ListItem I = new ListItem() { AuthorName = "Hazard", Category = "Stairs", Description = "This is a staircase, its full of steps", Image = ModAPI.Resources.GetTexture("img.png"), Ingredients = ing, ModName = "Stair", Name = "Staircase 1", PrefabID = 333 }; EditorMethods.AddBuilding(I); Destroy(gameObject); } } }
File Stair-3.0.0.0-6fc9317a56b25f63b85b9a7aed7f9063.mod
Compatible 1.09
Version 3.0.0.0

videogame_asset The Forest label Bugfixes
  • Version 3.0.0.0 (1.09) 26. Aug 2018
    143.15 kB
    80,946 downloads
Advertising

Download

Downloading ModAPI...

Your download is ready!
What now?