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

Store item images in database or on device?

Hey there, I have some questions when it comes to store "images" / "icons". Imagine we have an online multiplayer game on android. And we got 1000 items which all have an icon. The items are stored in...

View Article


Can't seem to find a good, working way of instantiating (dropping) items...

I got the basics of my item system working, however I can't figure out how to re-instantiate an item from the inventory into the world again in order to drop it. My current problem is the fact that the...

View Article


How to save an item as bought in player prefs?

I have a Character Selection scene, in which you can see the characters once at a time and see the next or the previous one by ui buttons. Recently I've added money, and works perfectly, but I can't...

View Article

Create group people, Select one or more at random.

I'm trying to create a group of items with certain attributes and then select one item and show their attributes. The "group" can be a list, array, class, anything (whatever is the absolute easiest to...

View Article

Items are remaining after ending play with OnDisable,When OnDisable is...

Hi, creating a 2D Platformer with enemies you can destroy and they'll drop powerups. I have a 50% drop for an health up, and a 50% for a mana up. That's working fine. However, if I haven't killed the...

View Article


I have the "Intelligence" ability on my character, which has a base variable (working perfectly, currently set to 21 for this instance) and a weapon (which is being added to their inventory and forced...

View Article

Item class system with inheritance, how to put them into the world?

This is my first time using inheritance to write an item system. For example, I have these two classes: [System.Serializable] public class Item { public string name; public int weight; }...

View Article

Check distance combination item in array / list

Hello, I really thanks to someone who can answer my question. Before, I'm sorry for my bad english cause my native languange is not english. I have a school project. Until now, I still try to know how...

View Article


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
Browsing all 274 articles
Browse latest View live


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