Locally using a level blueprint

I’m trying to build a Top Down Shooter game and I want the ceiling of the room where the player is currently in to disappear and I want this to happen locally on all players connected (When player 1 is in Room 1 for him Room 2 will be blocked and when Player 2 is in Room 2 Room 1 for him will be blocked and this is happening simultaneously). What I’m currently experiencing is the map/level changes to all the players connected. Is there a way to achieve what I am saying? Thanks in advance to everyone.

121872-ceiling_ue4.gif

Two Player Dedicated Server:

121876-2player_dedicated.gif

with an event set its replicate to multicast? not really shure what youre meaning

It depends how you are doing what you’re showing in the images. How are you triggering the change? I assume it’s a trigger that detects the player pawn/character entering a trigger? If so, then it makes sense that it would change on both players because player movement is replicated on all clients, and so even on player 2’s screen, his version of the trigger still detects that a player has entered the trigger.

It’s been a while since I did online stuff with UE4, but logically what you would have to do is check whether the character that entered the trigger is locally controlled (meaning it’s not the other player) before triggering the rest of your functionality.

You could do this either by checking that the character that entered the trigger is the same as the local player character, or by checking that the character’s controller is the local controller (they should both give the same results, but the controller method is probably more robust).

Thanks for the information I’m gonna try what you said.

Try using the Controller method instead of the character comparison method and see if it behaves the same. I assumed you used a dedicated server and not a listen server since you mentioned dedicated in your post.

Thank you JParent what you said worked.

The controller method is working but it is producing some kind of error.

Error Blueprint Runtime Error: Accessed None trying to read property CallFunc_GetController_ReturnValue from function: ‘ExecuteUbergraph_Dev_Map’ from node: Branch in graph: EventGraph in object: Dev_Map with description: Accessed None trying to read property CallFunc_GetController_ReturnValue

Noted. A big thanks to you, truly appreciated it! :smiley:

Ah, yeah that actually makes sense since GetController will not return anything valid if it’s not the local character, so IsLocalController will produce that error.

You can just get rid of IsLocalController entirely and instead just use the IsValid node to check if GetController returned anything. If it returns something, then it’s the local character.