Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Inventory equip and unequip problem

Hello there. I'm at my wits end with my equipping/unequipping system in Unreal. I'm fairly new to UE4 in terms of actually making progress on a project but I have a basic grasp on most things. The problem I am having is when I drop a different item that is in the same class as an item I have equipped. So I have an axe in my hand and a pistol in my inventory that are both in the same "Equippable" class of my inventory item struct and dropping the pistol from my inventory causes the axe to become unequipped. I know why but cant figure out a way around it due to my lack of knowledge, that's where i'm hoping you, the experts, come in. I am fairly certain that its all down to the fact that the weapons are in the same class so when im dropping the item and it unequips, its not able to differentiate between the 2 items. I'm essentially looking for a way to make these 2 (2 so far, im planning more) items separate. I really hope this makes sense. Ill post screenshots of my dropping system, Equip, Unequip blueprints and such.

Its probably worth mentioning that i have no character mesh so am using a spring arm with a child actor component attached that i change depending on the item i equip. If you need more information, ask away. alt text alt text alt text

Thanks for taking the time and please go easy with the guidance since im not incredibly experienced.

Product Version: UE 4.11
more ▼

asked Dec 28 '16 at 05:34 PM in Blueprint Scripting

avatar image

28 6 6 11

avatar image jimd667 Dec 28 '16 at 05:57 PM


My inventory system is a little different than yours but maybe this might help.

First I would store the name of the equipped items inside a variable string or string array (multiple items equipped for instance).

Then when I drop an item I would grab the name of this item and have a check that would match the array items or variable string with the item display name being dropped and if they don't match then drop it and leave the other one there.

Hope this helps

avatar image the_tubby1 Dec 28 '16 at 07:15 PM

This sounds like something I may need to do. Thanks for a quick reply! :D

avatar image the_tubby1 Dec 28 '16 at 07:53 PM

Ok. this is killing me. I attempted something along the lines of what you said but I'm just not getting anywhere. Don't suppose you could elaborate a little?

avatar image jimd667 Dec 28 '16 at 08:17 PM

In your first image where you break the item structure down, that is where I would grab the name of the item and store it in the equipped string or array.

In your second image where you remove the index you would first create a check using the display name of the item or a custom tag, to make sure the index being removed from your inventory does not match the items that are equipped (stored inside that string/array).

if you still cannot get it check out this video set on making an inventory system in UE4...


This is what I used but I expanded on it greatly and it works for everything I need. The video is a little dated but it works.

(comments are locked)
10|2000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question