Hello all! I’ve been working on a level of mine for hours and I’m stumped with something that is probably really obvious, but I just can’t figure it out. I have static mesh actors that the player character can pick up via the player blueprint, and I want to place these items on a shelf (marked by a trigger box) which will then display a message. However, I can’t seem to find a way to connect nodes that will detect when a SMA overlaps with a trigger box, but just detecting when the player character overlaps. If anyone has any advice, it would be much appreciated!
Could you send a screenshot of your blueprints? I might be able to help.
Thank you so much! Honestly, this is the simplest thing I have since I don’t really understand why nothing is printing when I carry the static mesh over and place it in my trigger box! If I can just get something like this to work, I definitely think I could figure out the rest of the code myself. The trigger box is checked to allow overlap events, and the mesh is marked the same.
I actually feel like I need to explain what I’m trying to do better. I have 8 objects (SMAs) and 2 pedestals (that have trigger boxes), and only 1/8 of the objects is the “correct” one to place on a specific pedestal. So, I’m trying to make code that will detect when the correct SMA is placed in the correct trigger box.
(I keep having issues with posting comments on here, the way threads work have changed since I last posted and I’m not sure what I’m doing wrong!)
edit: also the SMAs all have collision boxes, so I’m not that silly. ^^
Hello everyone, I am still struggling to find a solution if anyone might know how I can fix this!
Could you use the Actor has tag node? From this tutorial https://www.youtube.com/watch?v=_SjhBlj4Mu8
I hope those aren’t your actual blueprints…you realize literally NOTHING is connected to anything right? Nothing…not one node is connected properly. I see you’ve only connected the most important pins (the white execution pins that actually tell the code to execute assuming you start them off with something proper like “event begin play” on “on component begin overlap” which you haven’t) are all unconnected? You have only connected a white execution pin when you were unable to connect anything else like in the branch node or the binding. Everything else is unconnected. None of this is even being seen by the reflection system as code to run. Check out this series I think it will help you get a basic understanding of how blueprints work and give you a good foundation to build from.
This video specifically goes over creating overlap events and how to use them.
That might work, I’ll have to try it - thank you for the link! I’m not sure if this video implies that I need to turn all of my objects into a blueprint class in order to add the tags and then “get all actors of class,” but I’ll try that.
[USER=“176830”]Pilot 88[/USER] I think that might be getting me somewhere!! I hope you don’t mind, but I uploaded some of my blueprints because I’m still facing an issue - the trigger box now detects when I place the item on it, but even though it has the proper tag, it still marks it as “does not work.” Am I missing something?
(Thanks again for your help though!!)
Just an FYI, the trigger box works now because the white execution pins are connected. As for the other issue, if you converted your static mesh actors into blueprints using the “blueprint/add script” button then you should be fine as the blueprint created will inherit from the “static mesh actor” class. However, if you created a blueprint by right clicking in the content browser and creating an “actor” and giving it a name then your “get all actors of class” node searching for “static mesh actors” with the tag “H” will fail because the thing you tagged with “H” is now a blueprint class that doesn’t inherit from the “static mesh actor” class. See what you named your item and change the class of “get all actors” node to that specific item type and see if this setup will then print “works”.
Also, because you are using a “get” node and only ever taking the “0” index if you have other static mesh actors in your level (likely) then it will randomly decide which one will be in the “0” index and if that particular static mesh actor isn’t the “item” you are trying to make overlap a trigger box then it will fail. Try using a “for each loop” instead of just the “get” node and if one of the items has that tag it will print “works” but you will also see “does not work” for every static mesh actor in your level that doesn’t have the “H” tag.