Hello everyone.
I need an inventory in my game but I have no idea how to implement that. Suggestions?
Hello everyone.
I need an inventory in my game but I have no idea how to implement that. Suggestions?
There is no inventory system in engine, you need to write your own, simples way to implement it is to create array in player pawn which contains actor of items, make pointers for things in use (weapon etc.) which points to item in array, and make funtions for managing inventory. Items actors should be used as pickups and inventory items, and makes there graphical components visble and nit depemdingmif the world is to pick up and inventory. At the end it depnds on what kind of game you doing.
I’m a 3d artist and don’t understand you very well. I’ll do my best. Thanks
Well then you will need to learn it or hire someone to help you out or wait for somebody to publish some inventory template
It depends on how you prefer it. I have typically created data tables to list all the item names, weight, value, held mesh, dropped mesh, etc. You can create a structure array though within your player character and just add all those variables within it and then in a parent item, have a default value for all of those variables. Then when you make each item from that parent, they have the defaults that can be altered and passed into the struc after the pickup event is called such as name, class, quanity, etc.
You’ll want to do a line trace to check for a hit on your pickup items. You also should have an interface set up and added to each item you want so you can make certain calls like Pickup or Use to whatever was hit by the line trace and if the thing hit doesn’t have the interface then it’s disregarded.