#multiplayer

1 messages Β· Page 100 of 1

halcyon totem
#

my player starts arent loading in on time Actor channel failed: [UActorChannel] Actor: Replicated_PlayerStart_C

waxen socket
#

Hello, I have a general question about actor and component replication. πŸ‘‹

When designing an enemy that is composed of multiple separate meshes whose movement will need to be replicated, are custom static mesh components preferred, or is it better to make each piece a separate actor?

I see that bComponentReplicates will replicate the component transforms as well but I wonder if there's a catch I might run into.

Any advice would be appreciated. πŸ™‚

Cheers.

ancient lily
#

are there any references available for built-in and on-the-fly server changes without reloading the level on the client?

graceful viper
#

getting an exception here, why? Only happens if theres more than 1 player in the game:

chrome bay
#

Beause there is no controller for the second player on each client, therefore you won't get a widget

tardy fossil
waxen socket
#

Thanks, Omnicide. I think that's what I'll try first. πŸ™‚

thin stratus
#

HasAuthority might return true for clients in the GameInstance, since authority doesn't mean server. So you'd want to test for server instead. And no, you could only try to package the project with a different GameInstance, but I wouldn't advice to do that

#

Also keep in mind that the GameInstance is not meant for gameplay code

icy jetty
#

How else can you check for server?

#

Ah nice

thin stratus
#

Or IsServer fwiw

#

Authority means the connection has authority over the object/actor. A locally spawned actor for example. The client has authority over that.

icy jetty
#

ah that makes more sense

thin stratus
dark edge
#

What's the use case, humanoid?

waxen socket
# dark edge What's the use case, humanoid?

Hi Adriel, thanks for your interest. πŸ™‚ I'm building a boss with an arm with a magnet on the end. The magnet will pick up other actors via component attachment. I'm wondering if my magnet should be a component of the larger boss or a separate actor attached to the boss. πŸ€”

ancient lily
#

are there any references/resources to run a custom server (for instancing + fast movement replication) together with a dedicated server (for pathfinding and maybe player information&inventories)? i found a guy who does that with his own java server (yt: Unreal game dev with Yaz) and i find the concept pretty good for scaling users in a (massive) multiplayer online game

#

i wonder if more people explored this concept already

queen escarp
#

hey guys

#

two problems

#

its only replicating on one of them ? (playing as ListenServer)

spark pelican
#

Hello, I have a bit of an issue with the outer of a replicated UObject. My current setup includes an actor component that houses a replicated and instanced UObject. I add the UObject to the Replicated Subobject list on the actor component's owner.

This works the way I want it to; however, after the client goes out and in of the net cull distance, the outer on the client still points to the original actor component and actor, and not the newly created ones. From what I have learned, I believe this is due to me having the outer as the actor component (due to instanced), and the UObject being added to the actor's subobject list.

I know the simple solution of getting rid of the instanced property, but it is very convenient for my situation so I am looking for a way that keeps my current implementation. Thanks in advance!

queen escarp
#

anyone :/ ?

queen escarp
#

everyone on holiday it seems

#

good for them x)

ivory bear
#

My Mesh_3p animatino montage never fires. Anyone have any guesses?

dark edge
#

Just adding components to the boss is fine but if you want something other than a magnet sometimes or want other dudes to have the magnet then consider making it an actor, just like a weapon

queen escarp
#

@ivory bear are u even calling the event ? that image gives us nothing really :/

#

Adriel could u help me πŸ˜› u know this i know u do

ivory bear
#

apologies, here is the top half. The E key is calling it. The Mesh_1P montage plays on click, nothing happens for the Mesh-3P

queen escarp
#

can barely see the text tho, did u try printing all the way and seeing where it dosent work ?

ivory bear
#

Yes, the string after the Mesh-3P call shows on screen.
Here is my character setup

#

This is the multicast and the print string at the end fires, just no animation plays.

queen escarp
#

the print on comp+lete playes ?

#

oh ok

ivory bear
#

yes

queen escarp
#

then its something wrong with the animation or whatever

#

not in the code

#

or what is it suppose to do ?

ivory bear
#

When I press E, both the Mesh-1P and Mesh_3P should do a "fire rifle" montage.

queen escarp
#

ok

#

the MC fire montage ?

ivory bear
#

yes, the MC fire montage appears to complete and reach the print string, but the animation does not fire on screen

queen escarp
#

hm thats weird

#

idnno im kinda rookie myself to

ivory bear
#

Its funny, because I got aim offset and projectiles replicating...just not the ^&%$^$ montage that fires and the muzzle flash.

queen escarp
#

listen server ?

ivory bear
#

got all that working when 2 players and play as client

#

when I switch to Listen Server, my aim offsets work, but line traces (projectiles) do not.
After moving very close to each other, I can see that the anim montage is firing...jsut so slight you cant see it unless you are on top of each other. Odd, but promising.

queen escarp
#

well, ive only done dedicated server somehow everything works there , but im trying with the listening server now abit more trickier

#

however ppl in this channel usually is very helpfull just today ppl are chilling i suppose

ivory bear
#

yeah gotten some good help and other days things fly by so fast people miss it.

#

"play as client" creates a "dedicated" server for you, right.

queen escarp
#

well your playing on the "dedicated server"

#

client is both server and client

#

the "host"

ivory bear
#

I get 2 "clients" and neither is server. Listen server is both a client and server, right?

queen escarp
#

one of them are both yes

graceful flame
#

Listen is not also a client.

queen escarp
#

well couldent u just call it that tho ?

graceful flame
#

Because a client doesn't have authority but a server (dedicated or listen) does have authority.

#

UE uses the server authoritative approach instead of Peer 2 Peer networking.

queen escarp
#

aye

stoic acorn
#

If you were to create a radial 'force push' that emanates out from a player character, would simply creating a blocking volume and scaling it to push the opposition character away from yourself suffice?

#

or would you do it with a more deterministic method?

ivory bear
clever hound
#
void AMeleeBase::NetMulticast_SpawnAura_Implementation(UNiagaraSystem* _EffectToSpawn, float _LifeTime, FName _SocketName, FVector _SpawnLocation, FRotator _SpawnRotation)
{
    UNiagaraComponent* SpawnedEffect = UNiagaraFunctionLibrary::SpawnSystemAttached(_EffectToSpawn, GrippableMesh, _SocketName, _SpawnLocation, _SpawnRotation, EAttachLocation::KeepWorldPosition, true);
    SpawnedEffect->SetVariableFloat(FName("LifeTime"), _LifeTime);
}``` ```cpp
UnrealEditor_Niagara!UNiagaraComponent::SetVariableFloat() [D:\UnrealEngine-5.1.1-release\Engine\Plugins\FX\Niagara\Source\Niagara\Private\NiagaraComponent.cpp:2293]
UnrealEditor_ProjectVR!AMeleeBase::NetMulticast_SpawnAura_Implementation() [D:\5.1.1 Projects\ProjectVR\Source\ProjectVR\Private\MeleeBase.cpp:1043]```
Im trying to set a variable in a spawned niagara which sets the loop duraction. But if I play as a client it crashes and gives me that crash report. When playing as the server it works as intended
Edit* Its: ```Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x00000000000008f0```
ivory bear
# queen escarp aye

Got it working! Seems my values on the montage we not right. Changed them to what you see here and I see my rifle fire montage animation!
They were something like 0.25 and 1.0 ( I think)

#

You said code looked right, so I dug into the animations...thanks!

#

Now to figure out he daggone muzzle flash replication!

clever hound
plucky prawn
#

You could try IsValid(SystemInstanceController) instead

clever hound
#

How others set niagara variables from C++ then? cpp void AMeleeBase::NetMulticast_SpawnAura_Implementation(UNiagaraSystem* _EffectToSpawn, float _LifeTime, FName _SocketName, FVector _SpawnLocation, FRotator _SpawnRotation) { UNiagaraComponent* SpawnedEffect = UNiagaraFunctionLibrary::SpawnSystemAttached(_EffectToSpawn, GrippableMesh, _SocketName, _SpawnLocation, _SpawnRotation, EAttachLocation::KeepWorldPosition, true); SpawnedEffect->SetVariableFloat(FName("LifeTime"), _LifeTime); }
Is it not like this?

#

It works playing as the server but not as the client

#

I also tried replicating the float I input to the _LifeTime

#

Also doing the variable change with server RPC didnt work

hollow swallow
#

Whats the correct way to move all the players to a new map?

#

This puts them all into their own map not the same one

stable grotto
#

Connect to dedicated server IP

hollow swallow
#

ahh got it with the server travel command

queen escarp
#

@ivory bear nice πŸ‘

stable grotto
#

I want to set chest opened/closed for each client based on a bool.
For example: Client 1 ChestOpened bool is true when connected to the server they see the chest opened and if Client 2 Connects with ChestOpened bool is false they will see the chest closed so its client specific

how can I do it?

hollow swallow
#

Im a big noob, but i think a repnotify on the bool would work?

#

I also have a question. I have a lobby, you can select a character, it sends the character you selected to the game instance. The game starts, it moves everyone into a new map, in the game mode, i use spawn default pawn for override and cast to the player controller, run a function on the player controller that grabs the selected character from the game instance and passes it back, then spawns an actor in the game mode. This is working well but only for the host, not the clients, they all seem to not be able to read the variable. any ideas?

#

i want each client to be able to get their selected character from the game instance when they spawn

sinful tree
sinful tree
stable grotto
#

another solution I thought of would be the chest on begin overlap check if the client character has chest opened bool set to true then play the animation to open the chest..

violet citrus
#

Is Anyone looking for Unreal Multiplayer Developer ??

queen escarp
#

for work u mean ?

#

or for help *

#

@violet citrus

cursive steeple
violet citrus
queen escarp
#

oh ok well i mean there is some jobb channels id think you would have more luck there

#

if you dont wanna work for 1$ a day helping me lawl

violet citrus
#

@queen escarp πŸ˜‚ okay

stable grotto
shadow hatch
#

is there a way for me to exclude the owning client from this equation? i want the code to run on server and everyone elses client using a multi but not locally because its already done earlier

west robin
#

Where is the best place to get player state as a client as apawn? I'm trying to wait until the player state is set up so I can bind a delegate, however I can't seem to find a good place to set it. PossessedBy is where I'm setting it on the server but that's not being called on the client

pallid mesa
pallid mesa
#

its called on client/server

west robin
#

@pallid mesa Thank you! I will try this, I saw that but didn't think to use it as I was looking for something like Init!

pallid mesa
#

yeah that's the best one you got

#

in fact Epic added that after my PR of suggesting making "SetPlayerState" virtual

#

haha

#

we all wanted something like that for a long time

west robin
#

@pallid mesa You said in Pawn right? I can't seem to find it, looking over Pawn.h I can't see it anywhere

west robin
#

What the... I'm running 5.2.1 and my Pawn.h is different. Thanks for pointing me in the right direction though! Appreciate it, that'll be really helpful! πŸ˜„

pallid mesa
#

didnt this make it to 5.2?

#

wew wow wah

west robin
#

Its a 5.3 change!

#

I thought I was going insane haha

pallid mesa
#

well u can override OnRep_PlayerState if thats virtual

west robin
#

Yeah, I'll just try that for now, but its good its coming. Will be super useful!

pallid mesa
#

πŸ‘ πŸ˜„

#

remember that onrep_playerstate is not called on the server

#

so.... be aware of that!

west robin
#

Thanks for the info dude! πŸ™‚

tulip pelican
#

Guys i need help, me with my frind try to make multiplayer game, using listen server,but unfortunately our your session not visible and can't be found we using Advanced Sessions Plugin and Using Steam Sockets (app id 480 ) i using Unreal engine 5

shadow hatch
pallid mesa
#

heheha oki! Glad it helped ^^

floral elbow
#

How do I get access to different variables on my character controller?

#

I have two seperate values on chrCon1 and chCon2 but my keypress is logging the same value on both the serverClient and the client

#

the other player has a y of 0 and it logs 0,0,0 on both clients

#

Am I wrong for setting the value on the controller or does it need to be state somewhere

cursive steeple
floral elbow
#

Figured it out

#

I wasnt using the playerState blueprint

#

I just had variables on my character controllers and thought ue5 would know which client is asking for the data

keen hound
#

how would I do a dedicated server list?

sinful tree
pallid mesa
glossy kettle
#

vori have you been enjoying Iris lately

pallid mesa
#

a bit yeah

glossy kettle
#

i'm glad πŸ™‚

pallid mesa
#

and do you?

glossy kettle
#

i haven't formulated a good opinion of it yet, maybe when 5.3 drops i will post up some benchmarks vs custom backend

#

we should all strive to be liberated from FRepLayout

pallid mesa
#

maybe write about your custom system

glossy kettle
#

i doubt it would be that interesting

#

it's just CRUD over wire after all

pallid mesa
#

thats worth writing about

#

many problems to solve to get there

hollow eagle
#

Iris is still buggy enough to not really be comparable to anything else sadly. Just ran into a fun issue with their method of caching ustructs being dependent on module load order. Fixed in main (and maybe 5.3?) but it's enough to make me concerned about doing much with it right now.

glossy kettle
#

🀨 dubious

glossy kettle
#

thank you vori

pallid mesa
#

I hope it will be more stable on 5.4

hollow eagle
#

Also there's a fun issue where you can't use a server rpc from the beginplay of a component that just replicated. I have no clue what causes that one.

pallid mesa
hollow eagle
#

I don't know if that one is fixed in main or not

#

Hard to track down commits relating to that

#

(and I don't have a main build right now)

pallid mesa
#

πŸ‘ thanks for sharing siliex

#

hopefully we get a more robust set of test cases before it replaces current replication system

glossy kettle
#

damn wtf is that super react bs

#

my muscle memory sabotage me

#

ah well, to a good cause it went

glossy kettle
hollow eagle
#

it's not a network ordering issue if that's the joke, probably just iris not setting up some replication state until after BeginPlay which is clearly incorrect behavior

glossy kettle
#

"it's not a network ordering issue"
[describes network ordering issue]

#

Sheesh

hollow eagle
#

it's not though

#

all the data necessary is already on the client

glossy kettle
#

hmm

hollow eagle
#

it just hasn't been applied before beginplay for some reason

glossy kettle
#

i guess it depends if ur -Wpedantic

hollow eagle
#

it's an ordering issue, just not a network one

glossy kettle
#

-Wextra

hollow eagle
#

we only accept msvc args here

#

sorry

queen escarp
#

anyone ?

lost inlet
#

It would be good if it was clear which one was the server and which one was the client, and any actual context about how the rotation is networked

queen escarp
#

left one is listenserver

#

and the turn is "AO"

#

aimoffset in the anim bp

lost inlet
#

yes but how is the look rotation setup

#

a crumb of context please

#

how is the input sent to the server, how is it replicated, etc

queen escarp
lost inlet
#

waiting for the networking part to come in

queen escarp
#

i mean isent like everyting in the anim bp replicated ?

#

by default ?

lost inlet
#

no, and it can't even be replicated

queen escarp
#

oh okey, but how come its being replicated on the client from listen thyen ?

lost inlet
#

again, I can't tell you this with actually knowing the networking part of what you're talking about

#

ABPs have no replication, and rely on other networked state to look consistent between clients

nova wasp
#

think of them as running on each machine individually

#

so it uses the state of the character which is replicated to make the local animation state

grave kestrel
#

When another player tried to enter the water, any in the water will temp swap to falling until the player enters the water. It's driving me nuts

queen escarp
#

yeah but as u can se on the 2nd video when aiming it shows on both

#

but not from the left one

grave kestrel
lost inlet
#

This is why I was asking how it was sent to the server and how the server networks the rotation

#

All I got was a zoomed out ABP snippet

queen escarp
#

oh

#

hmm ok

#

ill look into that

#

@grave kestrel how would i do that did u use a tutorial or something or ?

grave kestrel
#

created a server function to pass the camera's pitch in and referenced that in the anim bp

spark pelican
#

@queen escarp How are you setting your ReturnValueY and Z. I assume you are using GetControlRotation which if I am not mistaken is not replicated. Try using a combination of GetActorRotation and GetBaseAimRotation, those should work.

queen escarp
#

yeah

#

so im setting this in the playeranim_BP

#

but i need to calculate it inside the player and send info to server then send it here instead right ?

grave kestrel
#

I would think so yeah, just get a reference to the player, and cache it to save on casting constantly in the update animation event, and set the same values in the bp animation

#

I have a pitch value both in the character and bp anim, and the bp is set on the server for the character and in the update animation event I set the bp anims pitch to whatever the characters is and have that set to replicated with a constricted range from -90 to 90

#

but that's just for replicating up and down, I had no issue with aiming left and right

queen escarp
#

@grave kestrel wdym cache it to save on casting ?

#

ok now i got it working

#

however

#

nah i think were good thanks πŸ™‚

grave kestrel
queen escarp
#

Yeah i know that part o though cache was a special function or somerhinf

#

However now in updating to the server each anin update frame

#

Isent that lag causing ?

grave kestrel
#

I've never experienced any major lag from it, I'm just passing the float value to the server and using that to set it on the anim bp, I wouldnt' think that's very resource heavy

queen escarp
#

Oh okey

grave kestrel
#

and the pitch is only updated on the mouse input axis events so there's that too

sinful tree
queen escarp
#

Well idnno what interpolating means really but i changed it so it onΓΆy updates while im aiming aince its when im using it but

sinful tree
#

Eg. On the server you could be setting the replicated values 15 times per second, putting the cost per float at 180bytes/s.
On the clients however, you could be using tick to transition between the replicated value and whatever the current value is every frame, so it smooths it out for you making it look like 60 FPS. You can do this using FInterpTo Constant with the target being the new value and the current being whatever the current value is.

clear island
#

when using the push model, MARK_PROPERTY_DIRTY_FROM_NAME makes a property replicate immediately right? similar to RPC behaviour Im assuming

queen escarp
#

Hmm i think i understand never done it obvi ill try it tomorrow

grave kestrel
dark edge
grave kestrel
#

from what I gather somehow when calling the set character movement mode in it it's setting it on all clients, it does this when swimming and I attempt to jump when at the surface of the water

#

as I change the movement mode to falling and call a server function to launch the character

dark edge
# grave kestrel

I would start by testing to see if set movement mode should happen on owning client, server, or everywhere

#

I see no filtering on authority or locally controlled so your logic is running on all machines

grave kestrel
#

I've tested adding in an authority switch as well, same result

dark edge
#

@grave kestrelshow what SR Update Movement Mode does

#

but this code is goofy, you're just trusting the client to set swimming or not

grave kestrel
dark edge
#

I'd test by hooking up a button to ServerUpdateMovementMode

grave kestrel
#

Yeah started single player side and I'm migrating it to replicated so it works correctly lol

dark edge
#

check that you can start swimming without affecting others

grave kestrel
#

funny thing there

dark edge
#

Also Water Volume is not a good name for a boolean

#

Booleans should be questions "Is in water volume?" "Wants to sprint?"

grave kestrel
#

if swimming into a water exclusion zone and dropping back into the water volume it works right

dark edge
#

I don't see anything that would obviously communicate with other instances of this character but it's all kinda goofy

grave kestrel
#

nothing I can do about the bool, that's epics lol

dark edge
#

What's the test for if should be swimming?
"Character should be swimming if ................ and .............. and not ............"

#

ooooooooooooooh ok i think i know

#

you are changing the properties ON THE VOLUME

#

anyone else IN THE VOLUME will be affected

grave kestrel
#

well

#

you think that

dark edge
#

You aren't just checking stuff and deciding if you are swimming, you are actually setting state on world objects

grave kestrel
#

however a player standing outside can jump and will change to swimming after landing if someone is in the volume

dark edge
#

whatever you're doing here, don't do that

#

are you intending to change the state of volumes at runtime?

#

Start with:

Tick -> select movement mode based on CMC.PhysicsVolume.WaterVolume

#

that should put you in swimming when in a water volume and not swimming when not

grave kestrel
#

hmm, thing is the new water body system doesn't have any water volumes afaik

dark edge
#

it won't handle the literal edge cases (getting out of water) but it'll be a start. You should not be changing whether or not a volume is a water volume

#

You might be saying the entire atmosphere is a water volume

#

what does get physics volume return if you're not in one?

#

why do you even care about water volumes if you aren't using them? What is your actual test for if you should be swimming?

#

"Character should be swimming if ................ and .............. and not ............"

#

looks to me like character should be swimming if sphere trace hits a water body

#

so just stick to that

#

none of this volume stuff

grave kestrel
#

yeah I realize, however the characters physics don't change to swimming unless the implementation of the water volume is changed

dark edge
#

What happens if you just set movement mode to Move_Swimming in midair?

#

I'm not sure if the CMC does volume property checks or not, if it does then just add physics volumes to your water areas

#

you probably don't have to do half of what you're doing here

#

either way, setting the properties of physics volumes at runtime is not the approach

grave kestrel
dark edge
#

THE WORLD IS NOW WATER

stable grotto
sinful tree
# stable grotto yes I have a player id, but how will I initiate the check for it when the player...

You would need to save the state of the chest somehow on the server I imagine and so, when loading the data into the chest, you'd set the array. The array being set as replicated w/ Notify will give you a means of checking - in the OnRep, you can check if the local player is in the array, if so, they've already opened it, so it should show opened, if not, then they haven't opened it so it should appear closed.

When a player opens the chest succesfully, then they would be added to the array as well, and again, that would fire the OnRep which would then be able to show the chest as open.

stable grotto
#

Okay I will check thanks!

#

If A Server event executes a server event within it does it effect anything performance wise?

latent heart
#

Not likely

#

A server running a server event will just run it like a local function

stable grotto
#

great, if a server event is set to reliable, and executes other events that are just normal custom events not marked reliable, everything will be reliable still right?

latent heart
#

Correct

#

As long as it's the server that's running them.

#

If a client calls the unreliable server event, it will not be reliable.

#

It does make me wonder why you would even mark something as a "run on server" event in this case (except the first one)

stable grotto
latent heart
#

Not really

stable grotto
#

ohh you said if a client calls unreliable server event

#

of course haha

latent heart
#

If a client calls a function marked as "run on server" and "unreliable", it will not be... reliable.

stable grotto
#

i read it as if client called reliable server event it wont be reliable sorry haha

latent heart
#

Why do you have a Server event calling other Server events?

#

Why are the subsequent ones also marked Server?

stable grotto
#

because that subsequent event sometimes can be called by its own

latent heart
#

Fair enough.

#

There will be a tiny bit of overhead to check it's a server before running it, I expect.

#

But nothing to worry about.

keen hound
#

How would I search for dedicated servers?

#

on a server list btw

sinful tree
#

Like you want to filter your list of widgets?

hollow swallow
#

in the editor, if i open 4 clients, make 1 host a lan game, the other 3 have to refresh 3 times before it shows up. Is there any way to make it show up straight away?

#

doesnt matter how long i wait, always need to refresh 3 times

keen hound
#

For dedicated servers

sinful tree
hollow swallow
#

Datura do you remember my question yesterday about the character classes?

sinful tree
#

A little bit.

hollow swallow
#

so i added an event to set the class on the server aswell when it gets the class from the game instance and both of those print the correct class.

But in the game mode on the override for SpawnDefaultPawnFor function its still not getting the correct info. Is it because its not updated fast enough?

sinful tree
#

So that means you may need to put in some coding that handles when the server is receiving the class that it should also spawn the actor for them.

dark edge
hollow swallow
#

yeah i had Event Handle Starting New Player which gets the player start, then runs Restart player, which then fired the rest off. Ill try re arrange everything to call it after it has set the class. cheers

#

P.S i hate race conditions xD always getting stuck with them

#

Yep that seemed to work much better. It got 3/4 of the characters right πŸ˜‚ one of them is a dupe of another though

keen hound
#

this didn't work

undone notch
#

hi i creat multiplayer with aws on UE5.1.1 Source Build Engine . So my both player joing the lobby or same session But when i try server travel map they are not in same map , Do anyone know what is the issues ?

hollow swallow
#

How are you trying to change map? Are you using the console command with server travel?

undone notch
#

yes

hollow swallow
#

That is how mine is set up, i just got it working yesterday

undone notch
#

yes like this

hollow swallow
#

When that runs, what does it say in the output log?

sinful tree
#

Is this on a listen server, and if so, is it the host clicking the button?

undone notch
#

Dedicated Server

#

using Real AWS gameLift

sinful tree
#

Then this won't work. Clicking a button on a client isn't replicated to the server automatically and you want hte server to execute the "Server Travel" command. Additionally, you want to add an additional space after the "servertravel" in your append.

undone notch
#

so on append wite this Server Trave

sinful tree
#

no "servertravel "

#

Basically this is considering "servertravelAWS_Lobby_Map" is the command.

undone notch
#

so waht shoud i do ?

#

ADD SPACE ALSO BUT NOT WORKING

hollow swallow
#

you need to call it on the server

sinful tree
#

Clicking a button on a client isn't replicated to the server automatically and you want the server to execute the "Server Travel" command.
You need to RPC the request to the server and have the server execute it.

hollow swallow
#

click the custom event, then on the right in the details panel where it says replicates, set that to server

sinful tree
#

(Except do it on an actor that is actually replicated, not a widget)

undone notch
#

OH OK

hollow swallow
#

working?

undone notch
#

OK I ADD ON MY PLAYER BP

#

WHIC IS REPLICTING ON THE SERVER

#

nope not working yet

pallid mesa
#

u need to add the space

hollow swallow
#

"servertravel "

undone notch
#

now ok >

hollow swallow
#

yep

undone notch
#

nope sir didnt work to

hollow swallow
#

What's the output log say when it runs it

undone notch
#

not shwoing any log

hollow swallow
#

Are you sure that events being called?

undone notch
#

i write this

#

can you come in call and help me to fix it , I am ready to pay for the help

#

I am suck on this last 8 days\

hollow swallow
#

ill give it a go but i dont want any money, im very new myself though and ive never used dedicated servers

sinful tree
#

Put a print string immediately after your "V" input. Press V. Do you get a print on screen?

hollow swallow
#

go to the feedback and support channel if you want

undone notch
#

yes please

#

yes the button is working

sinful tree
#

Maybe disconnect the player controller from the console command. Shouldn't be necessary if you're trying to run it on a server.

undone notch
#

ok

sinful tree
# undone notch ok

Are you using GameLift Anywhere? I mean, when you upload your server executable to GameLift it takes some time for GameLift to normally receive the executable and process it to make it ready.

undone notch
#

yes

sinful tree
#

No. You have to upload a new executable.

#

You've changed the RPC functions.

#

The server doesn't know about it unless you've uploaded a new copy to GameLift

#

Yes.

#

Look into GameLift Anywhere.

#

It's supposed to be a thing to allow you to run the executable locally and still have it connected through GameLift

#

Lets you test dedicated servers through GameLift easily without having to go through the 2 hour wait process for GameLift to do it all XD

dark parcel
#

Hi lads, how would one smoothly interpolate character location/rotation that implements CMC?

twin juniper
#

I am creating a session and travelling to a game map lobby with Game Mode of Gameplay. Here I need to override ChoosePlayerStart so that the two players joining the session can spawn at appropriate player starts. But then when I travel to new map of Gameplay using seamless travel, I know players are persistent but I want the effect so that it is like spawning players at the player start of the new map using a function same as ChoosePlayerStart. How can I do so?

thin stratus
#

They will respawn on the new map with the given GameMode and its playerstart functions

#

You shouldn't need to do anything special

twin juniper
thin stratus
#

A child class fwiw

#

I usually have BaseGameMode and the 2 child classes: GameModeMainMenu, GameModeGame.
And then Game has Child classes like GameModeLobby and GameModeGameplay.
And Gameplay can then have even more fine grained children like Deathmatch or whatever fits your game

twin juniper
thin stratus
#

Each of these having if needed matching PlayerState, GameState, PlayerController versions with same inheritance chain

thin stratus
faint eagle
#

is it ok in general to send actor/component pointers/TWeakObjectPTrs and TSubclassOf of any types via RPC? I'm examining some profiling results in unreal insights right now and it seems that this kind of stuff has some considerable size so I wonder if one should avoid it in general πŸ€”

thin stratus
#

Actor and Component pointers just replicate as ints fwiw

#

WeakObj probably too

#

TSubclass could be a path string, not sure

twin juniper
thin stratus
faint eagle
#

Those are TWeakObjectPtr

twin juniper
faint eagle
# twin juniper Can you help me understand what does this mean?

from what I remember, what actually happens in seamless travel, when server travels first to transition map, a new game mode is created before original is destroyed. it then copies all actors that should be considered persistent (idr for sure but i guess those are player states and/or player controllers), then server travels to final map and somewhere here old game mode is destroyed and new one comes into play. It sounds reasonable if you think about a case when menu map has BP_GameMode_Menu and the actual game map has BP_GameMode_Game so it can require actually different game mode actors
WizardCell actually wrote a good article on that matter, you should check it out https://wizardcell.com/unreal/persistent-data/

WizardCell

Compendium for traveling, disconnecting, and persisting data across such scenarios

abstract pike
#

Does anyone know where exactly in this spawn actor process (using the blueprint spawn actor node) the expose on spawn values are actually set on the actor?

#

I'm trying to use a value in my replication graph but it isn't there....

#

So it seems like AddNetworkActor is being called first but I can't see where those values would be assigned anyway πŸ€”

#

Bugger... I think I found it

#

Right after .....

#

RIP

#

Oh nevermind, that's pins not actual values

#

I'm lost πŸ€ͺ

#

I found the code

#

Yea as you said after the spawn before the finish

#

Unfortunately rep graph add network actor is right away

#

hmm

#

I wonder if there is a FinishedSpawning event I could use or something

#

PostActorConstruction maybe

#

A shame that they have an end play event but not a begin play one

twin juniper
faint eagle
#

What does exactly mean net events color in unreal insights? I mean I understand that red probably implies "bad", yellow is "cautious" and green is "good", but What is the exact rule that gives these categories? I mean do red events simply imply that out of all traffic these exact sources take more than 10% or 40% or 60%? Or is it more complex like "for an event of this type (replication, reliable/unreliable server/multicast rpc) in general such packages that are sent with this exact frequency should consume that much bandwidth?

twin juniper
#

Is this the right way to end the game? I'm not sure because if I server travel then the game mode changes, so does the end session and destroy session gets called or not?

fathom aspen
faint eagle
ivory dagger
#

hello everyone. im having some problem in understanding how multicast works in UE. what i know is that you multicast should only be called from the server. but im have this issue while calling a multicast event. i have this lobby menu, and when press one of these 'Hero xColor' buttons and it calls this event 'SpawnSelectedCharacter' on player controller.

#

what i want to do change skeletal mesh on all instances of the actor when i press any of those Hero buttons. but it only works correctly if i call the 'SetActorInfo' on the actor i want to change skeletal mesh on

#

if i call the 'setActorInfo' from the controller, it only changes the skeletal mesh on the instance of the game that calls the multicast event and on server

#

what i thought was both of these would work

#

but can someone please explain to me why 'setActorInfo' event being called on the controller does not work?

twin juniper
faint eagle
faint eagle
#

Try looking into AGameSession source code, destroy session might be called in end play there

#

However I don't remember if game session exists in clients πŸ€”

odd iron
#

Hello guys , I have 2 questions I will be appreciate if i got an answer .
1- If i want to create a multiple servers each server have its own chunk ( part ) of a map . Can i Initilaize them in one huge map and players travel between them when they reach specific location ? From where should i start .
2- If I want to connect my game or server with database such as MongoDB which one is the fastest way .

  • Websockets
  • APIs
  • Custom TCP tunnel ?
    Thanks in Advance
#

The server question already exists in a game called ATLAS the game .

twin juniper
chrome bay
#

Destroy session will kick clients yes.

#

The "session" is the engine-level wrapper for the online backend "session". If you destroy it, it terminates the session online too, which will kick any connected players

#

Game Session does exist on clients also.

twin juniper
# chrome bay Game Session does exist on clients also.

The game ends after a time which is tracked in game mode. Because GM exists only on server how do I communicate to clients that game has ended. Using GameState? and from where should I call destroy session on clients?

ivory dagger
#

was this answer for me?

dark edge
#

Your controller doesn't exist on my machine

#

You shouldn't be multicasting though. You're trying to sync state. Use repnotify.

ivory dagger
#

like game mode doesnt exist on my machine but i can still access it if im on server

twin juniper
dark edge
#

@ivory dagger zero playercontrollers exist on all machines. A multicast inside a playercontroller makes no sense

#

Your selected asset should be a repnotify variable in PlayerState or the pawn itself

#

Someone pin this

thin stratus
#

It's pinned in form of the compendium. That should be enough

#

You can link to it directly

meager spade
#

can you use EOS in editor, or does it have to be packaged?

twin juniper
#

After destroying session on client, how to open another map on client?
Because if I use OpenLevel after destroying session, it works for server but not for client.
I was thinking of using UEngine::Browse which seems appropriate here, but is it the right way do it?

quasi tide
quartz iris
#

Why does the animation and sound effect play for the player who did the action once, then after trying to do the custom event again it doesnt?

#

The mind subvertion widget works on the enemy player even without the animations and sounds though

oak prawn
#

please help πŸ˜„

ivory dagger
faint eagle
#

How do I come up with network budget for clients and listen servers? Or maybe somebody can suggest me an article on that matter. Like say I have a coop game with 4 players, I've profiled a couple of game sessions and I can tell that in 10 minutes the server sends 4MBs or ~7 KB/s per second on average. How do I understand if it is good or bad in my case? I mean I can tell by the insight's profile results that there are things that could be optimized but should I spend my time on it? Can I reliably derive approximate ping clients and listen server will have based on insights data? I mean I know that there are parameters like MaxClientInternet rate and speed and something like that for server that set the amount of bytes client/server can send ber second but I've also read somewhere that just kicking that value up can backfire with some other connection issues πŸ€”

odd sundial
#

At my wit's end here and I think I'm overlooking some basic concepts.

I have an Armory Component. It's attached to my Character. On BeginPlay(), the Armory Component receives which weapons to spawn from the GetOwner()'s GameInstance and then spawns which weapon is in the player's Game Instance.

This works just fine for the server. But the clients will always only spawn the server's version of the GetOwner()'s GameInstance versus the version of the Game Instance weapon that they chose prior to server travel where they chose their weapons.

What... what am I missing here. How do I have my client's Armory Component properly recognize which weapon they have selected from their GameInstance ?

meager spade
#

GameInstance exists once, in pie

#

there is not multiple copies

latent heart
#

Like an editor copy and a PIE copy?

meager spade
#

yes

#

but its only 1 copy

#

there is no difference between local client copy iirc

latent heart
#

That might well be true!

odd sundial
# meager spade there is not multiple copies

Yep I understand that there is a Game Instance, only one, per each player- however as I understand it, despite not being replicated, the Game Instance exists on the server as well as the client.

However the Armory Component isn't accessing the player's Game Instance to determine which weapons to spawn, it's accessing the server's version of the GameInstance.

meager spade
#

there is one gameinstance

#

its not per player

hollow eagle
#

Every PIE instance has a game instance. Not per player, per pie.

meager spade
#

(in pie at least)

latent heart
#

You'd need to do the 'run in separate process' thing to get more GIs.

meager spade
#

^

hollow eagle
#

Err, no?

#

Every PIE instance has a game instance

#

the editor itself does not, but additional PIE windows (and, if enabled, the in-process dedicated server) do

#

separate game instances

#
/**
 * GameInstance: high-level manager object for an instance of the running game.
 * Spawned at game creation and not destroyed until game instance is shut down.
 * Running as a standalone game, there will be one of these.
 * Running in PIE (play-in-editor) will generate one of these per PIE instance.
 */

UCLASS(config=Game, transient, BlueprintType, Blueprintable)
class ENGINE_API UGameInstance : public UObject, public FExec
hollow eagle
#

It doesn't matter how many clients connect to the server, from the server's point of view there is only one game instance. Game instances are not related to players, they are the representation of the local copy of the running game.

odd sundial
hollow eagle
#

Well, if you're storing the choice of item on the server's game instance then that's why

#

A client storing some data on their own game instance doesn't tell the server anything, and the server is what has to authoritatively spawn things.

odd sundial
#

When I make the choice and then review the choice on the client, the choice appears correct.

I think what's happening is I'm spawning with authority and it's thereby only spawning the server's choices

hollow eagle
#

Yes, that is what I'm saying.

#

Game instances are not replicated, they are not shared in any way.

odd sundial
#

The choice is set on the Game Instance, but then the Armory Component, prior to spawning, obtains that information from the game Instance. It then calls the spawn gadget method which is obviously done via authority with the server as an argument.

hollow eagle
#

Yes but the choice is set on which game instance

#

if you never replicate that choice to the server then the server can't know what you've chosen

odd sundial
hollow eagle
#

so you never tell the server

odd sundial
#

Gotcha...

hollow eagle
#

the server knows nothing about a client's game instance

#

it does not exist from the server's point of view

odd sundial
#

The server receives which weapon to spawn from the Armory Component, however... and the Armory Component gets its chosen weapons from the Game Instance.

The server and Game Instance never actually communicate directly - the Armory Component is replicated and that's how any spawning functionality occurs

hollow eagle
#

Ok but are you actually replicating the choice on the component

odd sundial
#

I think that's the link I was missing... I'm going to try to implement, thank you for your time

latent heart
#

Are you trying to replicate the weapon choice back to teh server via the armory component?

latent heart
#

Like with "Replicated" in the UPROPERTY?

odd sundial
latent heart
#

So you aren't sending an RPC?

odd sundial
#

I wasn't but that's what I plan to do

latent heart
#

(A "Server" UFUNCTION)

odd sundial
#

Prior the Armory Component was just getting the GameInstance's weapon choice in the Begin Play function

latent heart
#

Okay, so, "Replicated" only works 1-way. Server to client. Nothing you set on the client is "replicated" back to the server.

#

You can only send data via an RPC

odd sundial
latent heart
#

Okay. Just so we're clear.

odd sundial
#

Should I be calling this RPC during BeginPlay?

latent heart
#

Depends on the flow of your game.

#

But bear in mind the server will spawn your player and (if you have it set up as such) spawn your weapon before your client ever gets to beginplay.

odd sundial
latent heart
#

You have 4 options:

  • Somehow set the weapon you want on a previous map
  • Send the weapon you want with the options string (blank giving you some sort of default weapon)
  • Have the server spawn you with no weapon/default weapon and wait for you to rpc your choice
  • Spawn in some sort of "observer" mode and the server will wait for your weapon choice
odd sundial
unkempt tiger
#

If I create an actor serverside and immediately send a reliable multicast through it to all clients, how likely are they to properly receive it (assuming it's relevant)?

chrome bay
#

Hard to really say, but first thing to note is that only the Server should be marking things dirty. If the member property needs a reference to it's "owner" to work properly, I'd suggest setting it in the constructor of the class (and making it a transient UPROPERTY)

twin juniper
#

I have this strange bug where the online subsystem works fine for first time. I create session and then join it. destroy session on client and server successfully. No errors in log. Then On Client when I try to Find Session again, session search is created but Find Session Complete doesn't get triggered and it isn't even failing. It just gets stuck

stoic acorn
#

Morning all.
If I want to have an Doorway appear open or closed to ALL connected players (ideally they'd see the door animate open/closed even from the other side of the map). How would you go about achieving this?
My initial thought is that you'd use a repnotify and make it always relevant, but I'm just guessing at this point.

chrome bay
#

A rep notify is the way to achieve it certainly. If you wanted to see it all the way across the map, then always relevant is the simplest way to achieve that for sure.

stoic acorn
#

Ah thanks. Glad I was on the right track. I'm just never sure if there's a better way of doing things. I'll continue to bumble along.. cheers Jambax πŸ˜„

#

Oh. here's another related question actually. If it wasn't necessary to have a player see a door open in realtime BUT they would need to see the door in it's open/closed states when they turn the corner.
What would be the correct setup for that?

chrome bay
#

Well, it'd be hard to achieve in practice. Line-of-sight relevancy is much harder to do because a) it's expensive to compute and b) relevancy is too "laggy" to be as responsive as that.

#

You can only really achieve it in very controlled environments.

stoic acorn
#

ah. so there's no way to set a radius around an actor for network relevancy?

chrome bay
#

Well there is a radius, which is what Net Cull Distance is for - but there's no line-of-sight check, it's just a radius

stoic acorn
#

so if a character enters a region it would set all the 'states' of the actors

#

Ah gotcha

chrome bay
#

If you check bAlwaysRelevant, then it disables that radius check

stoic acorn
#

ok nice one, that's pretty clear to me now thanks

upbeat basin
#

Maybe checking the old value vs new value for OnRep functions in cpp?

remote narwhal
#

Hello, what is better, als or lyra? I found a custom version of als which is called ALSXT
I want to make an Arcade FPS/TPS

thin stratus
#

Lyra is a demo project. What's ALS again?

#

@remote narwhal

limber gyro
#

when u enable voice chat, does it come spatial or non spatial by default?

fluid summit
#

Hi! does anyone know if there's a way when replicating an array, to know only the element that got modified?

thin stratus
#

Otherwise, you could still do it with a normal array and pass the old version in to the OnRep (if you have one) and manually compare (I do that for something that is small and doesn't need replication often), but that still needs C++

narrow prairie
#

dumb replication problem, i have a struct with some variables. replicating correctly. the moment i use a map in the struct it wont replicate no matter what i try?

#

the map that is

#

the other variables remain replicated

#

been busy over a day, is it some weird issue that im unaware of with maps?

latent heart
#

Maps don't replicate

#

Or can't, rather.

thin stratus
#

TMap and TSet do not support replication, yus

narrow prairie
#

ugh

limber gyro
#

does any 1 have any good resources on ue4 voice chat stuff? im very confused and i cant find any proper documentation

latent heart
# narrow prairie ugh

The solution is to do 2 arrays, one of keys and one of values. You loose your lookup powers, though.

#

You can recreate teh map on the client end when stuff is replicated, if you want.

wind moat
#

Hello, I am trying to start a deticated server in vs and its giving me the error code on-agnostic games on cooked platforms require a uproject file be specified.

anyone knowing how to fix?

latent heart
#

Have you tried specifying the project file on the command line?

#

Have you built a dedicated server using the UE5 project instead of your specific project?

blazing spruce
#

Hey, anyone know why clients dont hear this sound played? The sound gets called when the player interacts with the actor to pick it up, the server player hears it but client doesn't

ivory bear
#

In my FPS, I have an inhertid Fire event on my weapon bp. My character has a first person weapon and a third person weapon (for others to see). In multicast, I call the Fire events of both guns. The one for the 3rd person gun never fires/runs.
WeaponBase_3p>WeaponRifle_3p and WeaponBase_1p>WeaponRifle_1P
Other than a special material that handles zoom and prevents mesh "pass-thru" they are the same BP code
What might cause this to not get called?

#

Might be an inheritance issue as the Fire event runs in the base class for the 3P gun

quartz iris
#

How can I loop through all the players to see who is the winner and loser?

#

I have a variable for the winner and its set to playerstate atm

ivory bear
#

Fixed it. It was an inheritance issue.
Now it animates and shows a muzzle flash...but when it runs the fire rifle ironsite anim, it pops to center aim during animation...if you are aiming up 30 degres it shoots, but the recoil animation snaps the gun to level aim then back up. Aiming level looks great though. LOL Any ideas?

#

Here is what my fire animation is doing. Using the anim starter pack and ironsite fire (as a montage).

dark edge
#

assuming your aim offset is additive

ivory bear
#

I am using raw anim starter pack so I havent done a true aimoffset for the ue4 mannequin for the full mesh ( I dont think)

dark edge
#

Yeah the animation setup for something like that is certainly not trivial, you need to understand your anim bp setup inside and out

ivory bear
#

...and I am a rookie (Unity convert). This is how my 3rd person mesh is rotating to handle look up and down that my first person arms do.

#

replicated look rotation

dark edge
#

before or after this?

ivory bear
dark edge
#

in the anim BP

#

that's saying "play a montage"

#

where is the montage player used to calculate the final pose

ivory bear
#

This is the whole thing that Fire calls

dark edge
ivory bear
dark edge
#

that's your montage player

#

put it before the aiming part

#

not after

ivory bear
#

ahh, ok. This is the montage set to Upperbody slot

#

like this, even though the fire montage is set to the upper body slot?

dark edge
#

what you had been doing was adjusting the bones based on aim, then overwriting with the animation

#

now you'll animate, then adjust based on aim

#

wait

ivory bear
#

I ran the updated version and no change

dark edge
#

yeah, move the aim stuff to after slot upperbody

#

whole body doesn't get messed with

#

upper body is
Whole Body -> upper slot -> aim stuff

ivory bear
#

Gotcha!

#

Ill give that a whirl

dark edge
#

let's see it if it works

ivory bear
#

Works like a charm! You rock!

#

Does it make sense to have that montage call in the gun with the muzzle flash?

dark edge
ivory bear
blazing spruce
blazing spruce
dark edge
blazing spruce
#

so serverside right?

dark edge
#

It should just be:

InteractEvent -> ??? -> multicast play audio

#

axe can play the audio

#

no need for character

#

assuming axe is a replicated actor

blazing spruce
blazing spruce
# dark edge What does On Axe Pickup do?

So the way ive got it set up is that i have BP AxeSpawnLocation actors placed around the map which spawns the BP Throwing Axe Pickup actor which happens from the game mode at the start of the game

blazing spruce
#

Think ive figured out whats happening, in my Increment/Decrement event im destroying the axe actor when the player picks it up, even tho that happens after the sound is played it still must be destroying the actor for the client quicker than it can play the sound

magic vessel
#

When I seamless travel, do I need to override any functions on the components on the player controller to prevent them from being reset?

fossil spoke
#

Check these out

#
    /**
     * Called when seamless traveling and we are being replaced by the specified PC
     * clean up any persistent state (post process chains on LocalPlayers, for example)
     * (not called if PlayerController is the same for the from and to GameModes)
     */
    virtual void SeamlessTravelTo(class APlayerController* NewPC);

    /**
     * Called when seamless traveling and the specified PC is being replaced by this one
     * copy over data that should persist
     * (not called if PlayerController is the same for the from and to GameModes)
     */
    virtual void SeamlessTravelFrom(class APlayerController* OldPC);

    /** 
     * Called after this player controller has transitioned through seamless travel, but before that player is initialized
     * This is called both when a new player controller is created, and when it is maintained
     */
    virtual void PostSeamlessTravel();
#

These are in APlayerController

#

APlayerState::CopyProperties

#

APlayerState::OverrideWith

magic vessel
#

I have a component that holds the pawn class that I want the player to spawn in with, would I use these functions to handle this?

fossil spoke
#

Essentially yeah.

magic vessel
#

Okay, I'll give this a shot

#

Thanks

fossil spoke
#

You would probably use SeamlessTravelFrom to pass that variables value into the new PCs variable.

#

So effectively its "Copied" over.

#

Assuming the old PC is being replaced of course.

#

Which could happen if its a different type, because of a different gamemode or something.

magic vessel
#

That makes sense, I could just use GetComponentByClass to get the component and copy over the properties

magic vessel
#

That seems to have worked, I'm testing it with my custom EOS subsystem to ensure that it plays nicely

near granite
#

Niagara Fluid does not interact with the second collider tagged actor. So I chose to use global distance field in the niagara option. after that, it reacts with collision even with actors that do not have a collider tag attached. However, in multiplayer, there is a phenomenon in which the Niagara Fluid of the second user does not come out as the set speed and keeps coming out very slowly in a strange direction.

narrow prairie
#

@latent heart thx for comming back, i implemented it that way thx

upbeat basin
#

Does.. putting a map in a struct to replicate it not work on blueprints?

thin stratus
#

Maps can't be replicated

#

Neither can Sets

#

@upbeat basin

upbeat basin
#

Wait it doesn't work if I put it in a struct as well

#

I thought that was the workaround

thin stratus
#

No

upbeat basin
#

I don't know how I never came up on needing to replicate one

thin stratus
#

You cannot replicate a TMap or a TSet directly

upbeat basin
#

I guess I would need to create a pair struct and make an array out of it then?

sinful tree
#

You could get around it by creating a structure containing your key and value pair, and then making an array of it, populating it and replicating that instead.

thin stratus
#

The workaround is to make a struct that has the Key and the Value and to use an Array with that struct

upbeat basin
#

Got it, thanks

odd iron
#

Goodday guys I have a question,
If I want to separate a map into separated server instance each part.
Can I merge them in one big map ?

#

And make players travel between them seamlessly old_man_yells_at_unreal

sinful tree
odd iron
sinful tree
#

You'd have to code your own networking system entirely. There's no way around it. Any time there is a transition to a new server, there will always be a hitch and at the very least a loading requirement of some kind. It's just how the engine works.

To facilitate moving seamlessly, you'd have to have your clients completely ignore Unreal's netcode and not really "connect" to a game server in the same way. Then you can have the client do whatever and it won't have to hitch/load. This means you'd have to facilitate replicating everything that Unreal does in your own unique method, like using TCP or UDP servers that your client could connect to send and receive the information that needs to be replicated.

odd iron
#

In default engine client code

sinful tree
# odd iron Thanks for explaining this .. Then if we made the player loading can we at least...

Graphically you should be able to make any level look however you want, then it just boils down to where you put your overlap check to start the transition process of that player to the new server. Transitioning to another server would still be sudden and likely take a few seconds and you probably won't have a "seamless looking" transition as the original server would have to notify the other server of the player's location, control rotation, etc. and the receiving server would have to spawn the player and load all the data about them before allowing the player to be back in control and everything may not exactly line up with what the player was last seeing. I'm not sure as I haven't tried to do something like this myself.

odd iron
covert igloo
#

is there not a function to get netmode for BP.
i have some code that ive been working on for a while. and it runs great. but now i want to optimize it. and in doing so id like to handle single player a little differntly than multiplayer, and i cant find an easy way to detect what mode im running in

upbeat basin
lean sand
#

Hi guys, is there any reason why this gives errors? Just trying to understand how to do "Blueprint Run On server option" in c++

#
    UFUNCTION(Server, Reliable, WithValidation) // in .h
    void Dash(const FInputActionValue& Value);
#
void ABaseClass::Dash_Implementation(const FInputActionValue& Value)  // in .cpp
{
    //code
}
upbeat basin
#

Do you have your _Validation Dash_Validate version of the function as well?

twilit radish
upbeat basin
lean sand
#

ah I see, tbh I only copied this from UE doc, the only thing I know is the Server client multicast part, but even with just UFUNCTION(Server) it still gives error

twilit radish
#

What kind of error? Does it not actually compile or is it just a red squiggly line in your editor? πŸ™‚

upbeat basin
#

Or was it required to specify whether it's Reliable or not

twilit radish
#

Reliable is not required, it can also be Unreliable. But it will need to be one of both (although there's also a default fallback I believe?).

lean sand
#

thanks guys, indeed one of these is required, it works now

covert igloo
twilit radish
#

Generally I had a difficult time doing this specifically in BP. To my knowledge these are the ones available:

last storm
#

Hello, I'm currently working with UE5 and i'm trying to Join a FOnlineSession.
But I need the session name in order to match the implementation:
virtual bool JoinSession(int32 LocaclUsserNum, FName SessionName, const FOnlineSessionSearchResult)
I might have misunderstood, where the "Session Name" = the "new user" session name ?

#

but it's weird

twilit radish
#

@last storm I would recommend looking at Cedric's article about it: https://cedric-neukirchen.net/docs/category/session-management
It has everything you would ever need for this in specific. There's also specifically a C++ part: https://cedric-neukirchen.net/docs/session-management/sessions-in-cpp

Quick overview over Sessions in Unreal Engine.

This post shall give you a short introduction to handling your Multiplayer Sessions via your own C++ code. Most of you probably either started with the very limited native Blueprint Nodes or fell back to using Plugins like the Advanced Sessions one.

#

But I believe all you want to put there is NAME_GameSession like:

JoinSession(*localPlayer->GetPreferredUniqueNetId(), NAME_GameSession, SessionResult)
last storm
last storm
#

that's where I'm struggling

twilit radish
lean sand
clever hound
# lean sand Hi, also wondering about this, do I just put Dash_Validate(const FInputActionVal...

Seems like you are stuck in the basics. I suggest watching and understanding these
https://m.youtube.com/watch?v=UmJzuRO4Qjs
https://m.youtube.com/watch?v=JOJP0CvpB8w

Try my C++ Survival Game Course:
http://bit.ly/unrealsurvival

Discord:
https://discord.gg/meFRZfm

Today I do my best to teach the basics of networking to you in under 30 minutes. Enjoy!
Business Email: contact@reubs.io

β–Ά Play video

An overview of the essential concepts for writing multiplayer game code in Unreal, in under 25
minutes or your money back.

Sample project: https://github.com/awforsythe/Repsi/
Patreon: https://patreon.com/alexforsythe
Twitter: https://twitter.com/alexforsythe

00:00 - Introduction
01:24 - Net Mode
03:33 - Replication System Basics
05:13 - Acto...

β–Ά Play video
lean sand
lean sand
#

thanks, didn't know they separate bp and c++ tutorial, will look at thatπŸ˜‹

limber gyro
#

if(GetLocalRole() != ROLE_AutonomousProxy) this check works fine if i am running on a dedicated server, but with sessions the client that is runnign the server still passes the check, whats the best way to make the client playing on the server not pass the check as well?

kindred widget
limber gyro
#

basicly im trying to spawn a blood effect everytime the hp changes

#

it works fine unless the player is the server

kindred widget
#

Makes sense. Server player is authority.

#

What is the blood effect? Chances are the call is probably already tossed on dedicated servers if that is your only concern.

limber gyro
#

so is there a way to check for players that are the server?

#

and blockign that?

kindred widget
#

You don't want the server player to see the blood? O.o

limber gyro
#

i want him to see the blood on the other players

#

i dont want him to see his own blood

#

cause thats just visual cluter

kindred widget
#

Then just == Simulated Proxy probably I think.

limber gyro
#

i think i tested that before but i will do it agian

kindred widget
#

Well. No, that won't really work for that on server. They're all authority.

limber gyro
#

doesnt work

#

ye

#

thats what happened

#

just tested it

kindred widget
#

Could just do an IsLocallyControlled check.

#

Or actually

#

Better yet, spawn the system regardless. And set it to OwnerNoSee = true.

limber gyro
#

i will try agian

kindred widget
#

It needs to be attached to the pawn the player is currently viewing.

limber gyro
#

ye its not attached

#

UNiagaraComponent* a = UNiagaraFunctionLibrary::SpawnSystemAtLocation(GetWorld(), bloodParticles, GetActorLocation());

#

im gonna try the IsLocallyControlled

kindred widget
#

Why don't you want stationary blood to show for the local player? O.o

#

I could see if it was an annoying effect you didn't want the player to see when playing in fps mode, but not seeing their own blood spots is odd when it's stationary.

limber gyro
#

because in an fps it might block the view if ur looking down

kindred widget
#

Stop getting shot? πŸ˜‚

limber gyro
#

LOL

kindred widget
#

Could always material it too. Opacity by range.

limber gyro
#

is locally controlled is not working

twilit radish
#

I would just go with the IsLocallyControlled check, it's a character, also saves you from having to spawn a particle system that doesn't do anything on a client that can't see it anyway πŸ˜›

kindred widget
#

They could see it though. It's stationary. They should be able to see it when they move away.

limber gyro
#

the Islocallycontrolled check doesnt work when the client shoots the server

#

wait

#

i might be doing somethign unescessary

kindred widget
#

Imo this isn't really a networking issue as much as a designer issue. Dedicated server is the only place it shouldn't exist and it already gates creating particles internally. I would just make an opacity by distance to camera and set it just outside of the range of normal camera view. Bit more normal to still be able to see it when you're moving away, but it isn't in the player's face at any time.

limber gyro
#

nvm its working

#

so it was the IsLocallyControlled() function that i was missing

#

thanks

burnt coral
#

So how do I fix animation movement on multiplayer??

When I walk Left or Right my character just walks forward and slides left or right, which is due to me not having an animation, but in multiplayer the walking forward just loops the first frame constantly.. Is this cause there no animation or do I need to do more then just set the player replicate true in the bp?

Need info please if anyone can help

halcyon totem
#

if im using seamless travel on a deciated server do I need to bring over my player starts and weapon pikcs up? how does that work, does it do it automatically?

worthy wasp
#

I thought BeginPlay() ran as both Server & Client? Is there some other form of AuthMode checking I need to do in C++? I've tried:

HasAuthority()
GetLocalRole() == ROLE_Authority

Neither work :/

dark edge
worthy wasp
#

i never said it wasnt being called - sorry i implied that its not running as Authority with the 2 checks there.... hence the question of if i'm checking the right check?

dark edge
#

The beginplay on the serverside version of the actor should be authority, show your code for how you're testing.

worthy wasp
#

same said for GetLocalRole() == ROLE_Authority

#

its my assumption i'm not doing the right IF logic check there

#

i'm trying to save an RPC - i can do it if need but ... but i thought that BeginPlay ran AsServer - which would allow me to do some preliminary setting of replicated variables right off the bat.

dark edge
#

BeginPlay runs everywhere the object exists

worthy wasp
#

i'll read between the lines i guess :/

#

fwiw - removing the if branching shows a netmode of CLIENT - i was expecting both CLIENT & SERVER

quartz iris
#

How do I play a widget on the respective player who lost/won the round?

#

or is it like this?

graceful viper
#

Is ReplicatedUsing uncommon practice or something? haven't heard of it once until I started looking at GAS, nowhere in the replication docs

latent heart
#

Very common.

dark edge
gritty lantern
#

Do UFUNCTION(Exec) functions only run on the server? Is there a way to get it to run on the client?

latent heart
#

They will run on whichever instance it is called on

coarse gale
#

Does anybody know anything about this, got it to build the server, but the strange thing is that the instructions said to do it from the projects VS project (which didnt work), but when I build it from engine source VS project by building just the game project that is listed in that, then it builds but gives this error when running it ,Tempted to just wipe and start fresh with a new project tbh because it seems there may be some config issue.

tepid sable
#

What functions / events are triggered when a multiplayer client leaves the game (either by quitting the session, or hitting Alt+F4) ?
We're working on a bug that only occurs when a client crashes. If they disconnect "safely" (either Alt+F4 or using the UI to quit), the bug does not occur. If they crash (we added a button that can crash the client, to make this easy to test), the bug occurs.

grim hill
#

Hey, im trying to make a local multiplayer system in ue4. when i create the player both keyboard and controller inputs posses the same character. any fixes. im using ue5 and the create local player

sinful tree
thin stratus
#

Either in the play settings or project settings I assume

#

Could also be editor preferences. Been a while since I had to use that

grim hill
coarse gale
halcyon totem
#

am I suppose to add or click something to actors when using seamless travel?

#

I need to mark actors for seamless travel but I dont know how

sinful tree
pine sage
#

Hi, would you have any lead Regarding this jitter in my aim offset ?

#

Using lyra stuff, and trying to find the root cause

#

Anim blueprint, character, controller and some network settings have been ruled out

#

Any lead or test cases would be appreciated!

halcyon totem
steep mica
#

if someone were to use hacks in my game, would they be able to send an RPC to the server with whatever arguments they want?

small grail
steep mica
#

lets say I wanted to make a game like cod and I use RPCs to purchase a weapon

Would it be a good idea to just run the interaction line trace on the server and do whatever needs to be in via a multicast?? From my basic understanding this should stop any cheaters from being able to just do like GetWeapon(RayGun) without having to hardcode a billion things

#

From the way I see it if I don't do that I have to do a billion checks to see if the wallbuy exists on the map, and if it doesnt is the mystery box open, and is the user in question opening the box, and if it is what weapon

#

1st method sounds really good but idk exactly if its fool proof, would a hacker be able to call multicasts? Or basically impossible

small grail
#

But if they installed something backdoor on your server, then...

steep mica
#

so in this case would first method be "fool proof"? Just do a check to make sure that the client in question sending the interact actually owns the player?

small grail
# steep mica so in this case would first method be "fool proof"? Just do a check to make sure...

Ok, lets say all the in game currency is stored on server. And the client just get the replicated number from server. If they hacked the game and modified it to, for i.e 1 trillion, then when they request RPC running on server to buy a very expensive equipment. You'd definitely check the currency on server for his profile instead of just because he sent enough currency by the RPC request. Something like that.

steep mica
small grail
steep mica
#

How would I even check if a client owns a player in an RPC to the server?

#

Oh actually I think I answered that myself

#

Actually, is validation called on the client or the server?

#

makes more sense to be on the server actually πŸ˜…

halcyon totem
#

I keep getting UActorChannel::ProcessBunch: SerializeNewActor failed to find/spawn actor. Actor: None, Channel: 42 for actors like player starts on my dedicated server ofr SEAMLESS TRAVEL, do I need to mark things to let the server know to bring them over?

steep mica
#

so yeah not sure on the actual solution on how I could verify the client actually owns said player

sinful tree
# steep mica lets say I wanted to make a game like cod and I use RPCs to purchase a weapon W...

In order for a client to communicate to the server an RPC must be sent by a client. Just creating an RPC function itself is opening up a door to allow someone to call that RPC at any time, even if you don't have any code anywhere that actually calls the function, the fact is, the RPC exists and is waiting for the signal to be received. Adding inputs into the RPC add an additional level of "insecurity" as you're then allowing someone to feed data into the server.

So, if you're wanting to allow someone to buy a weapon of some kind, your best bet is usually to call an RPC and send the absolutely minimal amount of data possible to allow the purchase of that weapon.
So if the identification of the particular weapon to buy is being done by an actor reference, your RPC then can include the reference to the actor you're trying to buy. If you're wanting to limit how far away a player is from that actor, then when your RPC is received by the server you should validate if the player is within the desired range of the actor they're attempting to buy. If they are, then you can deduct the currency from the player and have them "buy" the weapon (whatever that entails).

sinful tree
dark edge
#

show your locomotion blend space

halcyon totem
#

@sinful tree it seems like my player starts are falling to spawn on seamless travel, should they be place on the map or spawned in with code in the level blueprint

atomic wing
#

Am I going insane? Testing a scenario where client 1 damages client 2, but the on rep notify calls on client 1. And then I'm getting the progress bar set on the client doing the damage

restive current
#

Hey all! Does anyone have any GOOD resources for multiplayer / replication (Other than Unreal Docs) that can help to make more sense of multiplayer? Any help is very much appreciated.

sinful tree
atomic wing
sinful tree
atomic wing
steep mica
#

im confused, does the engine automatically provide this I don't see it being setup anywhere (GAS example project)

hollow eagle
#

APawn has OnRep_PlayerState, yes

steep mica
#

lifesaver

crisp wraith
#

Hmm, any way to replicate TOptional<bool> or do I have to roll my own implementation?

thin stratus
#

I think you need your own

crisp wraith
#

thanks

twilit radish
#

There's a neat method from Epic to optionally serialize values. It uses a single bit to indicate whether or not the value is valid, if it's not valid then all it ever sends is that single bit over the network. If it's valid it serializes your value + that single bit to indicate it's valid. See:
https://docs.unrealengine.com/5.1/en-US/API/Runtime/Engine/Engine/SerializeOptionalValue/

And as an example of it being used somewhere (assuming you have Github access):
https://github.com/EpicGames/UnrealEngine/blob/release/Engine/Source/Runtime/Engine/Private/Components/CharacterMovementComponent.cpp#L9071

Helper to optionally serialize a value (using operator<< on Archive).

#

@crisp wraith ^

crisp wraith
#

sweet, will check it out
thanks

floral elbow
#

What’s the best way to access the current player controllings state on a bp?

boreal wadi
#

Has anyone profiled while playing as a client and can explain why the client has 2 world ticks in a frame essentially doubling frame time in multiplayer

wind moat
#

Hello, I just created a deticated server, on the default ports and ip, but when I try to sstart a client, a client is starting in standalone mode, its not connecting to the server, anyone knowing what I am doing wrong?

twilit radish
floral elbow
#

Thanks, I was looping over get all actors and checking if it was itself lol

#

these seem better

twilit radish
twilit radish
wind moat
coarse gale
#

if its localhost that rules out any connection problems, what command are you using, out of interest

wind moat
#

in the folder where i build the client,inside of cmd: GameClient.exe 127.0.0.1 -WINDOWED -ResY=800 -ResX=450

twilit radish
#

Just to make sure, you checked both the client and server log right? Not just one of both? πŸ˜„

boreal wadi
# twilit radish On what exactly is this based? The engine simply runs as often as it can or as i...

Essentially in one frame there are 2 world ticks each with similar calls my guess is one is sent and the other is received. Only guessing this because when playing as standalone there is only one UWorld tick in a single frame. In my client session each world tick is taking 4ms plus shit like slate tick and random stuff for landscape. This is playing as a single client with some mass entities running around in editor. Haven’t tried a compiled build yet.

coarse gale
wind moat
coarse gale
#

open level, sry

wind moat
#

I am connecting through cmd tho..

coarse gale
#

I know, and its not working

#

try connecting like this and see if it works

wind moat
#

Did it, still not working, 2 seperate instances

#

imma try n recook everything i guess

pine sage
#

is that what you were looking for ?

#

What I don't understand is: this is Lyra stuff. It works well in lyra. I just migrated the C++ classes and some of the assets from lyra (for instance those anim bp etc) and I have the issue

pine sage
#

Understand that

#

it has been hard to make it work well at first but in the end, everything is working as Lyra intended to, except for this ...

#

I wanted to be able to understand those dependencies and see for myself what was working or not, and deal with it, to get a better understanding of the Lyra framework

pine sage
#

basically rather that just use something: learn from something

rose pollen
quasi tide
#

I doubt they're just going to be dropping work on Iris.

#

It's just something that takes time.

latent heart
#

They might just be focusing on 5.3 atm.

clear island
#

maybe something they'll combine with the push model

#

even about the push model there isn't many people that know about it and its a bit old at this point

quartz iris
#

If anyone could help ❀️

latent heart
#

How do you tell the players which player won?

#

Use an OnRep on that.

quartz iris
latent heart
quartz iris
#

So I can't multicast the variables and the rpc for the widget on the player

latent heart
#

You generally don't want to use multicast unless there's a reason to specifically use multicast over regular replication.

quartz iris
#

This is how the game starts

#

So this two are correct?

latent heart
#

Sure.

#

Use an OnRep on the gamewinner variable.

#

In that onrep, check if game winner == me

#

If so, display the widget.

quartz iris
latent heart
#

No

#

What would you do in that loop?

quartz iris
#

check all players

#

check if player is in the variable of winner

latent heart
#

Why do you need to check all players? You already know who "me" is.

#

It's the person receiving the OnRep.

quartz iris
#

I need the player character not the playerstate

latent heart
#

You should be using the player state.

quartz iris
#

Ok

#

So I put the winning widget etc in the playerstate?

#

and call with an rpc

latent heart
#

No

#

No

#

Just ignore everything I've said, I'm just confusing things.

#

And I don't have time to explain!

quartz iris
#

Ok

#

Dm me if you can

#

Later sometime

#

I mean i'd pay you if you can explain what i'm doing wrong with the multiplayer on my code

#

I can't even begin to say how many times i've been stuck

dark edge
#

Learn how repnotify works

#

Then in the onrep for WinningPlayer (a PlayerState variable in GameState), check if the local players PlayerState = WinningPlayer. If so, show the you won widget.

#

To reiterate:
Server:
Someone wins -> set WinningPlayer

EVERYWHERE:
OnRep_WinningPlayer -> if local player = WinningPlayer -> show widget

#

It's that simple

naive wind
#

I'm making a VR game and want to make interactions as responsive as possible whilst keeping parity and syncrhonization. What would be the best way to go about picking up an item and notifying every other connected client that it has been picked up?

#

Not asking for anything complex- just some psuedo code. My current setup is

PickupClient
{
if authority: PickupMulticast
if remote: PickupServer
}

PickupServer
{
PickupMulticast
}

PickupMultiCast
{
AttachItem to motion controller
}
#

the thing i fear about this setup is that if you have a latent connection, picking items up will feel delayed and sloppy- i would prefer picking items up to be instantaneous on the client

thin stratus
#

@naive wind Having an Item picked up and attached is State. That should not be done via Multicast.

twilit radish
#

This indeed will be latency depended. It kind of simply depends on how far you want to go with making it feel smooth I suppose. One thing I would like to point out is that you really shouldn't use a multicast for the "this person has picked up this thing" state. If either a new person joins or the current actor associated with that player becomes irrelevant and after some time relevant again it will be out of sync. For things considered "state" like in this case I would absolutely recommend replicated properties πŸ™‚

The most easy solution is what you described above yeah. If you want to predict clients being able to pick up items you could consider "locking" the item until the server verified that whatever they picked up actually belongs to them. (Preventing duplicating items / cheating in general). Which could for example look in pseudo code like:

PickupItemClient
{
if server -> SetPickupOwner(the server)
if client -> PredictItemPickup
}

SetPickupOwner(TheNewOwner)
{
CurrentOwner = TheNewOwner // The replicated variable / "state" I was talking about to prevent new people joining getting desynced etc.
}

PredictItemPickup
{
LockItemForThisClient // E.g. make sure they can't "use" it (if a gun don't allow to fire for example) or let go of it again.
SendServerPickupRequest
}

SendServerPickupRequest
{
bHasClientAcquiredOwnership = false;
if NotAlreadyOwned -> 
  {
    SetPickupOwner(whoever called the RPC)
    bHasClientAcquiredOwnership = true;
  }

RespondToClientPickupRequest(bHasClientAcquiredOwnership) // If true "unlock" the item, else remove prediction as clearly something failed and the client didn't ACTUALLY receive ownership!
}
#

This is simply what my mind quickly came up with. Again, it might have issues or whatever and is generally more work but that's up to you to decide what fits or not ^^

thin stratus
#

There are a lot of edge cases with this

#

E.g. what happens if two clients pick it up at the same time

#

It's sadly not so easy :D

#

The easiest solution is to just have it ServerAuth, but that's of course not snappy

naive wind
#

thanks for the help guys.... like you said there are a lot of edge cases.

twilit radish
#

That's why I suggested "locking" the item and sending back a response with if the ownership was actually given yes or no. But I didn't say it was "easy" πŸ˜›

naive wind
#

gotta decide if i want to bite the latency bullet and have an easy time

#

which, shouldnt be TOO big of a deal i hope

thin stratus
#

I recently had to deal with predicted attachment. It's a pain

naive wind
#

who knows, it may even be better to punish latent players to drive them away lol

twilit radish
# thin stratus I know, but they said they don't need anything complex :P

That's why it's a suggestion. If it's too complex, don't use it. I did suggest it however because latency like that is VERY noticeable in Virtual Reality programs. But yeah.. It can definitely be a pain, but IMO kind of a must have with VR because again it's extremely weird to "pick up" something with your actual hands right in front of your face and the nothing happening.

#

But again.. Totally depends on their game etc. xD

naive wind
#

anyways thanks again guys

thin stratus
#

I should probably have pinged Ryguy directly. The "not easy" etc.stuff was not directed at you, Thom

twilit radish
#

Oh no worries, I was just clarifying just in case πŸ˜„

thin stratus
#

We actually ended dropping the "feature" (was an ability) completely, as it was causing too many issues

#

There were so many edge cases that happened during actual gameplay, where packages were dropped, or multiple things happened so closely to each other that predicting actually also needed reconciliation etc.

round ginkgo
#

Hi, I'm trying to use Rider with an expression to find out what client or server I am

however I keep getting UnrealEditor-Engine.dll not found.

the project is source build and I find the dll and pdb in Engine\Binaries\Win64

I tried {,,UnrealEditor-Engine.dll}GPlayInEditorContextString and {,,UnrealEditor-Engine.dll}::GPlayInEditorContextString

#

anyone able to help here? would help me immensely for debugging

hollow eagle
#

it's just {,,UnrealEditor-Engine}, remove the .dll

#

and you do need the ::

round ginkgo
#

@hollow eagle still getting this sadly

hollow eagle
#

are you on UE5 or UE4

round ginkgo
#

5

#

using debug editor configuration

#

is there some other setting / step I should do that you're aware of to find the module? @hollow eagle

I'm not sure if I need to have rider configured in a way?

quartz iris
round ginkgo
#

^ re my issue

it seems like GPlayInEditorContextString + NetDriver; ServerConnection reproduce valid values only on debug when starting up the editor, but then fail afterwards sunglass_cry
the pie session ingame says these values are invalid or when putting a breakpoint with the editor open in UUnrealEdEngine::tick

#

anyone any idea why it doesnt work ?

dusky pecan
#

why this variable does not replicating?

actor is replicated

polar patio
quasi tide
trim plume
#

Hi. I have this in a repnotify, which is based on a bool, however it won't set on the clients, only the server..
I have the bool getter variable connected to the SetSimulatePhysics node, but for testing I unplugged it again.
Only server got it false, all clients still have it enabled. I am really puzzled about this. Any help is greatly appreciated.
Sincerely, Matias

halcyon totem
#

when using seamless travel my actors placed o n the map arent making it over

#

is there a list I am suppose to add them to?

#

@thin stratus Im confused how do I mark my player start to persist into the new level? Any Actors further added via 'AGameMode::GetSeamlessTravelActorList'

#

how do I add actiors to the list?

fathom aspen
#

The persistent data compendium has an example

pale edge
#

hi, sorry to be a bit annoying with this question but im really struggling to get online sessions to work with online subsystem steam. Is there a full tutorial somewhere? ive followed about a million but i swear i cant get it to work for the life of me.

halcyon totem
#

@tranquil vine I checked but it doesnt have any example, I need to know how to mark actors

#

in blueprints not c++

tranquil vine
#

i dont think u meant to tag me but no worries

fossil spoke
fathom aspen
dark edge
#

That is not the local players PlayerState

dark edge
#

That's the first PlayerState (probably the server/host if listen server)

umbral barn
#

hello, i need some help with a replication

#

can some1 join feedback and supp channel?

wind moat
#

Hello, iΒ΄ve set up a Deticated server, the server starts up fine, but i cant connect to it, no matter what I do

latent heart
#

And the logs say what?

blissful talon
#

Hello, does anyone know how to know whether local machine has internet connection, and how to get the connection/disconnection events?

wind moat
twilit radish
# blissful talon Hello, does anyone know how to know whether local machine has internet connectio...

"A way" to do it is to occasionally send some requests over the internet. Maybe try and see if you can ping google's server, cloudflare etc. you could also rent a server of your own that you can ping along with those. Then if too many requests fail within a certain given time you can reasonably assume that the internet connection is unavailable.

There is supposedly also platform depended ways to do this, iOS and android as an example should have them but I'm not quite sure if Unreal provides anything for that in specific πŸ˜…

#

Regardless of that. Internet availibility is unreliable and can change on a per request basis. If it's for an indicator you can use something along the lines of what I just mentioned. But don't ever assume that because your previous request worked the next one will too πŸ˜›

blissful talon
twilit radish
#

Some platforms do support that. I don't exactly know how they implement it in general though. But that's not standardized and may not be available on all platforms or publicly exposed on all platforms.

#

But again, I'm not sure if Unreal even has anything for that in specific.