Announcement

Collapse
No announcement yet.

Small Bugs in Multiplayer Tutorial

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Thanks everyone for chiming in and submitting all this great feedback! I've put all of this into a ticket and passed it along to the rest of the Docs team. I'll update this thread once I have an update on the ticket.

    Leave a comment:


  • replied
    And in section 5. Making the Projectile Cause Damage, step 4:

    This line:

    Code:
    UGameplayStatics::ApplyPointDamage(OtherActor, Damage, NormalImpulse, Hit, Instigator->Controller, this, DamageType);
    assumably should be:

    Code:
    UGameplayStatics::ApplyPointDamage(OtherActor, Damage, NormalImpulse, Hit, GetInstigator()->Controller, this, DamageType);

    Leave a comment:


  • replied
    Further, though the code compiles, I get this error (using Rider for Unreal):

    Type 'UProjectileMovementComponent' is incomplete
    I use forward declaration in the ThirdPersonMPProjectile.h-file and have included the component header in ThirdPersonMPProjectile.cpp:


    Code:
    #include "GameFramework/ProjectileMovementComponent.h"

    Leave a comment:


  • replied
    Also, in section 4. Creating a Projectile with Replication, the setting of relative location and scale in step 8:

    Code:
    if (DefaultMesh.Succeeded())
    {
        StaticMesh->SetStaticMesh(DefaultMesh.Object);
        StaticMesh->RelativeLocation = FVector(0.0f, 0.0f, -37.5f);
        StaticMesh->RelativeScale3D = FVector(0.75f, 0.75f, 0.75f);
    }
    is assumable outdated and needs to be:

    Code:
        StaticMesh->SetRelativeLocation(FVector(0.0f, 0.0f, -37.5f));
        StaticMesh->SetRelativeScale3D(FVector(0.75f, 0.75f, 0.75f));

    Leave a comment:


  • replied
    Hey echo_four ! Yes he is talking about that post. I was looking for a solution and found this post. In the Testing Multiplayer
    HTML Code:
    https://docs.unrealengine.com/en-US/Gameplay/HowTo/Networking/TestMultiplayer/index.html
    these pictures are outdated too, in 4.25 there are no Dedicated server option, only Nr of Players and Net Mode, which is a bit confusing for beginners like me to follow and set it up correctly for testing, because all Net modes provide different results. Thanks!

    Leave a comment:


  • replied
    Hey hwacookie! Thanks for pointing these out to us. Just to be sure, are you talking about: https://docs.unrealengine.com/en-US/...art/index.html?

    Leave a comment:


  • replied
    Found more issues:

    3) In the last sentence of paragraph 5 also uses Role directly.
    I think it would be better to use this instead:

    Code:
    if (HasAuthority()) {
     <...>
    }

    4) In section 6.4, there's this code:

    Code:
    UWorld* World = GetWorld();
    World->GetTimerManager().SetTimer(FiringTimer, this, &AThirdPersonMP424Character::StopFire, FireRate, false);
    HandleFire();
    I guess the "AThirdPersonMP424Character" is a typo?

    Last edited by hwacookie; 05-26-2020, 12:58 PM.

    Leave a comment:


  • started a topic Small Bugs in Multiplayer Tutorial

    Small Bugs in Multiplayer Tutorial

    Hi, I found two small issues in the C++ Multiplayer tutorial:

    1) In the code, you're referring to AActor::Role., which used to be public up until 4.24. However, in 4.25 it has become private, so this should be changed to GetLocalRole(). (This is mentioned in the Source code for 4.24, but not in 4.25. So, when trying to run the tutorial with 4.25, the user get's an error with no hint what to do about it.)

    2) In paragraph 5, it says: "In ThirdPersonMPProjectile.h, add the <...>"
    This needs to be"In ThirdPersonMPProjectile.cpp, add the <...>". Also, the headline in the code-box below refers to the header file instead of the cpp file.

Working...
X