Unreal Engine 4 Tutorial - Online Multiplayer Part 8: Player Scores

Поділитися
Вставка
  • Опубліковано 2 лип 2024
  • In this series we will be explaining how to add online multiplayer to your games. First we are going to explain how it works, then we will go into creating lobbies etc.
    In Part 8 we explain how to use the Player State actor to store each player's score they earn whilst playing in a multiplayer game.
    SUPPORT ME
    Patreon I / ryanlaley
    Buy Me a Coffee I buymeacoffee.com/RyanLaley
    Donations I paypal.me/ryanlaley
    PRIVATE 1-2-1 SESSIONS
    Email me at support@ryanlaley.com for more information and rates, or visit www.ryanlaley.com/learn-games-...
    JOIN THE COMMUNITY
    Discord I / discord
    FOLLOW ME
    Twitter I / ryanlaley
    Facebook I / ryanlaleygames
    Instagram I / ryanlaleygames

КОМЕНТАРІ • 35

  • @Sagaan42
    @Sagaan42 3 роки тому +5

    Thank you Ryan, this series gave me the basic knowledge I needed to get started on ue4 online multiplayer.
    definitely the best explained series on the topic on yt.

  • @williampettersson9399
    @williampettersson9399 3 роки тому +3

    Great tutorials! Please keep it going, you have helped me ALOT! :)

  • @omarhefnawey1959
    @omarhefnawey1959 3 роки тому +1

    Thx bro

  • @indieloopers7682
    @indieloopers7682 Рік тому +1

    Hello, I am more interested in multiplayer video games with dedicated servers, do you have this same tutorial but for that type of server? a greeting!

  • @clebo99
    @clebo99 2 роки тому +2

    How do you make it so when you push Tab it only shows on the player pressing Tab vs. everyone seeing it?

  • @LetsplayMrSingh
    @LetsplayMrSingh 3 роки тому

    Why the scoreBP is deleted in all the scene when we havn't set up replicate option check

  • @kamilnalevanko2106
    @kamilnalevanko2106 2 роки тому

    Hi I have problem I am watching your turtorials and learning this stuff becasue I am making a multiplayer game I tried to add cube on map and i can move with it by Actor but everyone of joined players have own cube and dont see other cube just cube of that client joined but interesting is that I can move with cubes of other clients but they are invisible for me.... I dont know what to do with it I selected on cube replicate and also load on client then server relevancy and nothing helped

  • @NoxnYT
    @NoxnYT 2 місяці тому

    If I was to travel to another level will the score carry over?

  • @timurshahmirzof9763
    @timurshahmirzof9763 3 роки тому

    👍👍👍👍👍

  • @MISSGNOMETF2
    @MISSGNOMETF2 3 роки тому

    when will we be doing lobbies

  • @realdanielpeach
    @realdanielpeach 3 роки тому

    Yo i was so confused, the order of the videos is flipped in the playlist

  • @safaricalamari7613
    @safaricalamari7613 3 роки тому +2

    Will you continue this series, such as Creating Lobbies like in the description?

    • @RyanLaley
      @RyanLaley  3 роки тому +4

      Yes we will be

    • @realdanielpeach
      @realdanielpeach 3 роки тому +1

      @@RyanLaley Yep thats the part nobody else does, am excited to see that

  • @omerakbu1t
    @omerakbu1t 10 місяців тому

    hey ryan,
    i'm making a full scoreboard for my fps game, i can reach game state but i cant reach player states. i tried to run code on server by client but it failed again, what should i do?

  • @suitoha9336
    @suitoha9336 Рік тому

    Why don't you use the built-in PlayerState->Score?

  • @chippychippe716
    @chippychippe716 Рік тому

    So if i where to use 20 different actors, how would i peform the kasting

  • @ShadowDoggie
    @ShadowDoggie 3 роки тому +2

    Please help the cast to my custom player state is always failing :( i have no clue what to do i did 100% the same as what yo udid

    • @creativekonami9961
      @creativekonami9961 3 роки тому +1

      same happening to me

    • @TheWufstyle
      @TheWufstyle 2 роки тому

      Same thing happening here. It will print if I choose "cast failed" and bring to print string, but wont update score. Nothing happens when I press tab on either client or server if I go through exec from cast to player state. Playerstate is set in game mode, cant really figure out why it fails to cast.

    • @Hoke_Th
      @Hoke_Th 2 роки тому

      @@TheWufstyle Are you following the tutorial in UE5? Because if so there is an engine error in the Game State that shows as null all the player state. The solution is to create a C++ class inherited from Game State Base, add this in the .h class YOUR_API AClassNameGameState : public AGameStateBase
      {
      GENERATED_BODY()
      UFUNCTION(BlueprintCallable, Category = Lobby)
      void GetPlayers(TArray& Players);
      };
      and this in the .cpp
      void ALobbyGameState::GetPlayers(TArray& Players)
      {
      for (auto PlayerState : PlayerArray)
      Players.Add(PlayerState);
      }
      Then you use this class as your Game State Base and it works ^^.

    • @TheWufstyle
      @TheWufstyle 2 роки тому

      @@Hoke_Th Well thanks for providing me an answer. It is UE5 yes. However, I'm a noob at this stuff, I have no clue about C++. Thanks a lot for the answer and solution, but I'm not capable of that work around :D

    • @danfleming1766
      @danfleming1766 2 роки тому

      Anyone still working thru this tutorial, UE5 Preview Version (2/22 release) fixes this issue.

  • @avdheshyadav9796
    @avdheshyadav9796 3 роки тому +1

    Anyone help me. Casting to custom player state is always failing (doing everything same as given in video)

    • @gimmiemyfuckingname
      @gimmiemyfuckingname 2 роки тому +2

      I couldn't figure out how to get the loop to work. maybe its just something about UE5 where it doesn't work anymore? But you can get the same info by going to the player character just right clicking empty space(not dragging from node) then type get player state and a generic engine-made variable should pop up. it will work with that one then use an interface to pass it back to the controller

    • @danfleming1766
      @danfleming1766 2 роки тому

      Anyone still working thru this tutorial, UE5 Preview Version (2/22 release) fixes this issue.

    • @kylemcbride4832
      @kylemcbride4832 2 роки тому

      @@danfleming1766 I tried this tonight on ue5 and am getting this issue

    • @danfleming1766
      @danfleming1766 2 роки тому

      @@kylemcbride4832 I'm really new to all this, so I wish I could be more helpful. When I did this tutorial using 5.0 PreRelease, it did not work. When I downloaded 5.0 Preview and ran the project using that version, it worked. The blueprint node in the CustomPlayerController called CastToCustomPlayerState which would always fail previously began working, and the whole project worked.

  • @MohamedSamy-vp2pq
    @MohamedSamy-vp2pq 3 роки тому +1

    Please man keep going for online tutorial nobody explain it

  • @danvanel2167
    @danvanel2167 3 роки тому +1

    Just Relax Ryam, We just want to know how take damage , change weapons and death and respawn.
    Ah and drive vehicles and fighter plane with guns . Thats all please :)

  • @APPTAMIZHAN
    @APPTAMIZHAN 3 роки тому

    Ryan if i follow you can i able to make something similar to pubg??

    • @dawid4450
      @dawid4450 3 роки тому +1

      something similar you mean battle royale mode? it is very hard to make something like this first of all, it cost a lot of money, also doing stuff step by step from tutorials wont be enough to make something this big

    • @safaricalamari7613
      @safaricalamari7613 3 роки тому +1

      Start small, make a very, very simple game to begin with. You will not be able to make something similar to pubg as your first game or following tutorials. Read Unreal Engines guide to blueprints and learn everything, that is probably the best way to make such a complex game.