Hello! I’m sorry if this sound stupid, but I need someone’s help in something that might be very easy for people who learned Unreal Engine more than I do.
I’ve been following Ryan Laley’s tutorial Unreal Engine 4 Tutorial - Item Inspection Part 7 - Door & Key Example - YouTube (it’s about making interactive objects for first person view kind of game like key & door) and everything works perfect until I make several interactive objects. When I’m holding one object and press E looking on other interactive object, it disappears after pressing this button again. Is there anything I can do to fix it?
I’ve followed advices from the comments under YouTube clip, and it helped to avoid destruction of other objects, but in this case I can’t trigger the door with the object I’m holding. Can somebody help me, please?
Here’s what my FPSController blueprint looks like in its part where there’s interaction with objects:
What can I do to make interaction with pickable objects & doors work the way it should?
I can archive & upload my project to the cloud if anybody will be generous enough to take a look at it (though it might be really messy in blueprints, only starting to learn it…).
Yes, you’re right. (Sorry for being unclean, English isn’t my native). I’d like the player to carry only one object and being able to open a door if this object is key. Something is wrong in my BP, other objects are being self-destroyed after I’m trying to pick up’em while carrying other object.
Yeah, Check Look At is connected to tick.
This project is built with UE 4.26.2, here’s the link: {LINK REMOVED} Sorry for messy BP and Russian comments.
Ok. A lot of your problems are stemming from the fact that you’ve declared the variable ‘Current held item’ as an ‘item parent object’ reference. I think you should have declared it as ‘actor object reference’.
To make this change, you need to change the variable type in the FPSController, then:
I understand it’s supposed to stop the player moving while inspecting an item, but right now, all it’s doing is locking the interface. ( and the code does nothing if you look at it ).
In fact, with those changes, your code no longer destroys actors, which is what you wanted
I’m gonna go a bit further, because I think you should be able to drop what you’re holding, if you try to pick up something else…
Thank you VERY, very much, I’ve tried to do the same as you’ve described, but the results were strange.
Can I ask you to give me a simple hint, how can I stop other objects (except the door) from being highlighted and selected when CurrentHeldItem is carrying? I mean, if I’m carrying the key I need to drop it manually to take the book, but I can use it on the door. And while I’m taking the book, I can’t take the key until I’ll drop the book. I’ve tried to disable input, but it disables literally everything.
Wow! This easy?! I can’t believe but it’s really works quite much as I wanted to. Thank you VERY, VERY much for all the time you’ve spent and your professionalism, man. Thanks again, you’ve helped me a lot. Now I feel I can move on. (Can’t believe it was this easy)
Amazing.
Thanks a lot, I’ve seen it and even added in favorite in Unreal Marketplace, but since I want to get how to do some easy things at my own, I decided to follow some tutorials to learn it instead of using easy solutions. This is way more interesting, I think.
Now the only thing that bugs me is that interface keeps showing after dropping down the objects, but I think I’ll figure it out by myself, thank you very, very much again, @ClockworkOcean. You’re the best.
I’m sorry to ask a bit of a help again, but if @ClockworkOcean or someone else could take some time to give an advice, I’d be really grateful.
I’ve managed to set up interactions, so you can’t pick up another object while you already have one picked (so another one won’t destroy itself), but in this case the interaction with door isn’t working either. How can I set up interaction with door with LineTraceBy & variable or invisible trigger with OnActorOverlap, implementing it to the blueprint I already have?
(edited) I’m sorry if someone thought I’m spamming with links to my unfinished projects. I had no idea 5hus can be forbidden. Sorry. I can send it in PM if you want to help.