What is 'IsLocallyControlled' and 'IsLocalPlayerController' | Tutorial | Unreal Engine 5 | Kekdot

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ต.ค. 2023
  • 👨‍🏫 My Patreon link:
    / kekdot
    Download Project Files | Premium Tutorials | Courses
    💦 Get our Game on Steam | Kekdot Center:
    store.steampowered.com/app/14...
    ---
    In this tutorial I explain what 'IsLocallyControlled' and 'IsLocalPlayerController' do. We take a look at how they behave in Multiplayer for the Character and Player Controller class as an example.
    By using a BeginPlay Event we can take a good look at what these functions solve for us.
    #unrealengine #tutorial #multiplayer
    ---
    Welcome to Kekdot!
    👨‍🏫 Our Patreon - Download Project Files | Premium Tutorials | Courses:
    / kekdot
    🛒 Our Unreal Engine Marketplace Templates:
    www.unrealengine.com/marketpl...
    👾Join our Discord:
    / discord
    📆 We upload videos on a weekly basis
    📰 Follow us on:
    Instragram: @kekdotyoutube
    Twitter: @kekdot
    Reddit: @kekdot
  • เกม

ความคิดเห็น • 20

  • @user-sr3wr5pl9x
    @user-sr3wr5pl9x 7 หลายเดือนก่อน +3

    At last !! I've been looking for such an explanation for this function for quite a long time. Many thanks.

  • @user-sr3wr5pl9x
    @user-sr3wr5pl9x 7 หลายเดือนก่อน +4

    Could you please consider covering "Is Server" and "Has Authority" functions ? I'm still confused regarding their usage. Thanks

  • @warmachine40k
    @warmachine40k 8 หลายเดือนก่อน +1

    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.

  • @cherryVision
    @cherryVision 5 หลายเดือนก่อน +3

    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.

    • @knuckles7410
      @knuckles7410 26 วันที่ผ่านมา +1

      I think this video got you even more confused since what you describe has nothing to do with what is being said here. Character all have their own reference. I assume you have a function that start the widget, if you start this function with the proper character ref, I don't see any reason why it would open the widget on a different one.

    • @cherryVision
      @cherryVision 26 วันที่ผ่านมา

      @@knuckles7410 huh

  • @user-yw8dj1ho3g
    @user-yw8dj1ho3g หลายเดือนก่อน

    this is very helpful could you please tell me from where you read this content ?

  • @JPAS-YT
    @JPAS-YT 8 หลายเดือนก่อน +1

    I always wanted to create games

  • @Cvijo123
    @Cvijo123 5 หลายเดือนก่อน

    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)

    • @Kekdot
      @Kekdot  5 หลายเดือนก่อน

      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

  • @stevent9681
    @stevent9681 5 หลายเดือนก่อน

    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?

  • @mobildisko579
    @mobildisko579 3 หลายเดือนก่อน

    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

  • @seba0456
    @seba0456 4 หลายเดือนก่อน

    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 🙏

  • @arongomarfloreshargrove4659
    @arongomarfloreshargrove4659 8 หลายเดือนก่อน

    What is local controller, never heard of this, sound useful!

    • @arongomarfloreshargrove4659
      @arongomarfloreshargrove4659 8 หลายเดือนก่อน +2

      That was super useful, i will start using this on my next multiplayer project

  • @finesseandstyle
    @finesseandstyle 4 หลายเดือนก่อน

    I don't get the difference. All of them check if they're executing on the owning client?
    edit: it's the target

  • @karencartoon8763
    @karencartoon8763 8 หลายเดือนก่อน

    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?

    • @Kekdot
      @Kekdot  8 หลายเดือนก่อน +1

      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.

  • @HiphopBurny
    @HiphopBurny 4 หลายเดือนก่อน

    all my clients say Client0