Picking up flashlight?
Okay so I'm making a horror game where at first, you start off without a flashlight but later in the game, the player finds a flashlight. What I need help with is how can I make the flashlight a...
View ArticleHow to add newly defined item to a list?
I have these different classes that I made in which I define things and each class derives from Item and my list can hold items ,but I don't know how to add this weapon I defined under a class called...
View ArticleRandom drop rate problem
var itemDrop : GameObject; var enemyHealth : int = 1; var dropRate : float = 0.25; //25% chance of dropping function OnCollisionEnter(theCollision : Collision) { if (theCollision.gameObject.tag ==...
View ArticleNeed assistance with SubType in custom class (UnityScript or C#)
I have set up a simple item class that holds all the basic information of every item in my game(Name, Prefab path, Icon, Type, etc.) and I'm trying to work in subtypes. Currently the Type is a short...
View ArticleReal Simple Inventory and Vendor System Help
Ok so i'm trying to create a very simple inventory and vendor system using the scripts below. Right now, i'm stuck at the point where i want to just click on an item from the vendor window and then the...
View ArticleHow do I change variables at collision with Player? Please Help.
How do I change variables, when the player collides with an object. I want to make if the player collides with an item, then the variable FireRate of the cannon changes. Can you help me, please?
View Articlegot a kind of health(battery) pickup, that doesnt work
so i got 2 scripts one for on my gamemanger (empty object) and the other for the pick up, when i pick it up it should send a message that my curBattery = 100, but it doesnt do anything? could anybody...
View ArticleItem collecting Problem
Hi everyone, I have a slight problem. I have this code that will show a list words of items. Now once you collect the item it will display an X saying that you have collect this item and also give you...
View ArticleMaking A Universal Pickup Script
Hello Everyone, Right now i am working on a game that has 100 weapons/items that can be picked up my question is if there is a way to assign a variable in the inspector (like savescript.weapon1 = 1)...
View ArticleDestroying a wall after collecting X amount of items?
I am trying to have a wall automatically be destroyed after I collect 5 items that I have put on the level, but I am having trouble doing so. I am not the best at coding so any help would be grateful....
View ArticleMaking an item class in Unity.
I'm best with javascript and I've learned to write classes something like this: function Item(name, description) { this.name = name; this.description = description; this.use = function use() { //Do...
View ArticleQuestion about network items
I'm currently getting a notice that the network object im destroying when the item is picked up needs to have a network view, can somebody tell me if that's stable and okey to add network view to every...
View Articlemake an item class, that branches into other itemtypes
I want to make an item class in C# to make a basic item, then in another class create a branch item like so: equipment Weapons Item: consumable equipment: Armour quest items Accessory and then have...
View ArticleHow do I make my inventory find the first slot available?
I already tried to do this but when ever I pick up an item it takes it to only the second slot! Inventory script: using UnityEngine; using System.Collections; using System.Collections.Generic; public...
View ArticleIs it a bad practice to create different classes for each in-game items?
Let's say I have 5 types of bombs. One is explosive, other one is just a smoke bomb so on and so forth. How can I handle this? I see 2 ways myself. One would be to create different classes that...
View ArticleBest way to create game
Hi! I'm working on an MMORPG. I am stuck right now. What is the best way to make the item system? I was thinking about to make an external database in a file which includes something like this: Like...
View ArticleNetwork data transfer for example items
So i have a question how is it possible to transfer data that way if 1 player drops an item and the other player reconnects so that the item would remain there or load on connecting to there? with RPC...
View ArticleHow do I trigger an animation after collecting 2 items?
I have 2 items to collect in my level and a wall animation. I want the animation to play after collecting both items but I am having trouble figuring out how. This is the code I have for the items on...
View ArticleInventory and Merchant Script problems C#
im having some trouble with my simple inventory and merchant script i want to make it so when the play presses buy item it makes its 2d texture appear in the inventorys GUI window. Heres the Inventory...
View ArticleCan't Assign Item In Array
So I've been working on an inventory script, I'm trying to test it out. Everything works fine except for the `AddItem` method, shown below. public void AddItem(Item item) { // Check if a stack is...
View Article