#multiplayer

1 messages · Page 646 of 1

limber gyro
#

the thing is, the animation is not playing, am i missing something?

spark stag
#

any tips/examples of letting CMC player controlled characters push each other when they collide?

dark edge
#

You probably don't want to do it that way. Do a multicast event that plays a montage

limber gyro
#

that loops and stuff

dark edge
#

You can make looping montages. Include the duration in the event.

limber gyro
#

thanks for the tip

#

i was actualy thinking of doing that for shooting but i wasnt sure it would work for all animation kinds

#

i felt like animations that are more a "one shot" would work but stuff like continuous shooting would not

dark edge
#

Is there a continuous reload tho?

limber gyro
limber gyro
dark edge
#

Ya for continuously firing I'd make it state driven. I'd do a reload by event tho.

limber gyro
#

it varies greatly from character to character in my game

#

so i have to get my head around this no matter what

dark edge
#

Anim BP wise you'd probably have a few slots for one offs and continuous. Although playing a one off montage over and over accomplishes the same thing.

limber gyro
#

so if i call a montage over and over in tick for example it wont reset the animation?

#

i still cant get the damn animation to play in the network

limber gyro
#
{
    //set the reload flag if the player state allows

    if(isStunned == false && isAsleep == false && isDead == false && ammo < MaxAmmo)
    { 
        ReloadMulticastCaller();

        isReloading = true;
        reloadTimer = reloadTime;
    }


}

void AProjectArenaCharacter::ReloadMulticastCaller_Implementation() //this is a "Server" function
{
    ServerReloadAnimationRPCMulicast(); 
}



void AProjectArenaCharacter::ServerReloadAnimationRPCMulicast_Implementation() // this is a "NetMulticast"
{
    Mesh1P->GetAnimInstance()->Montage_Play(ReloadAnimation, 1.f);

    /*if (ReloadAnimation != NULL)
    {
        // Get the animation object for the arms mesh
        UAnimInstance* AnimInstance = Mesh1P->GetAnimInstance();
        if (AnimInstance != NULL)
        {
            AnimInstance->Montage_Play(ReloadAnimation, 1.f);
        }
    }*/

}```
#

what am i doing wrong here? the fuging animation doesnt wanna play for some reason

#

but plays fine on the cliet what gives?

foggy idol
#

doesent want to play where ?

limber gyro
#

in the other clients

#

wait no

foggy idol
#

is the animation defined before play ?

limber gyro
#

i think i know what im doing wrong

foggy idol
#

ok

limber gyro
#

gimme a sec i might be an idiot

#

ye i got it

#

i was calling the thing in the wrong skeletal mesh

foggy idol
#

ohh

wet dock
#

I'm trying to make it so my server has max bandwidth of 40mbps while clients have max bandwidth of 2.5mbps. Do these settings seem correct?

knotty zephyr
#

How can I set a blueprint to run on the server only?

#

And then replicate to clients

fallow verge
#

im having an issue that gets exponentially worse based on how many clients are connected. any ideas of where to start troubleshooting this?

twin juniper
#

can anyone help me to get ghost console command to work in a multiplayer session? i have custom events set to multicast and it works when i preview on a listen server in editor but not after packaging

kindred widget
#

@fallow vergeWhat is the issue? I mean without additional information, it sounds like you simply have too much networking going on.

fallow verge
kindred widget
#

If you haven't done so yet, you might consider upping your project networking limits. They can be a little strict to begin with.

#

4.26 is 100,000 bits per second, 4.25.4 and lower were all at 10,000 by default.

somber glade
#

is there someway for me to check multiplayer sounds in PIE? It seems like if I have 2 windows open I'll just hear the sound from both windows, so I can't verify if sounds are being properly replicated.

rough jolt
#

How can I prevent actors created during runtime from not being seen by late joining players?

eternal canyon
#

and use a server rpc

#

as Im guessing ur using a multicast if ur not seeing them

#

which u definitely dont want to do when spawning actors😄

rough jolt
#

I did both a server and a multitask, i'll delete the multicast and set them to replicated! (which i probs missed) thanks!

#

@eternal canyonit worked! thanks a ton!

fading birch
dull lance
#

I keep forgetting about this, but if I do Deferred spawning on server, set the value of a replicated variable, then do FinishSpawning, will the client's Beginplay already have this replicated value?

kindred widget
#

@dull lance I doubt it. Even if it might be, I still wouldn't trust it. Beginplay in networking should mostly just be used for things that need to happen when the actor becomes relevant. So if it already has the value, good, but it should also handle whatever that was doing OnRep most likely.

glad fiber
#

Do you need to do Run On Server on the GameMode? or do you only need to do Run on Owning Client and Multicast since its assumed that everything on gamemode is running on server.

thin stratus
#

No RPCs at all in the GameMode

fading birch
#

The gamemode only exists on the server. RPCs would do nothing.

dull lance
fading birch
#

probably

#

i've never tried either

silent valley
# dull lance I keep forgetting about this, but if I do Deferred spawning on server, set the v...

I was under the impression that any replicated variables set on creation would replicate in the initial bunch to all relevant clients. When the client calls BeginPlay() on the replicated actor the replicated vars would be set.
You don't **need **to use DeferredSpawn either, but it can simplify your logic if you are using BeginPlay().

Of course it does get confusing when relevancy comes into play so you need to be careful and code somewhat defensively.

viscid bronze
#

i want to clear a players viewport in the OnPossess of an pawn

#

what is the best way to go about that
Remove all Widgets doesnt work well

thin stratus
#

OnPossess only calls on the Server

#

You would need to ClientRPC for that

viscid bronze
#

this has worked. Thanks!

fading birch
#

@viscid bronze pawns have the ReceiveControllerChangedDelegate which is triggered on the server and clients when they are possessed if you wanted to use that.

marble imp
#

Does OSC plugin related question belong to this channel?
My question is how i can set a spesific index for a spesific value in the message i send through OSC?
I see that the client can fetch values per index, but i cant see a way to set a value per index. Am i missing something?

fading birch
marble imp
#

Or does it require the use of adresses to sort messages?

fading birch
#

not sure what the OSC plugin is

marble imp
#

Sorry, ill redirect myself over there, thanks!

fading birch
#

but i wanna know what it is 😛

marble imp
#

Open sound control, basically networking audio data, but im using it for something else 😄

fading birch
thin stratus
#

Not sure if that fits better into #animation , kinda affects both:

If an Animation (not a montage) needs to either move the character (climb up) or isn't always "max speed" (so the speed would better be defined by a curve), would one use Root Motion (heard that's not so nice in Multiplayer?) or utilize animation curves?

tidal venture
#

Hey, I have a small project in which I realise the character movement comp. is having trouble to replicate rotation when using "Orient Rotation to Movement". Basically it work fine when you have no latency, but as soon as you have 30-60ms it behave badly by: jittering for other client, getting out of sync from your perspective compare to the other client perspective. I'm wondering if someone came across that and have a solution

#

(just to make sure they're is no confusion, I'm not trying to replicate that variable, it is turn on by default in the CMC)

#

to give more output, it seem like the server is not getting out of sync with other client, it's the owner of the pawn that has different value

silent valley
#

I remember we had a similar problem a while back. I can suggest these things based on our current code:
Enable bUseControllerDesiredRotation on the CMC
Call Controller->SetControlRotation() on local client to set rotation.

tidal venture
#

hum, that sound like a nice trick, trying it now, I guess you suggest me to use setControlRotation on each tick?

silent valley
#

We do, yes.

#

our game is top down, maybe it has some specifics to our use case.

tidal venture
#

okay, not very optimise, but I could deal with it later I guess, sound crazy to me that this is not well replicated, my only question is if I do it on local, I would need to get the value from the server in order to make it no go crazy right

silent valley
#

for us the local client sets his rotation each frame, I'm not sure how the value is replicated to Server and then to other clients, but it must be internal to Controller.

#

I wish I could remember but it was a long time ago, I just remember it being tricky to get right. We tried a lot of things.

#

but you might want different behavior, if you're trying to use Orient to movement

tidal venture
#

Doing it from the client doesn't seem right has it give me the same issue

#

I'm going to try it from the server, I don't know if the setControlRotation work when using Orient rotation to Movement

chrome bay
#

The CMC sends the players' local "control rotation" to the Server as part of the movement update anyway, it might be a bug that Orient Rotation To Movement isn't properly handled when playing client moves on the server, but that is odd.

tidal venture
#

It actually look like it doesn't work correctly when using Orient Rotation to Movement, without it, it's quite smooth, seems like the local control rotation is not handled with this behaviour

chrome bay
#

My guess is Epic don't use it for network stuff which is probably why it's never been bugged

tidal venture
#

Which would make sense in a way, it's most likely won't be use in a network context

#

I'll have to make my own sauce here I guess, thank you for the tips @silent valley and for the support @chrome bay

chrome bay
#

It could be worth digging through the CMC code and see where it differs.. in theory the rotation of the character should all be being updated with the timestep of the movement, maybe it's missing somewhere

#

Or maybe even it's the network smoothing that interferes..

tidal venture
#

Yeah I will take a look at it, it's a small project, was hoping to do everything in bp but might have no choice

thin stratus
#

EDIT: Multiplayer might actually be very wrong for this haha. Moving.

glad fiber
#

Should I be using components to split up login instead of having it all in the one place? For example I want to setup some logic for the inventory system, I know people have done an inventory component on the actor. Does this work in multiplayer/is it best practice? Previously I have just had the relevant RPCs on my player controller communicating with the UI. Downside is it clutters up the player-controller having basically all the logic.

silent valley
kindred widget
#

Bonus to the above comment, is also that if you create the component correctly, you can put inventories on all manner of things, not just for the players, all using the same component with easy code to handle it all by simply adding the component to an actor and not having to clutter the actors with any unnecessary code.

chrome bay
#

There is only one small caveat though, properties/RPC's on components cost a tiny bit extra - but it's very smol

#

teeny bit of extra data in the packet to identify the subobject

#

but tbh the engine has only needed to circumvent that once with characters, and only to reach fortnite numbers

upbeat estuary
#

I have a fairly complex question to ask and still need to do more research as well, but maybe you can point me into the right direction already:
We're using nDisplay with quite a few nodes, and want to get this to work in a multiplayer setting now. Current idea is to connect the master node via regular multiplayer system to an external server/host, while the nDisplay nodes just load regularly. Naively there are now two approaches: Somehow forward all replication data that arrives at the master from the host/server to the nDisplay nodes automatically (this seems like a rough task, especially then interpreting that data), or manually forward application specific replication and RPCs to the nDisplay nodes via their internal events. If anyone has some insights or can directly point out obvious flaws or a direction to look into for more info that would be really appreciated 🙂

dark edge
chrome bay
#

@dark edge yeah control rotation is almost entirely a local thing, but because characters use it to determine which way to face the control rotation is sent as part of the movement, and the server applies it to the controller on it's end too

thin stratus
#

So, I got my own PhysClimbingUp in my own CMC and all I do is set the capsule (only the capsule) to the root bone location. So basically some "fake" root motion.
It works nicely for the Server, but it seems to multiply for clients.

I'm not sure if this is generally just a bad idea. I need a way to move the player up from the wall ontop of whatever they are hanging on, without Root Motion.

#
void UPSCharacterMovementComponent::OnEnterClimbingUp()
{
    const FVector newLocation = ClimbUpResult.ImpactPoint - CharacterOwner->GetBaseTranslationOffset();
    const FScopedPreventAttachedComponentMove preventMeshMove(CharacterOwner->GetMesh());
    UpdatedComponent->SetWorldLocation(newLocation, false, nullptr, GetTeleportType());
}

void UPSCharacterMovementComponent::OnExitClimbingUp()
{
    // Make sure the Mesh is where the capsule is
    if (USkeletalMeshComponent* mesh = CharacterOwner->GetMesh())
    {
        mesh->SetRelativeLocation(CharacterOwner->GetBaseTranslationOffset());
        mesh->SetRelativeRotation(CharacterOwner->GetBaseRotationOffset().Rotator());
    }
}
#

this seems to fix the weird "client flies off into space", but there are still issues. Very open to suggestions for different solutiosn

meager spade
#

why can you not use root motion?

thin stratus
#

Well, because all I find on the net is "Don't use Root Motion in Network Games".

thin stratus
meager spade
#

i like RootMotionSources

#

its like rootmotion but without needing to do animation

thin stratus
#

Well I have animations that generally support root motion

#

I actively turned rootmotion off on them

meager spade
#

montages can root motion just fine

#

on network games

#

not animbp

thin stratus
#

So how does one do animations that don't move linear?

#

Like i have two animations, one for each direction of move left/right while hanging

#

They are not linear in motion

meager spade
#

never done anything with climbing etc, but i have done vaulting where a static animation uses a root motion source to move the capsule across the vault

#

they also support networking (as long as its running on both autonomous and server)

thin stratus
#

Hm

#

So the vault is not a montage?

meager spade
#

it is

#

but not root motion

thin stratus
#

Hmpf

#

😅 This is more complicated than it should be

meager spade
#

is this for like pulling yourself up on to a ledge?

thin stratus
#

For example, yes

#

It's that and the moving left and right while hanging on the ledge

#

But two different issues I guess

#

The pulling up could be a montage with root motion if that solves my problem. But not sure how to sync that. Probably through the CMC too

#

The other things, not sure, right now they don't fit to the movement speed at all

meager spade
#

i mean pulling up should be fine as a root motion montage (as you could guarantee the platform is smooth after)

thin stratus
#

Where would one execute that montage? Can't really do a server RPC, etc. that goes out of sync

meager spade
#

we created a PlayReplicatedMontage system

#

its basically a replicated prop, but yeah needs to be server rpc

thin stratus
#

I wonder if the CMC can drive this

#

On Entering a custom MovementState or so

meager spade
#

i try not to do too much stuff inside CMC, if i was doing this kind of system, i would likely make these abilities (for jump grab ledge, climb up from ledge)

#

and just a custom movement mode whilst hanging on ledge

thin stratus
#

Yeah that's all there is, but calling anything movement outside of the CMC will give me corrections

#

If the timestamps of the CMC and the Montage replication aren't in sync, the CMC will correct the client I guess

meager spade
#

i have never had corrections with root motion montages (maybe the initial frame)

#

unless lag was super bad (+500)

thin stratus
#

So I guss that system is more or less just working like the sequencer does

#

Where it onreps the changes and keeps stuff in sync with that

meager spade
#

i mean this is RootMotion source

#

on a client with 300ping

#

static montage

thin stratus
#

Hm yeah

meager spade
#

but i think as long as your sending the correct stuff through your saved move

thin stratus
#

No idea how RootMotionSource works. Will try to google a bit

meager spade
#

corrections should not happen often

thin stratus
#

Saved move only has "Do you want to climb up?" boolean

meager spade
#

i remember seeing a ledge climb/jump system on github

#

with some CMC code

thin stratus
#

Yeah I couldn't find anything useful :<

modern cipher
#

Wow, epic online services offering voice chat and easy anti-cheat for free? I guess free at least for unreal engine lol idk..

naive elm
#

Does anyone have suggestions to handle movement of non-characters?

summer tide
#

Can you add replicated functions in AnimNotify class?

gloomy tiger
summer tide
#

What parent? Anim Instance?

dull lance
#

quick question: I thought this was the way to check if the player is Local? (Clients and Hosting server P2P)
if (GetLocalRole() == ROLE_AutonomousProxy || GetRemoteRole() == ROLE_SimulatedProxy)

subtle raptor
#

Hi! does anyone know how I can replicate a floating variable in real time?
that it replicates all the time without affecting the network bandwidth much?

foggy rain
#

Oh, did not know, I misunderstood the documentation, thanks!

lapis sky
#

it's pretty well explained in that pdf

foggy rain
#

Yep, already reading it :)

foggy rain
subtle raptor
#

that easy?

foggy rain
subtle raptor
#

i go to try then

dull lance
subtle raptor
#

I want that when moving an object from a client, this movement is reflected in all the other clients, passing through a dedicated server, in this case, it is the client who has to send the position of said object in real time to the server all the time right?

dull lance
#

What I'm doing inside this if is fetching a LocalPlayerSubsystem, so it must only run on the owning player's machine.

foggy rain
dull lance
#

not really, because the characters are spawned on server dogdance

#

I just ended up doing cpp APlayerController* NewPC = Cast<APlayerController>(GetController()); if (IsValid(NewPC) && NewPC->IsLocalController())

kindred widget
#

@dull lanceYou can do that without the controller too if you need to. Just use the same checks on the other actor.

warped violet
#

I want a gameplay data shared with every players in p2p scenario
Where should I put it ?
Like a game play time played on the host or something

kindred widget
#

Unreal doesn't use P2P networking.

warped violet
#

Well it does with listen server

kindred widget
#

No, it doesn't.

#

The listenserver is just both server and a player on one machine instead of a separate executable for the server. Clients still cannot contact other clients as P2P implies.

warped violet
#

whatever...

warped violet
warped berry
#

Why is it that when someone joins the session while it’s in progress, the camera gets stuck in a weird angle, I have a camera component in a pawn with a strategic view and that pawn is set in the game mode

#

And also the same happens when I make a server travel to the same map

twin juniper
#

need help with this please

twin juniper
#

Guys, I read Cedric's tutorial about GameSession in the UE4 Wiki and I'm trying to solve an issue. My GameInstance has methods to host, find, join and destroy sessions, using IOnlineSubsystem and IOnlineSessionPtr, but, somehow, the connection just timed out and close, everytime, and both clients don't travel to the PongMap. I can see this in the log. In the code, I'm using FOnlineSessionSettings and FOnlineSessionSearch to configure the session initialization and search, and setting the map I should travel to. Isn't working. Here is the APongGameInstance.cpp:

#

And here are the images

#

And here is the log:

#

I just did a package and execute the .exe twice, one for the listen server, one for the client. Should I use the console command, even when working with sessions, when the OnlineSubsystem is set to NULL? I mean, these commands? I'm calling the functions StartOnlineGame, FindOnlineGame and JoinOnlineGame in the ApongPlayerController

keen thorn
#

Hi, anyone here understands how EOS p2p works. As in will multiplayer games still be client-server where a peer behaves as a server for the sake of replication?

#

Im curious on how the game clients will keep everything in sync via p2p (in case there's no longer a centralized server)

keen thorn
#

I also suspect they use p2p only for NAT punchthrough, no port forwarding needed

dark edge
#

yeah that's the domain of the online subsystem, it does'nt really come into play for the actual game networking

keen thorn
#

sounds logical otherwise their netcode needs to be very different

glad fiber
# kindred widget Bonus to the above comment, is also that if you create the component correctly, ...

This is what I want to do, another system I am setting up is like an ATM kind of thing. And for that I would ideally want to keep all the logic for the ATM inside the actual ATM actor its self expect for an interaction system which it inherits from. I'm not quite sure how I would keep these things fully modular without specific code on the client PC since I need to have the interaction with the UI as well as calls to the server, which I'm under the impression a client can't make that call on an actor it doesn't own. (more applies to the ATM than the inventory)

wet dock
#

Really stumped on this one, how could I update my config file to set dedicated server bandwidth to 30mbps and each client to 2mbps?

quiet fjord
#

guys how i can see the packed the ping of my game in unreal

#

Ser the statistics Oficina all the multiplayer lost packages etc

dark edge
#

or a component

glad fiber
#

Yeah I have the interface but its a base class that implements that interface for all the static interactable objects (atms etc)

fading birch
#

that kind of defeats the purpose of using an interface imo

glad fiber
#

Lol

#

good point

fading birch
#

just implement the interface on your controller

glad fiber
#

Not all intractable objects will be the same base class though

fading birch
#

for interacting with stuff

#

and then have a base class that responds to those calls

dark edge
twin juniper
#

Hum. I'm trying to figure out why the map where the gameplay happens isn't being loaded: the log says that the map is loaded, but the client is not travelling to it```in the JoinSession: FString TravelURL;

APlayerController* PlayerController = GetFirstLocalPlayerController();

//Creates the connection information necessary to travel to the server
if (PlayerController && SessionInterface->GetResolvedConnectString(SessionName, TravelURL))
{
    GEngine->AddOnScreenDebugMessage(
        -1,
        10.f,
        FColor::Green,
        FString::Printf(
            TEXT("Travelling to %s"),
            *TravelURL
        )
    );

    PlayerController->ClientTravel(TravelURL, ETravelType::TRAVEL_Absolute);
}``` and in the HostSession: ```UGameplayStatics::OpenLevel(
                GetWorld(),
                "PongMap",
                true,
                FString::Printf(
                    TEXT("listen?%s"),
                    SessionSettings->bIsLANMatch ? 
                        TEXT("bIsLanMatch=1") : TEXT("bIsLanMatch=0")
                )

            );```
dark edge
#

having implementation of interface on a base class is aight if 99% of the interactable items sorta do the same thing and can be based on a class

glad fiber
#

Yeah I'm not really sure how to go bout structuring it

fading birch
#

ie:

Controller:
// Calls interact on interface object
void Interact();

Object with Interface implemented
// Do stuff with this object when interacted with
void OnInteract();```
glad fiber
#

Currently I only need interaction with things like ATM machines, Store Clerks etc. But will also need picking up items, vehicles etc.

dark edge
#

Yeah you'll need at least 2 interfaces, one for interaction, and one for transactions

glad fiber
#

hmm

#

What would the transaction interface do?

dark edge
#

Passing items between inventories

#

although you could easily just do it on the inventory component

#

Interact -> Get InventoryComponent -> ??? -> Profit

glad fiber
#

Hmm ok

#

the only thing is that the player inventory behaves differently than an inventory in a vehicle or crate might function.

dark edge
#

Why would it?

glad fiber
#

Actually

#

I guess the code for viewing the inventory can be in the component but just not run on things that aren't players

dark edge
#

Viewing should only be on the widget IMO

#

inventory should just be inventory

#

the widget can call GetContainedItems or whatever and construct itself accordingly

glad fiber
#

so the key to open the inventory will go to the player controller which creates a widget. That widget then gets information from inventory component?

dark edge
#

ya

#

or character or whatever, same thing

glad fiber
#

Right, how about in multiplayer though, since I don't want inventory to be stored on the client.

fading birch
#

the client will have a copy of it

dark edge
#

just replicate it

fading birch
#

^

glad fiber
#

Currently I have an array on the gamemode which stores all players and their information (inventory etc)

dark edge
#

You should already have that built in (PlayerStates)

#

depends on if you have Player Inventory or Character Inventory. I have both in my game

#

Player Inventory being the bank, Character Inventory being what they have on them at the time.

glad fiber
#

Its only items they have on them currently

#

I'm not really sure how player states work in the whole equation.

dark edge
#

I'd just store it on Character then. Depends on your desired setup

glad fiber
#

Also wouldn't the fact that the actor is possesed by the player mean that the inventory component would be owned by the player as well? Letting them change things when they should't

dark edge
#

You can still gate by authority, its not like just owning the pawn lets you set your hp to 1,000,000

#

ownage is mostly for client-server rpcs

#

not letting you make another player drop an item etc

glad fiber
#

I see

fading birch
#

player state is also the best place to store this kind of thing in a MP game

glad fiber
#

Yeah alright, how does that work exactly?

fading birch
#

erm

#

what do you mean how does that work?

glad fiber
#

I've never used player states before

fading birch
#

think of it like a replicated actor info class

dark edge
fading birch
#

sure, but enemies would have them on their pawn instead i imagine

dark edge
#

Yeah but why the exception to the rules, just put it all on pawns.

fading birch
#

what if you change pawns?

dark edge
#

I could see inventory on PlayerState for a League of Legends, but for something where your character is more disposable putting it on pawn is fine.

dark edge
fading birch
#

sure, but changing pawns doesn't necessarily mean death

glad fiber
#

I guess the main thing that I'm trying to work out is where to store/how to use things to ensure that the player can't cheat. For example just adding a component on the player which stores their inventory, how does that work with checking that what I'm getting is what its supposed to be and things haven't been changed?

dark edge
#

There's no case in my design where your pawn is destroyed where it hasn't died. If that were the case I'd probably put stuff on Playerstate. I actually do, the bank inventory is there.

fading birch
dark edge
glad fiber
#

So would that mean that any changes to the component is happening on the server, and then being passed back to the client?

dark edge
#

yup

glad fiber
#

Yeah alright, and I can write that code in the component tho? Just using run on server?

fading birch
#

it also means the server will correct anything the client does

#

ie, cheats

#

if it doesn't mesh up when the server checks, it'll chuck the data

glad fiber
#

Alright, appreciate the help. Sort of diving head first into multiplayer here so its a bit of work to get my head wrapped around it all. Doesn't help that the kind of game im making isn't really the kind that the engine is designed for either.

half jewel
#

inventory component on the pawn, playerstate, or even the hat actor on their head it doesn't matter. it follows the same rules. nothing is more "secure" then the other

#

when your client runs a server rpc, equip this item, the rpc checks if the player even has the item in the inventory to equip

#

that is your security

#

by default no one else but the owning player can call their own rpcs.. what i mean is player2 cant call rpcs on player1s pawn

#

@glad fiber

glad fiber
#

Ok, but can player one manipulate their inventory in a way that lets them cheat? @half jewel

half jewel
#

manipulating the inventory to cheat doesnt make sense

glad fiber
#

I mean like players being able to give themselves items etc

half jewel
#

it doesnt work that way?

#

i dont know what your making but it sounds like 3 server rpcs the client can run

#

drop item, equip item, and use item

#

the client just cant run any code on the server they want

glad fiber
#

Yeah similar, drop, use and give to another player. I'm still getting a grasp of the whole multiplayer setup. But I could put the logic for those in a component for example and just have them run on server. And then the inventory WBP could call those depending on what happens?

half jewel
#

only the ones you choose, you cant "hack" it in a sense

glad fiber
#

And thinking about it yeah it makes sense that I couldn't actually give myself an item since the only thing the player can influence is getting rid of them.

half jewel
#

the grant or give item function of your game would never be marked as an rpc

#

it would just be game logic that the server is running

glad fiber
#

Yeah alright, so say for example I have a BP_Store actor that is not possessed by a player. That could then handle the logic to give a player an item?

twin juniper
#

Sorry to bother you guys, but do you have any advice to give, about the question I made earlier?

half jewel
#

so for store, you would have rpc buy item or trade item or etc.

any player can call or run this rpc whenever they want, aka hackers
in this rpc you must check, is the player near a store, can the player buy this, do they have enough money, etc

glad fiber
#

Right, and that check can occur on the BP_Store actor? Or would that need to be on the GameMode or something.

half jewel
#

i would imagine the ui buy button would call the buyItem rpc on the actor

#

since it is server rpc it is a function that the client has asked the server to run.. so you get to do the checks right there

#

bpstore buyitem rpc works and is easier to understand for code readability

glad fiber
#

Yep that makes a tonne more sense. Thanks for the help.

glad fiber
twin juniper
#

lol

#

no worries

twin juniper
#

Hum. I'm trying to figure out why the map where the gameplay happens isn't being loaded: the log says that the map is loaded, but the client is not travelling to it. In the JoinSession I'm doing this snippet: ```FString TravelURL;

APlayerController* PlayerController = GetFirstLocalPlayerController();

//Creates the connection information necessary to travel to the server
if (PlayerController && SessionInterface->GetResolvedConnectString(SessionName, TravelURL))
{
    GEngine->AddOnScreenDebugMessage(
        -1,
        10.f,
        FColor::Green,
        FString::Printf(
            TEXT("Travelling to %s"),
            *TravelURL
        )
    );

    PlayerController->ClientTravel(TravelURL, ETravelType::TRAVEL_Absolute);
}```
#

and in the HostSession:

#
                    GetWorld(),
                    "PongMap",
                    true,
                    FString::Printf(
                        TEXT("listen?%s"),
                        SessionSettings->bIsLANMatch ? 
                            TEXT("bIsLanMatch=1") : TEXT("bIsLanMatch=0")
                    )

                );```
#

Also, here are the logs:

#

Client

#

And here is the Build.cs ```// Copyright Epic Games, Inc. All Rights Reserved.

using UnrealBuildTool;

public class PongOnline : ModuleRules
{
public PongOnline(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

    PublicDependencyModuleNames.AddRange(
        new string[] { 
            "Core",
            "CoreUObject",
            "Engine",
            "InputCore",
            "OnlineSubsystem", //This is necessary to create session through OnlineSubsystems
            "OnlineSubsystemUtils", //This is necessary to create session through OnlineSubsystems
            "UMG", //This is necessary to create UMGs
            "Networking",
            "Sockets"
        }
    );

    PrivateDependencyModuleNames.AddRange(
        new string[] {
            "Slate", //This is necessary to create UMGs
            "SlateCore", //This is necessary to create UMGs        
        }
    );

    DynamicallyLoadedModuleNames.Add("OnlineSubsystemNull");

    // Uncomment if you are using Slate UI
    // PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });
    
    // Uncomment if you are using online features
    // PrivateDependencyModuleNames.Add("OnlineSubsystem");

    // To include OnlineSubsystemSteam, add it to the plugins section in your uproject file with the Enabled attribute set to true
}

}

#

The client tries to enter the PongMap, it spawns below the scenario, and returns to the MainMenuMap

#

Isn't supposed the listen server to join the session when it opens a level? Or must I manually travel to the map after doing a OpenLevel?

dull lance
#

Open Level afaik can break connections

fading birch
#

You're not actually joining the session there either

#

you're just opening the level on your own client

twin juniper
thin stratus
#

You should not

fading birch
#

the listen server can open level just fine

#

it just needs to append ?listen at the end of the level

#

so other players can join

twin juniper
dull lance
thin stratus
#

Yeah but did anyone say that he does that?

fading birch
twin juniper
#

also, the server doesnt travel to the map after calling OpenLevel

fading birch
#

if you're opening a level for the first time as a server, you want to use ?Listen

#

hang on a sec

#

let me open my P2P code I have

#

because Mine works just fine

#

xD

#

not a case of it works on my machine I promise

twin juniper
#

lol

thin stratus
#

Your code snippets are missing all the session code

#

So it's hard to say if you do everything correctly

twin juniper
#

Let me post it here

thin stratus
#

From a connection point, openLevel with ?listen and client Travel with thd connection string is all it needs

fading birch
#

he's asked in a couple of channels today, we just pointed him here

#

since it wasn't necessarily a session issue

#

@twin juniper let me see your HostSession functionality from your game instance

twin juniper
#

Here is the entire cpp

thin stratus
#

GameInstance constructor is missing the super call

fading birch
#

Have you put break points in your HostSession function?

#

to ensure the session is getting created on your server?

#

well, actually you can find your session from your other client correct?

twin juniper
#

Yes I can

fading birch
#

ok

twin juniper
#

Is creating the session with success

#

is finding the session and joining too

#

if you read the logs, both client and server said that the PongMap was loaded

thin stratus
#

Session code looks fine

twin juniper
#

and the server says that he accepted the join request

#

inside the log

dull lance
#

add a Super(ObjectInitializer)

thin stratus
#

The client disconnecting again could be multiple reasons

dull lance
#

UPongGameInstance::UPongGameInstance(const FObjectInitializer& ObjectInitializer): Super(ObjectInitializer) ... rest of the ctor stuff

thin stratus
#

Fails to spawn, wrong usage of rpc and what not

twin juniper
#

Oofff

thin stratus
#

Might be worth enabling other log like LogOnline or LogNet to be veryVerbose and checking if you can see any issues

twin juniper
#

Shouldn't the machine that host the session travels automatically to the map after calling OpenLevel?

thin stratus
#

OpenLevel is traveling

fading birch
#

ummm

twin juniper
#

Hum, but the server says it loaded the map, but nothing happens in the screen. it stays in the same MainMenuMap

fading birch
#

quick question

#

how are you testing this

twin juniper
#

if you're asking about unity test, I didn't do yet

fading birch
#

no

thin stratus
#

Not sure why it would do that.

twin juniper
#

uni

fading birch
#

how are you testing the entire process right now

thin stratus
#

This should work in PIE too

fading birch
#

he's using steam

thin stratus
#

If that's what you are aiming at

twin juniper
#

No

thin stratus
#

Doesn't matter it would use null which still works

twin juniper
#

The onlineSubsystem is null

fading birch
#

ah fair point

twin juniper
#

is set to null in the defaultengine

thin stratus
#

Seamless travel wouldn't work but that's for latee

#

Later

fading birch
#

side bar, neat little trick to edit things s/mispelledword/correctspelling

twin juniper
#

I0m just debbuging and looking inside the log

fading birch
#

ok sorry, I misread you were using steam

thin stratus
#

I would try to figure out why your server doesn't open the map first

#

First thing you can try is doing the hosting in bps

#

To rule out that your cpp code has issues

#

So simple create session node and open level with listen

vivid seal
#

how reliable/accurate is the ping in the player state to use for things like lag compensation?

dull lance
thin stratus
#

It's also compressed sooo

vivid seal
#

i know i need to multiply by 4

thin stratus
#

There should be better values available maybe

fading birch
#

divide by 0.25

thin stratus
#

Would beed to see what cmc uses

vivid seal
#

@dull lance am i better off just bouncing unreliable RPCs in the player controller every now and then to get my own ping value, or is it still going to be better than doing that?

twin juniper
#

Wait, I guess I misunderstood something: are you guys saying that OpenLevel() with ?listen should work, and the OpenLevel 4th parameter is the options, so instead "listen" as the 4th parameter, should I use "?listen"? That would be the cause?

fading birch
#

you put it in the level name string itself

#

"MapName?listen"

twin juniper
#

Because I used ```UGameplayStatics::OpenLevel(
GetWorld(),
"PongMap",
true,
FString::Printf(
TEXT("listen?%s"),
SessionSettings->bIsLANMatch ?
TEXT("bIsLanMatch=1") : TEXT("bIsLanMatch=0")
)

            );``` Offf
#

I thought that the first ? ws implicit

#

kk let me try

fading birch
#

this is the exact command i'm using:

twin juniper
# fading birch this is the exact command i'm using:

Yeah I was thinking to code it this way too, using ````APlayerController* PC = GetWorld()->GetFirstPlayerController();
const FString URL = FString::Printf(TEXT("ServerTravel WaitingRoom?listen"));
UKismetSystemLibrary::ExecuteConsoleCommand(PC, URL, PC);```

#

But right now I just put the : Super(ObjectInitializer) like @dull lance and @thin stratus said and ```UGameplayStatics::OpenLevel(
GetWorld(),
"PongMap?listen",
true,
FString::Printf(
TEXT("?%s"),
SessionSettings->bIsLANMatch ?
TEXT("bIsLanMatch=1") : TEXT("bIsLanMatch=0")
)

            );```
fading birch
#

see if that works

#

also the ? is applied

#
FString Cmd = LevelName.ToString();
    if (Options.Len() > 0)
    {
        Cmd += FString(TEXT("?")) + Options;
    }```
twin juniper
#

But isn't the same as using the fourth parameter?

fading birch
#

however, using OpenLevel removes the listen element from there.

#

as it triggers ClientTravel in the engine

twin juniper
#

lol

fading birch
#
void UEngine::SetClientTravel( UWorld *InWorld, const TCHAR* NextURL, ETravelType InTravelType )
{
    FWorldContext &Context = GetWorldContextFromWorldChecked(InWorld);

    // set TravelURL.  Will be processed safely on the next tick in UGameEngine::Tick().
    Context.TravelURL    = NextURL;
    Context.TravelType   = InTravelType;

    // Prevent crashing the game by attempting to connect to own listen server
    if ( Context.LastURL.HasOption(TEXT("Listen")) )
    {
        Context.LastURL.RemoveOption(TEXT("Listen"));
    }
}```
#

🙃

twin juniper
#

Ah, I already look this procedure today

#

Wtf

#

So you have to add the "?listen?options manually, always, directly in the map name, if I took this right

fading birch
#

honestly

#

for hosting a level

#

I would just use open MapName?Listen

#

as a console command

#

create your session prior to that

#

I do this:

#

there's probably a "proper" way to do it, but this is what works for me.

tidal venture
#

It is much easier for sure, so approved for me

twin juniper
#

I code I posted earlier was taken from Cedric's tutorial, I just modified it

#

but I will try your way too

dull lance
fading birch
#

hehe

boreal geyser
#

Does anyone know how to setup multiplayer movement for a default pawn? I am using blueprints to grab user input and to move a player's pawn using AddMovementInput, but I cannot get the client's movement to replicate in the server. Only the clients can see the server move

fading birch
#

movement is replicated by default

#

check your setup to ensure you're doing it properly

thin stratus
#

It doesn't remove the listen

#

It removes the listen if you are already hosting

#

LASTURL

#

Actually pawn movement is not replicated iirc

#

Only the cmc character movement is

fading birch
#

ah right

#

I mixed that up

#

i'm just used to thinking of characters as pawns

boreal geyser
#

yeaaa pawn movement isn't replicated by default. I tried using a multicast and I got the same result again.

#

Should I just switch to using a character? My player is just a simple gunship that moves and shoots asteroids

thin stratus
#

It's easier to just use a character, yes

#

You can set it to flying as movement mode

#

It's only a bit tricky with the collision

summer tide
#

If you use PlaySound in the animations, does it get replicated?

twin juniper
#

Well. UPongGameInstance::UPongGameInstance(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer)and ```UGameplayStatics::OpenLevel(
GetWorld(),
"PongMap?listen",
true,
FString::Printf(
TEXT("?%s"),
SessionSettings->bIsLANMatch ?
TEXT("bIsLanMatch=1") : TEXT("bIsLanMatch=0")
)

            );```didn't fix the issue, I will try to use ServerTravel and ExecuteConsoleCommand to see the resutls
hardy valve
#

Anyone know how i can check how many bytes a variable is? 🤔

thin stratus
#

Please try to use the native CreateSession Node in BPs and use the OpenLevel node with ?listen

#

And check if that works

#

If that works, then maybe there is a problem in code, if not, then you have a different issue far away from your join code

thin stratus
#

It's not really replication then though

#

It's just a sideeffect of someone else replicating that triggers your anim

kindred widget
#

@glad fiberI didn't read down too far after you tagged me. Don't know if you solved your issue. But I've always found the easiest method for that kind of thing is to do your traces and such on the client. Let them decide what they want to interact with at the Actor or Component level. Use the player's Character or Controller and have an RPC with those generic inputs. Send that to the server, and let the server call the interface events on those actors. It'll allow you to keep both your interaction selection code, and the actual interaction code very clean and easy to work with many different types.

fading birch
thin stratus
# meager spade its basically a replicated prop, but yeah needs to be server rpc

Gotta ask you about this for a second: is that just an OnRep AnimMontage or some struct with additional info? I tried it with Client and Server, which works fine, but of course needs the additional replication for simulated clients. I wonder if it's enough to just OnRep the montage and play it or if I need some ping stuff to let clients sync the montage.

EDIT: Theoretically, for starters, it might be enough to multicast the montage and filter server and owning client. Blindly assuming that no one will join or get into relevancy while the anim is playing.
But if it was to play, I would need to update some info struct every frame from the server to make sure things are kept in sync.

hardy valve
fading birch
#

what is the world save variable?

#

a pointer?

hardy valve
#

Voxel Compressed World Save

twin juniper
fading birch
#

that's only responsible for spawning the player

#

if you don't have a pawn in your mainmenu map, that's fine

twin juniper
#

kk thanks

summer tide
thin stratus
#

Yeah

#

If the ANim plays it will trigger it

#

Your replication has to make the animation play

#

Not the sound

#

The sound will by played as a sideeffect then

summer tide
#

My animation is part of BlendSpace in the AnimGraph

thin stratus
#

Might also be worth to replace this with just calling super again and seeing if that fixes it

thin stratus
twin juniper
#

Two fucking dumb decisions inside my code I guess

thin stratus
#

There are also situations where people called Reliable RPCs on Tick

#

Which is a no-go

#

Or Reliable Mutlicast in the PlayerController

#

And stuff like that

#

I would try to get this to work with a minimal setup first, cause I don't think your session code is at fault

#

A pawn be fore joining the session doesn't makes ense though

#

Joining the session is a hard travel

#

Nothing survives that

#

(despite the gameinstance)

twin juniper
#

I'm sincerely thinking to create a small teste project just to see it

thin stratus
#

Just make a new GameMode

#

And use that

#

That should remove all your custom code from gameplay

twin juniper
#

kk thanks

#

Ah ok Joining the session is a hard travel, do you mean a non-seamless operation?

#

For the first time that a client connects to a server

#

Besides that, I will try to find the real culprit later, since is 05:am here... Thanks @thin stratus @dull lance @fading birch

thin stratus
#

Yes

meager spade
#

We use a version of the rep montage from ability system component

#

Inspiration was from that

thin stratus
#

Yeah okay, then I will look through that again

#

Right now I just ServerRPC + Multicast, not caring about syncing and it works for now

#

For a first iteration that makes me happy enough

sand iris
#

I have two questions:

  1. How can we create a loading screen that will display progress of players who are connecting similar to games like league of legends / dota 2. How would we even measure "connection progress?" I want matches to not begin until all players are connected. However, I am not aware if the GameState->PlayersArray is simply "a scoket connection was made" or if it's "hey a connection was made, AND the player is fully setup and able to walk around"

  2. How can I set up a system for my game servers which works in a DevOps fashion as such that a game server is setup when a match is requested and destroyed upon closing. This part is easy, the hard part is that I want players to be able to do the following.

  • Create a match using Sessions (this already is setup)
  • When the session is ready to begin, all players must select a hero
  • Upon the countdown (to select a hero) completing, the data should be sent somewhere.
  • I've looked into Epic Online Services - Player Storage, but this is client sided and would allow players to modify their hero selection upon waiting for loading
  • Online Beacons are also not a good solution due to the fact that they require a server to already be booted up.
  • What I need is a solution where the "session" itself makes a request to some sort of tool, perhaps an AWS Lambda which will then request a new server to be spun up with a given list of heroes/player UIDs. The problem with this is that this needs to be done in a server-authoritative way.
fading birch
#

@sand iris
I'm not sure how to accomplish your first question.

As for your second question, you'll need some kind of authoritative server to handle this stuff if you don't want the player to be able to change stuff. If you're already using AWS I would look into Gamelift and just have players connect to one of your fleet instances in a lobby and have them do all of this there.

kindred widget
#

Question 1 sounds more like a loading screen based on map load percentage than connection progress. How to achieve that largely comes down to your level creation process I'd assume. In general though I'd guess it's just a simple matter of finding out how much of the level the client has loaded, have them upload that to the server and replicate it for the load screen to update.

fading birch
#

You could probably use beacons inside of an async task that runs in your loading screen module

#

that's the route I would try

spark stag
solar stirrup
#

Quick question about replicated properties and RPCs

#

I have a replicated TArray of UObjects. If I call a client RPC on one of these objects and then remove it from the array (on the server), is it guaranteed that the RPC will arrive before it gets removed on the client?

meager spade
#

there is no guarantee. but rpc's are likely to arrive before a replicated property

#

you should always handle cases where the rpc arrives after the property replication.

modern cipher
#

I think FastArraySerializer might help you it has PreReplicatedRemove if that's what you looking for?

solar stirrup
#

Fast array serializer only supports structs afaik

#

Does UObject have any method that gets called when they get removed via replication?

#

aaah maybe PreDestroyFromReplication()

#

guess I could handle it there

modern cipher
modern cipher
solar stirrup
#

that would suit my needs I guess

#

since server calls the RPC and then removes it from the replicated array

twin juniper
#

Is this normal that when i do SetStaticMesh on server it doesnt do anything (replicated actor), but on client its working

solar stirrup
#

SetStaticMesh isn't replicated

#

gotta do it clientside too

twin juniper
#

oh god 😭

#

and we can't call constructors while doing SpawnActor ?

solar stirrup
#

wdym

twin juniper
#

Idk, i can do a constructor which takes a UStaticMesh param and then setting the mesh in it

#

Instead of doing a multicast to set it 😐

twin juniper
#

So that's weird

#

Its from UE source code

solar stirrup
#

oh wait

#

it is?

#

huuuuh

#

well then, is your component replicated and owner replicated?

twin juniper
#

both, yeah

#

Btw my actor has no owner, i'm spawning it like that
APickup* SpawnedPickup = World->SpawnActor<APickup>(Position, FRotator::ZeroRotator);

#

In a UBlueprintFunctionLibrary and i get the world with GetWorldFromContextObject, my actor is not null since the code is working if executed client side but not working on server

#

Fixed it!

solar stirrup
#

check this message out

#

the compendium is your best resource for that

twin juniper
#

How can I make "inter-character-melee" combat where I have different characters but they can attack each other. I followed DevAddicts steam multiplayer series

solar stirrup
#

poor eXi

fervent yacht
#

Weird, almost like there is another form in the pinned messages, for those who don't want to read.

#

Almost...

#

Like if it was there, it would be at the very top of the list :D.

solar stirrup
#

APlayerController: only exists on the server and its owning client. Clients only have access to their own PC. These also generally never change for a player unless you do funky things manually. Each player has one.
APlayerState: Each player has one, and clients have access to all player states. Good for replicating the state of a player like their score.
AGameMode: Not replicated, server only. Game rules and logic generally.
AGameState: Much like player state, allows to replicate the state of the current game. Time left, global score etc. Anything relating to the game would be good there. Only one exists, and is accessible by all clients.

shut gyro
#

Has anyone had a problem with steam not loading up in a shipping build?

#

The SDK never seems to be initialized

kindred widget
#

The issue is simplified with one single point. Clients never talk to other clients. Clients can only ever talk to the server. Clients send data to the server through actors the server lets them "own". The server can then spread data to other clients.

bitter oriole
twin juniper
#

Hey guys quick question on where i should look to a solution.. So i have a multiplayer game and all players can use a special ability for example but im looking to have it on a global cooldown.. for example one player uses the spec it will start a cooldown displayed on all players not letting them use it until its finished... Any good pointers on what i should learn to help me with this?

fading birch
#

You'll want the server to track that. Once it's used, just send out an RPC to all clients that it's been used and have them display the cooldown.

#

I would put that particular variable in the GameState

twin juniper
#

RelevantTimeout=2
Is there an issue if I change this to say 0.1 in the configuration?

dull lance
#

or sometimes, you have "global" cooldowns that can be "owned" by players

#

Like Overwatch's ultimate abilities probably not an optimal example for this actually 😛

fading birch
#

I was thinking of Limit Break from FF

#

@dull lance I would say the GameState is better since it's a cooldown shared by all players, and the GameState is replicated to all players as is. Having it on one player's player state just seems like more calls and tracking than necessary

#

As each client would need to check each Player State

dull lance
#

Fair

#

another thing to do elmoburn is keep them in the playerstate and for visual feedback on the client side, World subsystem events

fading birch
#

You can do that from the gamestate though

#

😛

dull lance
#

(that's why I included the elmo burn emoji)

fading birch
#

i'm not sure of the meaning of that

dull lance
#

I usually use it as sort of a "pandora-box" type of action, or like "for the hell of it" / "half-evil"

fading birch
#

ah ok

dull lance
#

and if that's not enough overengineering, make a world subsystem that keeps your other world susbystems in check cool_think

fading birch
#

just throw it in a plugin for maximum versatility

hollow eagle
#

don't forget to abstract away all the code hooking into unreal

#

just in case you switch engines mid-project

#

gotta keep things as easy as possible to swap out on a moment's notice

fading birch
#

ah, so just like EOS then

dull lance
#

no. don't limit yourself like that.

hollow eagle
#

gotta abstract away the language too, write everything as a code generator so if you want to swap languages you can

dull lance
#

and do it so it's also natively compatible with ARM processors

#

in case you ever want to switch entire platforms

fading birch
#

just use punch cards

#

fuck it

hollow eagle
#

even better: write all the code in a language for a custom VM that can easily be ported anywhere.
Which was actually done for the old game "Another World"

twin juniper
#

and everyone else

fading birch
#

don't thank @dull lance it just goes to his head 😛

twin juniper
#

haha 😉

dull lance
#

Oh wow that's mean

#

See Zach_, he's already drunk in narcissism

twin juniper
#

do I need to put RelevantTimeout under [/Script/OnlineSubsystemSteam.SteamNetDriver] even if I use don't steam? or can I put it anywhere?

scarlet grotto
#

what is the max concurrent user limit of the engine?

#

(ignoring game implementation and data just connected users to a listen or dedicated server)

hollow eagle
#

There's no real hardcoded limit afaik

#

it's going to be limited by performance long before you hit any actual hard limit

scarlet grotto
#

generally people would want to have it at 10kc then distribute the load

#

and it would probably depend on your network hardware buffer i imagine?

#

but i'm assuming unreal would support somewhere in the thousands right?

hollow eagle
#

As I said, there's no hardcoded limit. You'll be limited by performance on a single server long before you hit actual limits.

#

distributing players across servers (or clients - unreal doesn't have built-in true P2P networking) isn't something unreal handles itself and is dependent on what system you use or build.

scarlet grotto
#

obviously most of would depend on the game implementation sure

#

yea... and they would do a hard seperation of servers with each server having like 1k ~ 2k user limit

#

was just wondering if anyone has done a siege on unreal lol

hollow eagle
#

Pretty much everything you've just mentioned is well outside the realm of unreal itself - any limits there aren't going to be around unreal but instead around the server tech you're using (client perf aside).

scarlet grotto
#

yea just.. curious mostly i'm sure unreal can do hundreds easily

hollow eagle
#

You could theoretically have thousands of players on a server, your perf would just be horrible. And possibly crash just due to the sheer load. But unreal itself isn't going to limit that.

scarlet grotto
#

as ut and as you mentioned unreal would have 100 ~ 200 players

#

fortnite*

#

well in fornite anyway

#

some of the 100 user ut games were ... pretty laggylol

#

especially the box one

#

ok thanks i was just wondering if there were any tests done on it before cuz i came up with no official answer on this

#

thanks!

gleaming vector
#

there is no hard coded limit to number of players

#

you'll run into your first major hurdle around 80 players

#

as there is a rather nasty loop in the engine's replication code where it loops through for-each player, for-each replicated actor, for-each replicated property to determine if the player should receive an update

#

this was the big hurdle that Epic had to solve with Fortnite, and they did that with ReplicationGraph, reducing the number of replicated actors in consideration

#

they also partially solved it with PushModel (which reduces the replicated property consideration) but the gains there from what i hear are not as big as they expected

#

that will probably get you to 120 players or so

#

until you hit the next hurdle, which is that same loop but on the player side

#

rather than the actor side

#

SpatialOS solved that problem, but their service is very expensive

#

from there, you just hit limits of computing power

peak sentinel
#

I think very informative ^

twin juniper
#
NetConnectionClassName="OnlineSubsystemSteam.SteamNetConnection"
RelevantTimeout=0.1

I changed RelevantTimeout in DefaultEngine.ini but it seems to have to effect

fading birch
#

We ended up using the Significance Manager. The Replication Graph wasn't as fine tuned as we wanted for our game, which has 100 players in it.

#

thankfully it's very very rare that all 100 players will ever be in the same space at the same time

twin juniper
#
RelevantTimeout=1

It seems that you can't have values below 1 for the RelevantTimeout hmmm

little bloom
#

I am creating a hybrid FPS/RTS, and I'm wondering how I should tackle net relevancy for displaying FPS players to the commander player, when they are out of relevancy range.

My current considered solution is to have proxy actors that are always relevant, and are only relevant to owner, that are attached to the originals and when the original actor is netculled, they are used instead.

#

These proxies simply listen and copy values from their main actor as well*

gleaming vector
#

if your players are all clustered together, it means it can skip considering replicated properties for actors far away

#

but if they are spread out (like in fortnite), you can't

fading birch
#

Gross

gleaming vector
#

replication graph solves that problem rather well

#

i think with push model it's better now

#

it's not like, as significant as repgraph

#

but still, i wouldn't be shocked if you can squeeze out like 20 more players

scarlet grotto
#

thanks for the insight

mortal anvil
#

why custom functions is important for multiplayer !?

hollow eagle
#

what?

winged badger
#

have gamestate do it

fading birch
#

^

#

gamestate has an array of all player states

#

you just iterate through that

#

you can also keep a running tally of the total score there

#

and just swap to EndMatch() when that meets the threshold value you want

hardy valve
#

Unsure where this question belongs but, Is there a way to run a windows script to add firewall commands to open ports to the packaged game when installing? 🤔

bitter oriole
#

That's a responsibility for the platform installing and updating the game

fading birch
#

generally the UE ports are already open

#

since by default it uses port 7777

bitter oriole
#

That's not what's being asked - the firewall doesn't have ports, and it does not default to open

fading birch
#

add firewall commands to open ports

bitter oriole
#

"opening ports" cannot be done on the computer itself anyway

fading birch
#

am I misreading that?

bitter oriole
#

It's an access point thing

fading birch
#

i'm not sure what they're asking then

bitter oriole
#

The question is confusing because "firewall" and "ports" are completely unrelated things

#

Firewall = Windows thing to access network, ports = access point thing to host games

hardy valve
#

Ah so its a steam issue, well it is that i need to open 2 ports one UDP and one TCP

fading birch
#

I understand the difference lol

#

I figured they were asking about ports specifically

#

not firewalls

bitter oriole
#

Both things are handled by Steam

hardy valve
#

even if i have a separate TCP socket?

bitter oriole
#

Depends if you use the UE4 net driver

#

Which goes through Steam if you do

#

In any case, you cannot open ports from the computer

#

You can only use NAT punch instead or tunnel through an already open port

#

(Steam can do both)

hardy valve
#

aha well thanks for the info

modern cipher
#

how can you achieve a smooth replicated push-back effect like on bumper car games when 2 cars collide?

fading birch
#

physics + force?

modern cipher
#

I tried applying impulse but it feels kinda laggy especially if you try it on 100+ ms

fading birch
#

it may be because the server is trying to correct the position of the player

#

maybe check in the #legacy-physics channel to see if there's something you can do for replicating it

#

or fixing that issue

#

store it in the player state, not the controller

#

only the owning client and the server know about the player controller

#

all clients know about each other's player states

#

which will be easier if you plan on doing a scoreboard or something down the road

#

for your BP stuff

#

you can use the node Switch Authority or something like that

#

and put that before your loop

#

you don't need the bServer bool at all

#

You can also just mark the points as replicated

#

no need to store a local/server version

#

if it's replicated, it's server authoritative

#

so the server will update the player state and the gamestate values, then it'll get replicated to the clients

#

I would give @thin stratus 's Multiplayer Compendium. It'll give you a great overview of multiplayer and how the different classes interact with each other

#

you can find it there ^

split siren
#

I am stuck on quite an interesting problem. What would be the cleanest way to implement team highlight/ping system (same as in Apex Legends). Basically you can ping an object, it gets highlighted for the team.
I can't figure out a way to store and replicate that info from the actor itself... Any thoughts?

viscid bronze
#

the first picture is a widget blueprint, second is actor
when I call Change Sight Attachments in the widget blueprint, the first print string works, but Server Sight Attachments (runs on server) is not called. How can I fix this?

split siren
# viscid bronze

Is the log saying something like "No owning connection found to actor ...."

viscid bronze
#

it is not
there are no errors apparently

viscid bronze
split siren
split siren
chrome bay
#

I.e. the player which did the ping, that is

split siren
chrome bay
#

You can just filter them based on the player's team

#

Alternatively have a "TeamState" actor similar to PlayerState which is only relevant to the matching team, and store the data there

split siren
#

Filter them out on client or server?

chrome bay
#

Client side

#

An alternative would be a "TeamState" actor of some kind which is only relevant to it's team, and the client HUDs pulls the info from there.

#

In HLL we just store it on player states

split siren
#

I think I will go with the TeamState approach. Thanks for you input

viscid bronze
#

how do i check the ownership

split siren
#

Simplification - RPC calls are always routed through Player Controller. If the actor "weapon" is not owned by that Player Controller, it cannot do any RPC.
Why is that? It is to prevent Player A saying to the server that Players B weapon fired. You need to be the owner of the gun to tell the server it fired. In other words, local player controller needs to be the owner of an actor to execute RPC calls.

When you spawn the weapon, there is an extra input Owner. Set that to your player controller

#

It is very important that ownership is set and changed on the server, not the client

thin stratus
#

That said, you can also pass ownership by a chain of references. If you have an actor that is owned by a player, you can use that actor too. E.g. the Character after being possessed.

brazen sluice
#

Hello!
Could somebody explain to me the logic of meshes in multiplayer?
It seems to me that the client is not able to set a mesh, set visibility or materials on it either at all
Is that correct?
And BTW I mean setting the visibility locally, as in for that particular player

viscid bronze
#

though i guess i could set it at the begin play of the weapon bp

split siren
#

That seems to be the issue, as that process does not set any ownership.
Feel free to print out GetOwner() of your child actor on server, and I suspect it will be nullptr.
That means, you need to set the ownership yourself, preferably on begin play.

#

Gimme a sec and I can send you the bp

viscid bronze
#

k ive done this

viscid bronze
split siren
#

This should work

#

Basically we set the controller of the pawn to be the owner of the child actor
The delay there is needed to wait for the Player controller to possess the pawn, because that does not happen instantly.
There are cleaner ways to do that, such as listening for possess events and setting it upon new possession, but that is getting a bit more complex

viscid bronze
#

ok this should work

#

i think it works its printing PlayerController, PlayerController1 PlayerController2

#

yep i think the system works now
thanks

viscid bronze
#

Also is that a good place to set the variable that is a weapon reference

split siren
#

I do not believe PC can be reliably accessed on the next frame. You can check every 0.1 sec if PC was set or not.

#

Or do a custom logic upon possession

viscid bronze
kindred widget
#

@brazen sluiceI haven't witnessed that I don't think. At least regarding materials. In fact I do that regularly with materials by changing them via onreps.

brazen sluice
#

Hmm weird

#

My items keeps old materials

#

on client

#

But I am definitely setting it

kindred widget
#

I've had some oddities like that. Try using other materials, and also try nulling them before setting.

#

And whatever you do, don't read the code for the StaticMeshComponent. It's terrifying.

brazen sluice
#

Ahahahahha

brazen sluice
#

So for example here I am tinkering trying to get that offset to work in the network.
On the server it works, I set the mesh to replicate
but on the client it does not?

#

OK that's a bad example

#

BEcause this is probably related to the character movement component

kindred widget
#

You'll have a lot better luck just not replicating stuff like MeshComponents, and just replicating simple properties in the actor to affect them onrep.

#

Do remember that component replication is semi new in the scope of UE4, and most of their default components have been around forever, most of them don't actually handle replication well, or at all. Much easier just to assume they don't and use their actor to handle it or subclass them and do your own component code.

brazen sluice
#

It's just very random what will or wont work one way (multicast set property) or another (replicated component)

#

It's a bit of a jungle

#

Die and retry

brazen sluice
# brazen sluice

Any idea may be why this particular one would not work?Tried with both localOffset and RelativeLocationj

kindred widget
#

I'm unsure. I've never used default replication for component movement. I've always handled it via OnReps.

brazen sluice
#

oki thanks!

brazen sluice
#

OK I found the issue it's a weird one.
In a nutshell, Unreal in the Character class caches the relative offset of the mesh in a variable..... So even if you change it and replicate, it will still be wrong
There is a function you can call in that class, called "CacheInitialMeshOffset".
If you call it after changing the value, it will work even throught network

thin stratus
#

So the CMC has code to sync RootMotion Montages for Simulated Clients.
But as far as it seems, it only does that if you actively play the Montage on the Simulated Client.
Is that correct? I would have hoped that if I start a RootMotion Montage on a Movement Replicated Character, it could figure this stuff out itself.

#

Simulated Client calls const FAnimMontageInstance* ClientMontageInstance = GetRootMotionAnimMontageInstance(); which returns a variable that is only set if you call Montage_Play.

#

Yeah okay, so for that I do have to setup something that triggers the SimulatedClient to start the Montage.

Has anyone done a Vault Montage Animation like that? I'm a bit struggling with what I should put into the CMC and what not. For Vauling, I do need to change the MovementMode, even if it's just into Flying (as opposed to my own movment Mode for vaulting), because otherwise the Walking mode will cause the Vaulting to fail/stuck in place.

I thought about highjacking the CheckJumpInput function and checking if I can vault and thus call DoVault on the MovementComponent, but that function only runs on Autonomous and Server, so the Simulated Client are lacking the Montage_Play call. Guess DoVault could set some OnRep_CurrentMontage variable that causes simulated clients to play?

#

Also how many custom flags can one pass along to the Server in the CMC? Seems like 4 are available, which is... not really a lot. Otherwise I wouldn't need to highjack jumping (same key)

thin stratus
#

So for whatever reason, not doing a jump when jump is pressed breaks the CMC. :D
Suddenly the Serve doesn't know about the jump anymore, even though the flag should still be send. Fun times. I might as well as just send a Server RPC that I do a vault.
The CMC is sooooo time consuming

spark stag
#

iirc if you want more than four flags you need to fork CMC and change the protocol

#

i have seen this done elsewhere for this reason but i can’t turn up an example atm

thin stratus
#

Yeah I'm just driving it through the character for now.

rapid bronze
#

You can give AI Player State, not sure if you should tho

vivid seal
#

I believe you can send a custom flag plus an additional variable denoting which custom thing you want to do with that flag, rather than having a dozen custom flags for every option

#

But you have to mess with saved moves, network prediction data, and a few functions to handle using your custom struct and unpacking your custom variable

sudden geyser
#

Guys I am struggling quite a bit on this. How do you create a widget for a specific player. for example a player dies then he is prompted with a game over screen without showing this screen to other players

fading birch
#

use the player controller

kindred widget
#

@sudden geyser View managers will help a lot with stuff like that. AHUD can serve as that a little bit as well if the game is simple enough. But in short, you just need a local only actor that keeps track of the state of the game, and displays your correct UI based on it. A few simpler states for example might be.. PlayerAliveAndPlaying, PlayerDeadAndSpectating, PlayerDeadInfoScreen, MatchEnd, PreMatchScreen, etc. The manager can rely on the state of the server Via Gamestate's data and then get other data locally like whether the local player has a pawn and if that pawn is dead, etc.

warped violet
#

Are UFUNCTIONs with client attribute also executes on server ? Or do I have to execute on server explicitly ?

#

I mean it doesn’t make sense but for some reason I see functions with client attribute also executing on server

foggy idol
#

in ai controller there is a bool to give them a player state

#

and they have a controller

#

an ai controller that you can get by using get controller and casting, or get ai controller

#

Anyone have any tips or articles on projectile pooling for multiplayer ?

chrome bay
#

Having done it, my advice would be not to

foggy idol
#

for example on this scoreboard "harry" is an AI

foggy idol
#

I thought it could work if you used some minimal projectile logic, pooling and some net relevancy stuff

chrome bay
#

Because most of the time you're going to be trading bandwidth for runtime cost

#

And bandwidth generally is more scarce

#

But it really depends on a lot of things like how many projectiles, how often are they spawning etc.

#

If your projectile logic is very minimal, my suggestion is to not even use actors.

chrome bay
#

Depends, what are the projectiles exactly?

#

If they're just bullets, all you need is two bits of data to represent them, position and velocity.

foggy idol
#

I could handle it in the gun but would that really be ok

#

or maybe a standalone actor to manage projectiles in the air

chrome bay
#

We use a manger for it

foggy idol
chrome bay
#

But none of the projectiles/bullets are replicated

#

They're created and simulated locally

foggy idol
#

their just spawned locally ?

chrome bay
#

yeah

foggy idol
#

then the server does some god-level calculations?

chrome bay
#

Well it's actually even simpler than all the overhead from actors etc, and very cache-friendly and performant

#

Every weapon in HLL for e.g. is a projectile/bullet weapon, and we have up to 100 players in the game.

foggy idol
#

say there are like 3 bullets currently in the air

chrome bay
#

Actor pooling at those numbers is totally unfeasible

foggy idol
#

do you just calculate their position and velocity in the manager every frame ?

#

then use that to decide collisions ?

#

im basically asking if the server just has numbers and no actual actors

chrome bay
#

yeah, weapons create a bullet "instance" - which is essentially just a small struct of data, and the manager simulates them all, and that's about it

chrome bay
#

yeah works great

foggy idol
#

because that is feasible for my IQ

foggy idol
chrome bay
#

It works for our case because all projectiles/bullets are basically the same, just bullets with slightly different properties

foggy idol
#

did you come up with custom projectile logic or do you just use something like the logic in the projectile component ?

chrome bay
#

Well it's custom logic in a sense, but it's essentially doing the same thing.

foggy idol
#

aiit then

#

im gonna see if I can delve into insanity a little

#

thank you

chrome bay
#

If you're doing crazy counts of projectiles that's how I'd do it anyway

#

If it's only a handful at once, I would just use regular actor spawning

foggy idol
#

i have a gun that shoots 1200 rpm

chrome bay
#

Obviously you lose a lot of flexibility not using actors but that's the trade-off

foggy idol
#

so actors are not an option

#

tho its just a tech demo

chrome bay
#

Yeah, answered yourself then really 😄

foggy idol
#

but wait what about the bullet on other clients

#

if client a spawns a bullet locally

#

what will client b see ?

chrome bay
#

In our case, each weapon has a replicated "last shot" struct

#

When that replicates, the client spawns a projectile locally

foggy idol
#

ohhh, I already have that for my hitscan weapons

chrome bay
#

Everybody is out-of-sync slightly of course, but it doesn't matter that much - you can't really see other bullets anyway most of the time.

foggy idol
#

I think Ill just use that

foggy idol
chrome bay
#

It's worked out well for us anyway. Projectiles are then just data assets with some properties that can be tweaked

dark edge
chrome bay
#

just particle systems

#

spawn a particle for each bullet, then move it during the projectile update loop

gleaming vector
#

I'm working on something completely insane with @nova wasp

#

ECS-based projectiles

#

no actors

dark edge
chrome bay
#

@dark edge particle comps can exist without actors

gleaming vector
#

we're at like, 10k bullets sub 1ms

#

probably more

chrome bay
#

they get stuck into the world settings actor or something

#

yeah, that's similar to what we did. Just no ECS as such, since all the bullets are the same thing

dark edge
#

Sweet, I hadn't tackled the visualization yet but I was trying to think of maybe having a global particle system. But if particles are basically just data in some sort of particle system anyway, that makes sense.

gleaming vector
#

pushing bullet positions directly to a niagara system is really easy

chrome bay
#

Global could work too totally, especially with niagara

#

yeah 😄

gleaming vector
#

saves a LOT of uobject creation

dark edge
# chrome bay yeah 😄

That sounds like a tree worth barking up. Right now I'm just visualizing with showing the line traces LOL

gleaming vector
#

but, yeah, im close to having this working in multiplayer

dark edge
gleaming vector
#

nah, i'm going to sync the whole bullet

#

i created a custom network channel

#

and im sending custom packets to the client with positions

#

at this point, I just need a way to refer to entities and components across the network

#

since while flecs has an entity id system, the order in which entities are created is unknown and not reliable, so I have to tag each entity with a number to refer to them over the network

#

tho

#

since this is deterministic, i could just send key events

#

emission, impact, etc

dark edge
gleaming vector
#

probably have the client send a prediction key-like struct. maybe "my client entity id for this predicted projectile"

#

then have the server send back "this network id N is your entity id E"

dark edge
#

I guess for favor the shooter you could just Mark certain projectiles as the authoritative ones on each machine, with the server spawned ones being authoritative from AI shooters and each client marking their own projectiles as authoritative

chrome bay
#

assuming determinism makes sense, but i guess anything that causes those events then also has to be deterministic

gleaming vector
#

right

chrome bay
#

always the gotcha about determinism.. it's all or nothing 😄

gleaming vector
#

yeppp

foggy wave
#

When i run 2 windows i can host and join my game ,at first when i built the multiplayer system i sent it to my friends and test it and it worked we connected just fine but after i progressed the game and built it again without changing anything in the multiplayer stuff it doesnt work , my friends are on the same country and if i close steam and open 2 times the game i can connect to my host but with steam it doesnt
please help

nova wasp
#

I don't think we are that crazy yet, still have to get cute with the async traces

gleaming vector
#

yeah, the point is that the slowdown is the interaction with unreal engine's world

nova wasp
#

for sure, yeah

hollow eagle
#

You're meant to set that option in the ai controller's defaults, not in a blueprint graph.

#

look at the image you replied to.

hollow eagle
#

you don't give AI a player controller... you give it an AI controller

#

You're structuring your code wrong. You don't give player controllers to an AI.

#

If there is shared logic, there are plenty of other ways to go about this

#

custom components, putting logic on the pawn/character instead, etc

#

There really shouldn't be that much shared code between them though - a controller is meant to be the "brain" behind a pawn/character. In the case of a player controller that mostly means responding to player inputs - something that an AI doesn't have. An AI controller would have logic related to its own decision making - something a player controller wouldn't have. They might both interface with their pawn in the same way, but the code calling into the pawn would be entirely different.

fading birch
#

the Player Controller and AI Controller really makes me wish we could do multi inheritance in UE4

dark edge
#

Why, what would you need both in one class for?

fading birch
#

it's more of I would want to override some functionality from AController that would be shared.

foggy idol
#

To add to what siliex said any logic you have in your player controller should only concern the player/humans. If you want to do something like store score in the player state you should implement that logic in the player state so ai can also use it if not you will have to do some custom logic in the ai controller

#

I use that approach in my own setup and my ai controller is practically empty as kills and score are stored in the player state

ripe ravine
#

Hey, Im having issues with replicating paper sprites

#

The client is able to change from walking to idle, but cant change from left to right while the server has no problem

it has just occured to me that it may be a problem replicating the direction so ill look into that

#

oh wait no because the server can do it. I dont know

foggy idol
# ripe ravine

In theory you should only have to update the direction

#

So I don’t know how flip books work but I would ensure that the direction is being updated properly in clients and the server

ripe ravine
#

Replicating just the direction has the same effect as before ( So I didnt need to replicate the sprite ) But Its not changing it either

foggy idol
#

If so then plug it directly to tick

#

Also you aren’t actually updating direction based on the direction the client is moving

#

One last question does the flip book character have its movement replicated ?

ripe ravine
#

yea

foggy idol
#

Ok then

#

Search for get velocity

#

And then search for unrotate vector

#

Then use the characters rotation to unrotate it

#

So we can get the characters velocity in a specific direction

#

If you don’t understand I can show you but it would have to be in a bit because I’m not home rn

#

@ripe ravine

ripe ravine
#

The character doesnt rotate though, when swapping direction its changes the sprites ( I have a left and a right sprite )

foggy idol
#

But the character does have velocity ?

ripe ravine
#

Yea it moves on the x and z axis, then based on whether theyre moving positive or negative I can tell what direction theyre moving

foggy idol
#

Ok, even though the character does not rotate can you search for the get rotation node ?

#

I want to tell what the characters velocity is on the x axis

#

Based on if it’s positive or negative we will know if the character is moving left or right

ripe ravine
#

Do you want me to just print string that?

foggy idol
#

Have you unrotated the velocity ?

ripe ravine
#

yea

foggy idol
#

Can you print the x value so you can know what direction is positive and what direction is negative

ripe ravine
#

Left is -60 and right is 60

#

in the X

foggy idol
#

Then now just do a greater than zero from the x value

#

If it’s greater the character is moving right

#

Else the character is moving left

#

Then use that bool instead of the direction to select the correct sprites

#

And plug the set flip book node directly to the tick node ,since velocity is replicated we don’t need any server events

ripe ravine
#

alright give me one moment to set that up

foggy idol
#

Aiit

ripe ravine
#

OH SHIT

#

Hahaha thank you so much man

#

It works

foggy idol
#

Yeah no worries

#

As a rule of thumb I always try to do things by deriving them from other properties to reduce RPC’s

ripe ravine
#

Ill try to remember that in the future

terse geode
#

is there something extra required for this? when attempting to call an server rpc on the client, the client gets kicked off

works in the editor, but in a packaged build across the lan, there is a lognet error that goes: client attempted to make subobject

half kraken
#

Could someone help me with a ready system, I'm having some issues trying to see how many people have readied up

empty axle
half kraken
#

True xD. How could I do a ready system to check if every player in the server is ready? Because I've tried replicating the int variable and setting it and when the client clicks he adds one but then when the server clicks ready he also adds one but it's seperate

#

If I'm not being clear I'm sorry I'm a bit new to unreal and I'm trying to get better

empty axle
half kraken
#

Oh ty, I'll try it in a bit I'm doing smth right now.

summer tide
#

If I put GetLifetimeReplicatedProps in my ActorCOmponent and from blueprint make that the parent class. THe UE4 editor crashes. Any idea?

bitter oriole
#

Debug it

chrome bay
#

Can't help without any debug/crash info

manic terrace
#

I am using the Steamworks default AppId and when doing the search. I found a session that I didn't open and I am guessing it's from someone else. Is this normal? I mean Steam and Unreal think it is a valid one. It is also playing a Windows sound when finishing the search that I didn't add.

rapid bronze
#

If you use AppID 480, you'll see everyone using it too, even if different projects

manic terrace
#

oh yea but it showed up in my server list that I have made that only shows my games.

#

normally it just throws a warning in the logs and then doesn't show up when I do the search because it isn't my game.

#

maybe it just got confused I guess. I hope at least

chrome bay
#

anything goes without your own App ID really.

modern cipher
#

how often should you update player data if you want to save it to a database ?

summer tide
# chrome bay Can't help without any debug/crash info
[2021.06.25-12.04.54:257][152]LogWindows: Error: 
[2021.06.25-12.04.54:257][152]LogWindows: Error: Fatal error!
[2021.06.25-12.04.54:257][152]LogWindows: Error: 
[2021.06.25-12.04.54:257][152]LogWindows: Error: 
[2021.06.25-12.04.54:458][152]LogExit: Executing StaticShutdownAfterError
[2021.06.25-12.04.55:606][152]LogWindows: FPlatformMisc::RequestExit(1)
[2021.06.25-12.04.55:607][152]LogCore: Engine exit requested (reason: Win RequestExit)
[2021.06.25-12.04.55:671][152]Log file closed, 06/25/21 08:04:55```
#

I don't see much

#
{
    return Health_c > 0;
}
void UWWSActorComponent::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const
{
    Super::GetLifetimeReplicatedProps(OutLifetimeProps);
    DOREPLIFETIME(UWWSActorComponent, Health_c);
}```
#

THis is the code

#

These are in my ActorComponent.

kindred widget
#

Did you hot reload? If no, comment out the DOREPLIFETIME macro and remove replicated from the property macro, see if it'll crash then.

lusty sky
#

wait what ? how do you know the replicated variable is causing the crash there's no info in the logs ?