Get player overlapping on multi-use

Hey guys,
I’m wondering how would I go about checking if the player that used multi-use entry “example” is overlapping component 1 or component 2 at the time of activation?
I’ve setup trigger boxes etc, I just can’t figure out how to run the checks when they use the multi use.

Cheers.

Something like this should work:

I suspect it might not work like that while riding a dino though. You would probably need to alter the object types and maybe some other things to get it to work.

Hey man thanks for this, I tested it out and tried a few things but it’s a no go.
Where would I set the Multi Use Player Controller? I just want to check that where I have it is working. It works for the most part but it’s not checking the using player correctly. It’s seeing other players in the component aswel. I have the setter for multiuseplayercontroller under the BpClientDoMultiUse event.

Do the two components overlap each other in any way, or is it possible at any point a player is in both overlaps at the same time?

-WM

Hey WM,
The overlaps don’t touch at all. I’ve got a slight separation and from where I was testing the player wouldn’t be overlapping both. It’s almost like its not just seeing the player that used the multi use entry.
As an example, as the server I could walk up to the door (inside box1) open the door, it opens away from the player, I walk through and close the doors. then I open them back up while inside box 2 and it opens away from the player.
Works perfectly, the issue is when a second player decides to stand in either of the boxes it starts messing some things around. :stuck_out_tongue: Any ideas?

I think you need to set the multiuse playercontroller in the “Try MultiUse” function, if you set it in BPClient MultiUse it is already to late as this runs after everything else has already happened.

Yeah I tried that Mezzow. I’m getting an error. “Error Accessed None ‘MultiUsePlayerController’ from node Branch in blueprint Wood_Door”. The branch is The second check to find the player.
Also, using this method my doors aren’t replicating when they open. Only showing to the server. But if the client opens them it shows on both… Why is that? I can’t figure it out. :confused:

Edit: I’ve actually basically got it working pretty perfectly now other than opening on the server doesn’t replicate to the client and that error message. Any ideas?

Enable Replicate Movement? Otherwise multicasting would be a fallback if the former doesn’t do anything.

EDIT: Posts: 404. Lol.

-WM

It cant be that WM, It was working with my old code. Plus, replicate movement is already checked. :slight_smile:

Question, where is this branch? Also in the TryMultiUse function? If it is, I believe all of that code natively runs on the server - I could be wrong/Auth switches may be needed to ensure it - at any rate you’ll most likely be wanting code to execute on the server so is the variable replicated? I assume that’s a variable you’ve created(as I’ve not seen it to date)?

-WM

I’ve got a multicasted custom event in the event graph which holds most of the code. All the variabled are replicated properly I believe. I created a custom function with Mezzow’s graph response to tidy things up and it’s hooked into that custom event. Inside TryMultiUse function I’ve simply got the custom variable "MultiUsePlayerConroller hooked into the switch on int for the multi use entry which is hooked into the For PC of the start node. That sets the variable and then I run the custom “OpenDoors” event, runs to a force net update and returnNode.
I should also note that when the server opens the doors it only shows to server. When a client opens doors it shows to both server and the client opening but not other clients. Also making seperate custom event with mezzows code inside and running that in TryMultiUse before my opendoor custom event almost fixes replication. I have the doors opening / closing for server and clients but for some reason the first time you open the door it doesn’t replicate and if you wait a few seconds between opening it doesnt. So strange its driving me nuts.

So I finally fixed it, got it all working just how I wanted. Thanks Mezzow and WM. Couldn’t have done it without you guys.

To explain how I got it working, basically I broke my code up into sections of multicasted events and had one main multicast that I executed from TryMultiUse.
Thanks heaps, very much a happy camper.

I’ll add I’m still having errors after testing though. “Error Accessed None ‘K2Node_CustomEvent_PC2’ from node ReturnNode in blueprint Wood_Door”.
It’s the return node in “BPGetMultiUseEntries”. Have no idea why it would even come back with that error. I havn’t touched that section. :stuck_out_tongue: