ok i get that things i want to know heres the situation i understand how the script works but here i have my inventory script. If you see in my function start i add my object to the maininventory but i have my drops that spawn when a tree is cut with the anim and everything thing is how would i make my actual logs and branch and coconut and actual item out of the item script like i know i can manipulate my class by calling it with class.variablename if im right but yeah id like to know a bit more about this or information about it.
i know i would have to add more item types and everythings like i said i know how the script work just that part is greyish :S
would i have to basicly make a function inside my inventory like item pickup and then make it if i go over the colider tagged item lets say with another colider tag player then add to inventory ?
import System.Collections.Generic;
//holding all items
var items : Item[];
//inventory
var MainInventory : List.- = new List.
- ();
//Equip menu 0 = helm 1=shoulder 2=gloves 3=pants 4=boots 5=ring 6=neckless
var EquipMenu : Item[];
//Stats
var Power : int = 0;
function Start()
{
MainInventory.Add(items[0]);
MainInventory.Add(items[1]);
MainInventory.Add(items[2]);
EquipMenu[0] = null;
}
function OnGUI()
{
for(var x = 0; x
Trending Articles
More Pages to Explore .....