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
    10,311 downloads
Advertising

Download

Downloading ModAPI...

Your download is ready!
What now?

This website uses cookies

We use cookies to personalise content and ads. We also share information about your use of our site with our advertising partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.
You consent to our cookies if you continue to use our website.


Necessary
modapi.survivetheforest.net: settings, user session

Marketing
Google AdSense: Google AdSense (integration of advertisements) places a cookie on the information technology system of the data subject.

Learn more about the cookies we use here.
To opt-out later click here.