What should i look up in script reference to make...

Hello everyone! A few days ago i Re-Watched Jonathan Weinberger’s(SubZeroGaming) Interactive C# programming tutorial, i must say that after i watched them again all over i really learned something.

I found out alot of stuff, i researched the scripting reference to look for stuff i didn’t knew about, i made a Click to move with unity’s navigation so if i click somewhere behind a wall it goes there with no issues and i did alot more i wasn’t able to do before, but to the question.


Question

What should i look up in the script reference to make a simple inventory system?

Yes i know there is alot of examples out there and tutorials how to make one but i just want to know what i need to look for in the scripting reference to make a simple inventory.

The reason i want that is because i don’t feel it is me that made the inventory system if i download a example or watch a tutorial i copy the code i can’t stop doing it i just don’t know why, so that is why i just want to know what stuff i need to look up in the Scripting Reference and please go in details like, “Look that up if you want to that” or just something similar :slight_smile:

I know a inventory is not a simple task like people says but i am ready to take the challenge, i like to challenge myself or else i don’t learn anything at all.

Regards, Jesper

PS. Sorry if my spelling is unreadable.

Try looking at:

dictionary
array

Why not look at an example of a simple inventory in js and convert it to C# and improve it, that way you are making your own.

http://forum.unity3d.com/threads/53599-My-Contribution-Inventory-System-Free

That might work, i will try and look up “Array” and “Dictionary” also i take a look at the simple inventory and try to convert and improve. Sounds like a great idea, thanks :slight_smile:

If you haven’t learned about them already I’d recommend classes, there’s a small inventory exercise on this github repository:

https://github.com/karan/Projects/tree/master/Classes

It has a Python solution for it if you want to check it out. There’s a bunch of other ones on here which are good to practice your skills too.

Indeed I thought about suggesting classes as well.

I started a thread on classes here:
http://forum.unity3d.com/threads/204024-How-do-I-create-a-class-pref-unityscript

And the example I was using was for an RPG type character system, I was using js then but have now decided to learn and use C#. The tutorial I followed is available in C# anyway and has an inventory as well:

http://unity3d.com/learn/tutorials/modules/beginner/scripting/classes

I check that out too. I knew a bit about classes but i just didn’t know how to use but i check it out