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"

How can I equip and switch weapons from existing Inventory?

So I have a crafting system for the game project I am making and it has a very basic inventory system that shows what was added after being crafted on the crafting system by showing it on the ui but, the inventory is not actually visible so it remains hidden to function in the background to hold and get stuff from.

I am trying to figure out how can I equip/unequip weapons onto my character from it after they are created in that crafting system to hold and use or shoot with and such?

So far I found this https://www.youtube.com/watch?v=XCMjn2sFGzQ which seems to be fairly close but, I am not very sure if that'll help me figure it out better so I am currently following along on the tutorial until I get to this point to try to figure it out better. I have also tried looking around to research it further but it's been three weeks now and I am still pretty clueless.

Does anyone have any advice about this that could point me in the right direction? or something similar?

Product Version: UE 4.15
more ▼

asked Mar 04 '17 at 10:28 PM in Blueprint Scripting

avatar image

113 14 22 25

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

it depends much on how you want your invertory system to behave, but overall, that's the generic case:

your character has to have a self-made reference "current_equipment" of class "Equipable" (you make this one), and any time you "activate" an equipment from your invertory - you set "current_equipment" to point to this item, and hide the previous "current_equipment" (visibly, stick to belt / pocket, or however you want it (abstractly hide)). rest is animations and game-specific tweaks you shall figure out. let me know if you mess something up, along with more specific details, so i can help you out :)

oh and each item you might want to equip, has to be of a class that inherits Equipable, so "current_equipment" can compatibly point to that.

example: class Hammer class Equipable

more ▼

answered Mar 04 '17 at 10:53 PM

avatar image

903 20 43 63

avatar image Deygus Mar 05 '17 at 12:30 AM

Okay, sounds like it makes a bit more sense. Will take a look at that further. I think part of my problem is that I'm still very noobish at blueprints and programming but, I am just trying everything I can to get the hang of it.

Thank you for the help and advice and if I get stuck I'll probably follow it up here to get some further guidance, thanks again!

avatar image Arty-McLabin Mar 05 '17 at 11:55 AM

good luck in your way :) feel free to mark the question as solved

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
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