Quantcast
Channel: Questions in topic: "item"
Browsing all 274 articles
Browse latest View live
↧

Class inheritance for Item system question: Instance needs to be both Weapon...

I have three classes: a base Item class as well as two classes inheriting from it: Weapon and Ammo. public class Item { public string name; public Texture2D icon; } public class Weapon : Item { public...

View Article


Item database with override functions

Hi. What is the best way of creatin item database, which supports "Individual items"? For example, I was using scriptable object for quite time. You can create an item struct and change values of them....

View Article


A question about creating items using scriptable objects

So, I have the item code as follows: using UnityEngine; [CreateAssetMenu] public class Item : ScriptableObject{ public string name = "Dagger"; public Sprite sprite; public int maxQuantity = 9; public...

View Article

Grid Inventory : Move Item & Slot Highlighting

Hi ! I'm working on an inventory system with large items (Diablo/Men of War/Commandos/"insertnameofagamehere"-style) for an RPG, but I can't find a proper way to move an item from one group of slot to...

View Article

Why can't i collect item in unity 2d?

I've in my game project items which i can collect: apples, hearts and keys( by them i have possibility to open exit). I only have problem with these keys. In the beginning everything was working, but...

View Article


NullReferenceException: Object reference not set to an instance of an object...

I get this null reference with i click P (Adding item id 0 (Apple) to my inventory pointing to this line " if(itm.itemID == id)" As well as in the "Item" Script i get an error "You are trying to create...

View Article

GetItemByID error

Im making an inventory and was wondering why this error appeared ItemDataBase' does not contain a definition for `GetItemByID' and no extension method `GetItemByID' of type `ItemDataBase' could be...

View Article

Deleting item from inventory system...

As the title says, I'm trying to create a method to delete items from my inventory system but it's not functioning as anticipated. Right now it's meant to delete a stack of a consumable item when I...

View Article


referencing a gameObject with it's own script

Hello all, I'm having trouble with something very simple: I want to reference a game object with it's own script. public class ItemScript : MonoBehaviour { public Inventory inventory; public ItemType...

View Article


Inventory Management Issue

I have a GameObject you can walk on to pick it up. This GameObject has an **ItemContainer class extending from MonoBehviour**. **ItemContainer has an Item property, which does NOT extend from...

View Article

inventory and item system where every item need its own use function

At the moment i work on a Terraria liked game (Terraria is a 2d sandbox game), my problem is that i don't know how to create the inventory, i need much items with their own use function witch the...

View Article

Calling a constructor in a class with multiple constructors

Hello, I'm working on an Item system where I can create Weapons, Armors, and Consumables. The "Item" class contains three constructors for creating weapons, armors and consuambles. Item class: ![alt...

View Article

Add Item to inventory - Shop UI intro and setup

Hi there, as mentioned in the question, I did the Shop UI live training and added a player inventory and a vendor inventory to my game. Now I messing around picking up an item and put it in the players...

View Article


Items: Class or scriptableObjects?

Hello Human Beings, Should an item be created from a class (struct) of general item? Or should it be a ScriptableObject all by itself? Thanks in advance, Ethan

View Article

Item Drops on enemy spawn and death?

so I have a health potion to drop on the enemy death when it basically collides with my other objects and the giving it a random chance 25% at the moment to drop the item (potion). but currently it is...

View Article


how to acquire items in the vr game

I want to acquire an item when I saw that item for more than 3 seconds. but I don't know about Unity, I don't know what function I should use. Can you help me?

View Article

What's the name of this system?

Hello there! I'm new on unity and just begin to code a simple and generic horror game for study in Unity5. I'm brazilian and I can't found (in english) the name of the item system that we found on...

View Article


Disable a dropdown option.

So I'm making a weapon switching dropdown to change your weapon. And the thing is, I want the weapons to unlock on a specific level. The level is stored in my GameSettings class, I know how to access...

View Article

Should Items spherecast

I'm trying to implement pickable items using a button. I've implemented the check of "Player facing direction of item in certain angle". However, I wanted to implement the distance feature which would...

View Article

Random.range, winning Items, and "Scaling system"

Hey gang I know how to use Random.range to get a Item drop rate act, I was wondering hot to make it Scale with your Level So as you Level up Items become easier to get? RandomRR = Random.Range (0,...

View Article
Browsing all 274 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>