- Home /
Too subjective and argumentative
Basic Crafting system?
For my chemistry game, I want to make a basic crafting system, to combine different chemicals into different compounds. To do this, I want to have a window that the player can open, to see what different compounds they can make, like a reference or crafting book. The recipes in this book do not have to be relevant to the player's inventory.
For my second part of the question, I need to make a simple crafting system, where the player scrolls their mouse wheel, and a GUI text at the top of the screen scrolls through different things they can make. When they find the item that they like and want, they hit a key to make it go into their inventory.
I'll post code in about two hours, when I get to my computer
When I say inventory, I'm not talking like a Minecraft style, full GUI system. I want, at the bottom of the screen, GUI icons, with a number next to them, showing the quantity. These icons can be there, even if the quantity of said chemical is 0.
Any ideas? I attempted this code a few weeks ago, with no success. If you do post code, try and walk me through it, so I can find out where I went wrong.
-Thanks in advance
This the script I have for the creatures being destroyed on proximity with the projectiles (this script will be attached to them, but still not working, not sure how to use the Destroy () function). I managed to delete the creature's rigidbody, but that was it.
//The different types of chemicals in the player's inventory will be used to craft new compounds
//This script will be attached to the darts, so that when they come into contact with the creature, or just before, they will destroy the creature. I did not want to use a mesh collider because of performance problems
//one more script will be attached to the player, for picking up the drops of chemicals
//The "oxygencount" variable has to be accessable by other scripts...does that make it static?
static var oxygencount; //number of "oxygens" the player has
var distance = 3; //how close the player is to the mesh in question for it to be picked up
var oxygenmesh : GameObject; //the Gameobject that is the oxygen molecule
function Update(){
if(Vector3.Distance(transform.position, oxygenmesh.position) < distance){
Destroy (GameObject.oxygenmesh); //How do I use the Destroy () command?
}
}
Why not post your code/few weeks ago try and walk us through it and the problems you were having.
Follow this Question
Related Questions
Problems with Item drop and inventory system 1 Answer
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
Setting Scroll View Width GUILayout 1 Answer
Crafting system 2 Answers
How can you make an inventory and crafting system? 0 Answers