Trigger an event by placing multiple static meshes each in specific places

I am completely new at UE4 and I would greatly appreciate any and all help with this matter. I am creating a 3D First Person Escape Room game. In this game, there is a puzzle that I’m wanting to create that has the player collect 10 different items from around the room and place each item in a specific location on a board in order to receive the next bit of information that’s needed to proceed. It doesn’t matter in what order they place the items just as long as each item is in its correct location

Hi! It all depends on your project. When player pick up item is this item continue to stay in the scene, or maybe Actor itself is destroyed and go to Array of structs or something like that? In general, you can use several things:

  1. Make use of delegates and create drop delegate in your player actor class. After that you can add subscriber to this delegate and check any conditions you want when delegate fires…

  2. See existing delegate FTransformUpdated TransformUpdated of USceneComponent. But this delegate fires very often, maybe this is too much…

  3. Use triggers and something like NotifyActorBeginOverlap(AActor* OtherActor) and NotifyActorEndOverlap(AActor* OtherActor) of AActor class…

Mainly all methods can be easily discussed in two main points - when and how often to check conditions

I made a small template (an overstatement) that could get you started or, at least, help you figure out a way to approach it.

There is clue actor whose mesh and tag can be set:

Here’s a configurable board that keeps track of what needs finding (Clue Map on the right):

And here’s how the board checks stuff that falls inside:

When something is dropped in, the collision box at the bottom checks for tags and decides whether an object is on the requires list - the Clue Map. This is just a crude example - in order to check for a specific location, add multiple collision boxes and have each detect a specific item. A map can help you track whether all the pieces are in place.

The object manipulation script is in the player controller, here’s the project link:

Image from Gyazo

1 Like

Forgot to script removing clues, oh well. :expressionless:

Thank you so much! I’m going to give that a shot. Thanks again!

This is amazing and has really helped for my little project.
I’ve got it setup to play a quick event when all clues have been found.

I know you posted this a long time ago, but I dont suppose you have any idea how to:

Once all clue objects have been found, and it has played a given event , reset the list so you can start the clue/object finding again? Or maybe start a second list?

Thanks for any help

  • compare the desired collectible number against the length of the set → trigger an event if the threshold is met / exceeded (although I now do see that this is already being done)
  • to reset, clear the set and set the bool to False
1 Like