I didn't think this video would solve my problem with a widget popping up on both players when only one activated a pickup... a surprise to be sure, but a welcome one.
This feature is absolutely necessary for peer-to-peer multiplayer. When you execute a function on the server or client, you have to execute it directly first and then replicate it to the others without re-executing the function on the source by connecting the multicast event to a locally controlled branch that executes the function only if it is false. I always use 3 events in this case; client, server and multicast. Then I just use the client event and never have to worry about the other two since the client event is connected to the function which is connected to has authority which is connected to the server and multicast events. Not doing this would cause the function to execute twice on the source which leads to issues.
great explanation, thank you again ! .. can you give us a real example for the game when would you use IsLocallyControlled on character BP, in my understanding so far all should happen on server and be replicated on clients (not talking about player controller, just character BP)
Well not all should happen on the server actually. You might want your character to do stuff only locally too. (Without replication) That you can do with IsLocallyControlled for example. This way you could display perhaps Buffs or spells to the local player only, that other players should not know about. Or perhaps you locally want to fire certain sounds effects that only you the local player can hear? In multiplayer not everything is replicated. Everything depends on your game design
I have a question about replication. I've created a system where players can rotate their heads. My system is based on rotation InterpFloat, sometimes player see glitched roatation due package loss. So my question is how to tell all clients to exetue that operation locally? I really struggle to understand how to fire event on a specific client instance. Could you explain that in future videos, please 🙏
I have a bank widget that I want everyone to have their own widget, the installation works for a single player, I perform the opening and closing operation of the widget in the player controller, but when the client interacts, it only opens on the server side, the client cannot do this for himself, also the bank opening process depends on the interact event. I am sending it with event dispatcher, which creates an event when doing an extra bind. I wonder if this is the problem? I say run on owning client, but it still doesn't work. I was doing everything I wanted until I came to Umg or widgets. I understood the logic, but I was very confused about widgets.Multiplayer widget sucks
I put Playerstate's name on top of the character's head, but with 3 or 4 people there are always some clients that can't Get the name, I wrote if is locally controlled true, Get Player Controller run on server, Then get the getplayername setting name for playerstate from the multicast. What's the problem?
Heyaa, this is just a seperate video tutorial and not part of the bean battle royale playlist :p It is to validate wether u execute logic on the local client or not.
At last !! I've been looking for such an explanation for this function for quite a long time. Many thanks.
I didn't think this video would solve my problem with a widget popping up on both players when only one activated a pickup... a surprise to be sure, but a welcome one.
@@BlueBeam10 huh
Many thx, now i understand it. 🎉🎉🎉
Could you please consider covering "Is Server" and "Has Authority" functions ? I'm still confused regarding their usage. Thanks
This feature is absolutely necessary for peer-to-peer multiplayer. When you execute a function on the server or client, you have to execute it directly first and then replicate it to the others without re-executing the function on the source by connecting the multicast event to a locally controlled branch that executes the function only if it is false. I always use 3 events in this case; client, server and multicast. Then I just use the client event and never have to worry about the other two since the client event is connected to the function which is connected to has authority which is connected to the server and multicast events. Not doing this would cause the function to execute twice on the source which leads to issues.
woow how good explained!
great explanation, thank you again ! .. can you give us a real example for the game when would you use IsLocallyControlled on character BP, in my understanding so far all should happen on server and be replicated on clients (not talking about player controller, just character BP)
Well not all should happen on the server actually. You might want your character to do stuff only locally too. (Without replication)
That you can do with IsLocallyControlled for example.
This way you could display perhaps Buffs or spells to the local player only, that other players should not know about. Or perhaps you locally want to fire certain sounds effects that only you the local player can hear?
In multiplayer not everything is replicated. Everything depends on your game design
this is very helpful could you please tell me from where you read this content ?
I always wanted to create games
I have a question about replication. I've created a system where players can rotate their heads. My system is based on rotation InterpFloat, sometimes player see glitched roatation due package loss. So my question is how to tell all clients to exetue that operation locally?
I really struggle to understand how to fire event on a specific client instance. Could you explain that in future videos, please 🙏
I have a bank widget that I want everyone to have their own widget, the installation works for a single player, I perform the opening and closing operation of the widget in the player controller, but when the client interacts, it only opens on the server side, the client cannot do this for himself, also the bank opening process depends on the interact event. I am sending it with event dispatcher, which creates an event when doing an extra bind. I wonder if this is the problem? I say run on owning client, but it still doesn't work. I was doing everything I wanted until I came to Umg or widgets. I understood the logic, but I was very confused about widgets.Multiplayer widget sucks
I put Playerstate's name on top of the character's head, but with 3 or 4 people there are always some clients that can't Get the name, I wrote if is locally controlled true, Get Player Controller run on server, Then get the getplayername setting name for playerstate from the multicast. What's the problem?
I don't get the difference. All of them check if they're executing on the owning client?
edit: it's the target
What is local controller, never heard of this, sound useful!
That was super useful, i will start using this on my next multiplayer project
Hey! I’m not at this point yet, I’m still stuck on the last 2 videos, but this is so the other player will see the same thing as you correct?
Heyaa, this is just a seperate video tutorial and not part of the bean battle royale playlist :p
It is to validate wether u execute logic on the local client or not.
all my clients say Client0