- Home /
item pick up menu
hi i need a item pick up menu sorta like runescape but little more complicated i want when you click on a item it tells you what the item is it's durability and give a list of options you can use it for so if the item was a log i want it to give the logs durability stats that i can burn it or craft with it to make a bow or a chest if i have right amount to do it and of course a pick it up option if anyone has any idea on how to do this feel free to ansrew
for lack of punctuation. I tried to read your question, but I had to stop mid-way.
So, like, $$anonymous$$ecraft, world of warcraft, and runescape put together. Interesting.
With a bit of experience I am confident you will be able to make this yourself. When you do, and you have a more concrete problem, then ask a question. http://answers.unity3d.com/page/faq.html
ok im not asking for you all to fix my punctuation or how to ask a question im asking if you know know to make a item pick up menu script/whatever
All the information about menu scripts is contained within the link.
http://docs.unity3d.com/Documentation/ScriptReference/30_search.html?q=menu
Answer by Welias D. · Aug 01, 2013 at 07:28 AM
Break down your goal into achievable efforts and do like others have suggested and hit the documents. Also use Google and do a search for "unity3d whatever", this will help expand the search beyond the unity forums.
Now to the point of your goals... You need to think of your goals in respect to the functionality that will take place in the game engine. The "Log" is an object, what type of object are you going to use? A Prefab? You will need to attach a script to the prefab so that it can hold these variables (durability, etc) or you will want to keep an array, list or database table of the "Log's" durability, etc. Then you will need a script that is triggered by clicking the log. The script can either live in each log and listen for mouse clicks (on mouse down for example) or can live outside the log in a gamemanager object and listen for hits (raycast for example). Then you will need to draw the menu (look up OnGUI for starters) from the script that either lives in the log or listens for raycast hits of the logs. When you have the GUI menu options built, you can pull and push variables around for durability, experience points, etc and if you need to pick up the log and put it in your inventory, you will need to look into Destroy Object scripting docs so you can remove the object from the game world and retain the variables in your player. Keep in mind that if you can pick up an object, you will most likely want your player to drop the object back into the world at some point and you will need to look into the Instantiate scripting docs for that so that you can place the log back into the game world or maybe you just want to use the log up and once its variables are gone just remove reference to it from your inventory all together and then you will never need to instantiate the object back into the game world. The examples in the docs are excellent if you break down you goal into simple mechanical goals and then build from there.
Hope I didn't offend you if you knew all this stuff already. Just trying to help out. My punctuation is probably messed up too... been coding for days straight.
Your punctuation is fine; my comment about punctuation was about the section of the FAQ where questions are asked to be "written clearly and simply".
Your answer
Follow this Question
Related Questions
pickup items please help 4 Answers
How to fix monobehavour-pickups together with class-copying 0 Answers
How to make a selection list using either GUI system? 0 Answers
Collecting items when you destroy something? 1 Answer
How do you make a menu? 1 Answer