[UE4] MULTIPLAYER Above Head Nametag!

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ธ.ค. 2024

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

  • @adriantome278
    @adriantome278 2 ปีที่แล้ว +2

    Thanks for the tutorial, I found a solution to HIDE YOUR OWN NAMEPLATE:
    - At begin play make a client side function where you create a new widget and set it to the widget component (character).
    - Attach a collision (sphere or box) and use the events begin and end overlap
    - In every function check if the overlapped actor is a player and your player is locally controlled (without this you get a bunch of weird functions)
    - Create a client side function where you pass the widget component and the visibility as parameters.
    - In your begin and end call this client function and pass the overlapped actor widget
    - In the begin put visible, in the end hidden.
    Dont forget to set the widget component and the collision as replicated component in your editor.

    • @jasongrubb2564
      @jasongrubb2564 2 ปีที่แล้ว

      You could also just set replication condition to skip owner and it'll hide your own nametag..

    • @Volvary
      @Volvary 2 ปีที่แล้ว

      Even simpler, just set the Owner No See to true on the widget

  • @stephsnotfluffy
    @stephsnotfluffy ปีที่แล้ว +2

    Never mentions where the widget is added to the viewport

  • @wellendowedstudios
    @wellendowedstudios 3 ปีที่แล้ว +2

    Man this was really good stuff right here! My nametags always bugged out and worked half the time, and had to have a few second delay to work before. I never would have thought of re-creating the nameplate widget. By doing it like you did it made my setup work perfect, I also was able to remove all the delays I had etc. So simple but sometimes things in unreal engine should work but won't haha. I had about 4 months wasted on these nametags then I gave up and left them half working. Thanks to you I fixed them. I can't say thanks enough man! I knew this was gold when you said no multi-cast :). I didn't buy your project but for people needing this it would be worth it 10 times over. Dude put this up on the unreal marketplace it will sell.

  • @arthurspears8477
    @arthurspears8477 ปีที่แล้ว

    OMG The best info right here. Had been trying everything and nothing worked right except this!

  • @trued7461
    @trued7461 3 ปีที่แล้ว +2

    this was super helpful and awesome! thank you so much! very discriptive!

  • @MRFATBEAR
    @MRFATBEAR 2 ปีที่แล้ว

    I have a proplem with Joined Clients. I get Steam Player Name as Player Name Tag and in Hosted Server Site is working fine but for Client both Hosts Character and Clients Character has Clients Name Tag.

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

    Hello, what if I want to store the 'Player Name' variable in the game instance? Thank you in advance

  • @MrDracStudios
    @MrDracStudios 3 ปีที่แล้ว

    Thank you so much for this simple solution!

  • @ISDISNJH
    @ISDISNJH ปีที่แล้ว

    followed your tutorial to par but instead of having it set the name variable in player character since I have players join battle lobby from main menu where name is set I have name stored in the game instance and then called from there, but still my widget over player is just showing generic text but when I do print string the name stored in game instance is printing and set even between level travel. any suggestions?

  • @DragonFang253D
    @DragonFang253D 2 ปีที่แล้ว

    I'm doing basically the same thing for health bars above players and AIs heads, it works perfect for the players hitting each other but as soon as a player hits an AI I get an accessed none when trying to read property "set percent" for the widget (same health bar widget for players and AI) works fine for players and doing the same process in the AI BP for any damage event throws an error if the event to set the health bar in the widget is set to multicast

  • @StellaNoctisVR
    @StellaNoctisVR 2 ปีที่แล้ว

    Great tut! If I want to use the PlayerState to keep the PlayerName. How should I do it? Thanks!

  • @보리타작-x9s
    @보리타작-x9s 3 ปีที่แล้ว

    So helpful for me!! thansk you :) I have a question.
    Should I use GameInstance when I use to openLevel?
    I want to use Lobby Level to set name or something(Hair/skin etc) with
    When I click In LobbyLevel > Open Level > set name tag above Character heads!

  • @saruedev
    @saruedev 2 ปีที่แล้ว

    My text inside the widget is not a variable like the HpBar :c

  • @tomasloparnik9256
    @tomasloparnik9256 3 ปีที่แล้ว

    When i try to test player tag in the editor with 2 windows, i set player tag and then it sets it for the other player

  • @ryanpatton1795
    @ryanpatton1795 2 ปีที่แล้ว

    I could be wrong, but this won't work if you set your name in a different level or "lobby" and then spawn into the playable world.

    • @jasongrubb2564
      @jasongrubb2564 2 ปีที่แล้ว

      Inside your name tag widget blueprint you can cast to your game instance and get a name variable of your choosing and plug it into the server event, and it that text variable will work anywhere..

  • @hernangomar5445
    @hernangomar5445 3 ปีที่แล้ว +1

    Aaron, i have my multiplayer proyect running on LAN, using the create sesion, im able to create multiples lobbys and a filter to join them, any easy way to make it online w/o using steam?

  • @robgreig3286
    @robgreig3286 3 ปีที่แล้ว

    Can you give the initial name tag a default value? this might fix your NULL problem

  • @arankasih1162
    @arankasih1162 2 ปีที่แล้ว

    is there any way possible to make the name only visible to other players? i tried to set the owner of the widget, but i can't find any.

    • @Athasin
      @Athasin 2 ปีที่แล้ว

      My question exactly. Did you ever figure out how?

  • @almobrmgfx6442
    @almobrmgfx6442 3 ปีที่แล้ว +1

    I want this character, she's amazing

  • @Lumhax
    @Lumhax 3 ปีที่แล้ว

    How can i hide the nameplate of self character but showing others ? thanks for the vid !

    • @thecrypticlk
      @thecrypticlk 3 ปีที่แล้ว +3

      If you haven't figured this out yet. What I did was in my character blueprint, on begin play I made a branch with the condition "Is Locally Controlled", then off of true I set the visibility of the widget to be hidden.

    • @jasongrubb2564
      @jasongrubb2564 2 ปีที่แล้ว

      Just set the replication condition of the name variable to skip owner

  • @GiMiat
    @GiMiat 2 ปีที่แล้ว

    Hello! I have a question, I also watched your previous video with the change color with rep notify. There, you are using multicast, and then store the rep notify on each client, but here, you store it right away on the server. So my question is are these two ways equivelant and could be used vice versa or am i missing something, thanks for your time making the videos!

    • @aaronhunt7204
      @aaronhunt7204  2 ปีที่แล้ว

      This is a good question. In my previous videos I made a habit out of multicasting too many times. It is not necessary to multicast when setting a repnotify variable! That can/should only be done on the server.

    • @GiMiat
      @GiMiat 2 ปีที่แล้ว

      @@aaronhunt7204 Thanks for your answer , I did try yesterday the method without multicast, seems to work fine
      I will verify that you have to recreate the widget for some reason
      Also I noticed that in comments below, some people reported that the master client never loses relevancy. Thats true, because the master client works as server same time so he owns all and never loses relevancy. Thats what happens if you run as standalone.
      However if you choose Play As Client from editor with 2 clients, then both clients work as non master clients. So they both loose relevancy at culling distance.

  • @Gabo6480
    @Gabo6480 3 ปีที่แล้ว

    Why do you have this video as not listed? It should be the other way around

  • @vergewissert
    @vergewissert 3 ปีที่แล้ว

    Hey I've got a question, is there a way to do this with save game variables? I've tried to use the "Populate Nametag" function in the Save Game Blueprint, but this didn't work.

    • @aaronhunt7204
      @aaronhunt7204  3 ปีที่แล้ว

      I would set up a "Load" event that runs on Begin Play. The event should load from the save game, and then run your server event that sets the repnotify variable.

    • @vergewissert
      @vergewissert 3 ปีที่แล้ว

      @@aaronhunt7204 could you explain this A bit more detailed so I’ve tried to do a name setup on the host: I’ve got A lobby level, and in this level you can’t move, but in this level you write your name and host IP address and something like this, and I’ve tried to do A save game function for the name, but when I play multiplayer , the name from the host always is the one that you wrote in the lobby, but the players that join always don’t have A name so I think the problem is that the save game variables aren’t network replicated and only one will be saved

    • @vergewissert
      @vergewissert 3 ปีที่แล้ว

      @@aaronhunt7204 BTW the save game variables are used for the map, so if you start the game where you connect to other players you get into the map

    • @aaronhunt7204
      @aaronhunt7204  3 ปีที่แล้ว

      @@vergewissert The save game variables shouldn't be replicated. All a save game is is something that stores information in local storage. In your lobby, the players should each save their names to the local save game, before the map loads. When it loads, the player characters who spawn in should locally reach into storage and load the save game by slot, then when you get those local variable values, they should be pushed up to the server for replication.

    • @vergewissert
      @vergewissert 3 ปีที่แล้ว

      @@aaronhunt7204 So the only thing that I have to do is make my save game variables local?

  • @irjayjay
    @irjayjay 3 ปีที่แล้ว

    First like, oh yeah!

  • @Dismellion
    @Dismellion 3 ปีที่แล้ว

    Just wanted to say about that replicating to everyone is worst idea and then I just saw the link to this and its ok now.