Creating a custom List or Collection
Trying to make an ambiguous Item class and instead of using inheritance for each item, I want each item to have a list of attributes that tell game (and player) how it can be used. The problem I'm...
View ArticleHow do i rotate an object towards mouse?
So basically I'm making a game with a stickman that can pick up stuff. I added guns and made pickable items. The gun is attached to the hand of the stickman which follows the mouse cursor. The problem...
View ArticleInventory and item class design
I have never done anything like that before so i am asking. Aim is getting a design can be implemented simple but can be extended later. Idea is : Lets start by writing an item class: Having fields...
View ArticleSUPER WEIRD BUG: Breakable Drops Multiple Items if Hit by Multiple Bullets
I am currently developing a 2D rogue-like game and in it I have some breakable objects that drop items when they are broken (either shot or dashed into). The dropping works perfectly fine in all but...
View ArticleI need to find inventory and item system, and to save them
Hi, i am searching for help or even a helper to help me build an inventory and item system, also to save the progress. I am looking for a helpful tutorial or a coder that know how to do these things...
View Article2D tilemap item collision deletes all items?
Hello! So, when my player collides with the item (coins) it deletes all instances of the coins in the scene. The coin is a tilemap and I've just attached a tilemap collider 2D and a script to the...
View ArticleProblem with sibling hierarchy in inventory sytem
Hi everyone, i explain you my problem : I have an inventory system on my game, for this i use a gameObject names "Inventory" and in it i have 6 "slot", when i pick an object i add it to a list and put...
View ArticleHow to grab button object within Instantiated UI Template?
What im trying to do here, is just havea functional button that sends the value of its element placment within my list of inventory items. When I show inventory, it shows the items that I picked up...
View ArticleSaving system ADVANCED: Item Pos, Player Pos, Amounts, Etc. 2020
So Ive seen alot posted on this, but most if not ANY of it lead to dead ends and confusion or, simply hasnt been responded to after years of setting... I followed 3 separate tutorials on utilizing save...
View ArticleSet spawn locations within a random initial spawn room?
Hey guys, so the deal is I have an array of rooms each has its own spawnpoint in the level. At start a random room is selected from the array. Each room also has a set of item spawn points. How do I...
View ArticleMy shop system script is not working
Hi, I am trying to make a shop system but my script is not working. when I press buy button it doesn't deduct the cost from the overall score also I want display a message if player don't have enough...
View ArticleHow to detect specific collisions for items.
I am attempting to create an item mechanic for a platformer I am working on. However, it does not seem to be working. The goal is to pick up an item (a square with a box collider 2D set to trigger) ,...
View ArticleClassifying item types without inheritance
I have a system for keeping track of items in my game. Here is the base class for items: [System.Serializable] public class Item : IComparable { public string name; public GameObject model; public int...
View ArticleResources folder items not in the build
Hi I made some images and audio-mixers in resources folder to use later. As in the title, after the build. My items not in the folder and some of my scripts are giving error, because of that. How can I...
View ArticleUnity 2021 MLAPI documentation help!!
**PLEASE HELP** Hello, so this isn't as much as a question. More helping a struggling guy that's been at this for at-least a month and a half and is ripping his hair out per-say. So to cut a long story...
View ArticleBetter way to reference Scriptable objects than using string?
So I'm building up a list of Trading cards using scriptable objects. I want to give a player a default deck which currently gets the card data scriptable objects by using an array of strings, which are...
View ArticleSwapping item in the inventory
Hey There! I have been making a UI inventory like click first item and second item to swap their position along slots. But the line in the commented below called problem starts - ends, items cliked are...
View ArticlePlayFab: KeyNotFoundException: The given key was not present in the dictionary.
I'm trying to set up a store in my game with PlayFab. I've set up all the items in a catalog called "Ships", and I have a virtual currency set up with the id "CC." When this code is ran, the player is...
View ArticleCannot convert from 'int' to 'PlayFab.ClientModels.ItemInstance'
I understand why I'm getting this error, but I'm not sure exactly how to fix it. ---------- I'm making a store page in my game. It checks PlayFab for all the info of the item catalog and gets the...
View ArticleModifyable item system vs ScriptableObject
Hello, I'm trying to create an item system where Items can be modified and crafted on during play, basically the only thing an item type has in common is the pool of modifiers it can draw from. My...
View ArticleBest item list
So I am making a game with a lot of items but I am not sure what the best way is to make a list of items. Now I have made my items as children in a vertical layout group and everytime you buy a new...
View ArticleItem is missing in inventory slot after i pick up and delete the item. C#
Helloo, I'm working on a inventory for my game, and i can pick up items that will be put in the inventory. After i pick it up i see the image in the inv, but after deleting the object from the scene i...
View ArticleHow to select the item inside of my inventory slot? (Followed a tutorial into...
Hi, as I have started coding, I have been following a "Coding With Unity" inventory tutorial on youtube. I'm trying to make a "destroy item" menu, but he does not cover it, so I have been trying to...
View ArticleReferencing multiple class array variable element in script
Hello everyone (and sorry if this is complicated/confusing, it's my first question on this site)! I'm trying to make a simple text-based adventure demo for my game design portfolio and I'm an amateur...
View ArticleHow to call functions based off of an int?,Making Items with unique effects
So I'm trying to make a rogue-like game where every item has a unique effect when picked up. I figured it would be a lot better performance wise to make a Scriptable Object for Items which holds...
View ArticleMonster item drop,RPG game monster item drop
I want each monster to drop an item randomly with a drop rate percentage. It can drop only one item at a time. So I randomize a number between 0-100 and if it's lower than a chance of an item it drops...
View ArticleNeed help with the pickup mechanic!
This is the script:` { public static Item Instance; public GameObject item; public GameObject ItemHandSlot; public Camera mainCam; public static bool isPickedUp; public bool isPicked; public float...
View ArticleInventory and Items
What would be the best practice on making an inventory and item system.A couple ways I was thinking of doing this: Use scriptable objects for items to store data.Have an inventory that stores a...
View ArticleItem limit for my basket
Hello I'm a beginner in game dev and I'm trying to make a simple shopping game where players can only add 10 items to their basket but I don't know how to add a limit to the capacity in my basket in...
View ArticleHow can you read and store the data from a scriptable object into Inventory?
If you have pickups such as ammo, as scriptable objects, can you read the data from those containers directly and display them on the UI once you pick them up? Or does it need a constructor to store...
View Article
More Pages to Explore .....