Im trying to get a pick to only be usable if the player has the engram for it. I tried to use the settings “Use Requires Owner Actor Classes” and “Equipping Requires Engrams” With the first setting I can never use the item. With the second setting I can always use the item. Is this possible or am I doing something wrong?
This should be possible right? Anyone?
Because I couldn’t figure out how to achieve this with available settings I started looking into blueprint to create this functionality myself. I don’t have any prior experience so I may be doing things completely wrong. Below is my first attempt at creating functionality to allow me to not be able to use a pick if the player doesn’t have the ability to craft that item. This however doesn’t seem to work. Any idea’s on what Im doing wrong here?
Using an item requires it to be in your inventory or on your hotbar. You’ll have to search through anything and everything that has to do with being picked up. Unfortunately my dev kit is giving me errors on launch and I cannot look around.
Thanks for the feedback, but that doesn’t help me understand why what I have now isnt working. I also can’t get any event to fire other than the Event begin play in the level blueprint. Im probably using it the wrong way. Also I still want the item to be able to be picked up for transport. Ideally the item should not be slotable(assuming that’s the hotbar).
What I also don’t understand is if I put event begin play in my blueprint(the model thingy) it doesn’t fire when I start to play. This only seems to work in the level blueprint. How do I get events to fire in my blueprint?
Oh, this could be a misunderstanding on my part. You’re looking to have an item that’s placed in the world be restricted on E -> Pickup? I thought you meant off the ground, like a death cache or dropped item. Some/all purple events must be enabled in the blueprint (should be Enable BPCanUse).
If you’re looking how to manipulate the E -> Pickup option, you’ll need to learn multiuse entries inside and out:
No I think you are still confused. I just have a pick in the characters inventory and it should not be slotable because the player doesnt have the engram for it.
I think I should just set the bCanSlot variable when some event is happening. Only thing is I can’t get any event’s to fire. I just tried a whole bunch of them that may be applicable and used them to set the bCanSlot variable but so far I have not been able to fire any event(red events) for my custom pick.
Sorry, I understand now. Items in inventories are tricky. This was quite interesting to learn about. Items themselves don’t tick, and don’t have too many functions inside of them. You’ll have to enable and use UseBPInitializeItem, then graph like this:
This doesn’t work, so hopefully someone else can chime in here, because the item doesn’t seem to update. Even switching it to a remote inventory and back didn’t update the item. You’ll also have to figure out where exactly unlocked engram classes are, but that shouldn’t be difficult.
Did you get the event to fire though?
Yes, all the way to the variable. I use print strings to test everything. This event fires twice when it’s added to your inventory, and if you don’t have the delay then it’ll fail both times when it checks for the pawn. Don’t forget to check off UseBPInitializeItem in the default variables.
Here is an easy way:
On the Weapon Blueprint check “Use BPCanEquip” in the default settings and implement the “BPCanEquip” function:
Set “ItemClass” on the “Has Engram” node to the Engram’s PrimalItem(that’s a bit backwards).
No matter what I do I can’t get this event(BPPost Initialize Item) to fire. Im using console commands to give the item to me. Also @I made the same executionpath and the BPCan Equip is not firing. I have no idea why nothing is firing.
Printed all my strings when I was testing it. Giving it to me with console commands as well as with switching it from inventories. Are you testing this in the dev kit as the localhost or as a client connecting to a dedicated server? Also, I trust that you’re enabling these functions in the defaults tab?