I need to check what child actor interacted with my table

![Screenshot 2024-07-08 214049|690x194](upload://tx1dK1Op6JIPrM8UGoeK7xbU9PA.jpeg
I expect that the blueprint inside the table actor will look something like this but with something else between the loop and branch to check what one of the child actors has interacted with it

Hey @samdesignsgames! Welcome to the forums!

Your screenshot didn’t upload! :frowning: Check that out as we don’t have any context for what you’re talking about, and once you do that I’ll come see what we can do!


this how the player interacts, it checks if any of the actors its overlapping are interactable.


Here In the table blueprint I expected that the way to know which one of the player`s child actors interacted with the table would look like this but im not sure what id put between the loop and branch

thanks for letting me know @Mind-Brain I reposted the images, hope it makes sense

Okay, well, I’m not really sure what you’re asking, unfortunately. If you don’t know the reason to have a branch… you don’t need it. Put one in when you need a true or false check, otherwise it doesn’t really have a purpose. :slight_smile:

As far as knowing which actor interacted with the table- on your Blueprint Interface named Interact, Interface, select the Interact function and add an INPUT. This will be of ACTOR type. Name it “Interacting actor”.

Now, when you call the interface on the player, plug in self to that, and then on the table that pin will have the interacting actor as an output, so you could, say, have that actor sit with no others having that bool checked, just that one. It would help if you also got rid of your “Get All Actors of Class” because it will be unneeded now, and you need no loop on the table, just an action for the passed in actor. :slight_smile:

Hope this helps, let us know how it goes!

Thank you for your help so far

I added the input and put a self reference into it on the player blueprint and moved into the table blueprint
but here’s where I’m confused because the bools target is a player object reference and the Interacting Actor output that we just made is an Actor object reference which apparently are not compatible.

The Bool variable is stored in the Player Blueprint FYI.
idk if I need to change the type of variable the Interacting Actor is or if there is another solution.

Well, there are two options here:

IF the only thing that can ever interact is a “Player”, feel free to change the variable as you suggested!

IF other things might be able to interact, do a cast to player from the interacting actor on the table, and set it from there! :slight_smile:

Now I need to change the players location based on which chid actor it is. I think I can create a list of locations and have each one be linked to an integer which would in turn be linked to one of the 4 child actors.
however I don’t remember how to get a list of locations?

Also Ive realised that I should explained this first as you may know a more efficient method of doing this

Fyi I figured out the list by using a vector array
Ill update you if i come across any other problems

1 Like