#multiplayer

1 messages ยท Page 106 of 1

crude tree
#

where do i find the .pdbs ?

#

ahh in Binaries right ?

fossil spoke
#

Yes

crude tree
#

Damn 2.2 Gib .pdb file of Debug ๐Ÿ˜„
so just slap the .pdb for the server.exe on the server and run it ?

fossil spoke
#

Its worth a try

#

Probably a good idea to include the rest of the .pdbs as well

blissful kraken
#

I am currently doing some research on multiplayer and kinda in a dilemma on whether i should use EOS or photon unreal sdk ? which is more scalable in future ?

fossil spoke
#

Epic obviously use EOS for Fortnite, so its certainly scaleable.

#

Im not familiar with Photon but I would expect it costs money and probably a lot of it.

#

Similar to the likes of Gamelift and Playfab no doubt.

blissful kraken
blissful kraken
fossil spoke
#

What is your game?

#

Do you require dedicated servers?

blissful kraken
#

I am trying to learn how to setup mutliplayer network for a VR headset

blissful kraken
fossil spoke
#

It will cost you nothing.

#

Take a look at the Redpoint Plugin for EOS

blissful kraken
#

EOS is based on blueprints or c++ ? or both ? cause photon only uses c++

small grail
fossil spoke
#

@blissful kraken EOS is mostly C++ but there are plugins which expose its features to Blueprint.

blissful kraken
#

Yes just saw it on the marketplace

fossil spoke
#

If you are unfamiliar with C++ you are going to find it harder to implement a fully functional multiplayer game.

#

Especially with Matchmaking etc

small grail
#

You can't avoid C++ especially you are using EOS to link account with other platforms. Mostly C++ code

blissful kraken
#

I am kinda trying to replicate VR chat

fossil spoke
dark parcel
winged badger
#

that one can be... unreliable

#

that sync algorithm is also the simplest of the lot

dark parcel
#

Trying to illustrate a bounding box for when an actor was hit in client machine when the data reached the server. How can I use network clock for this? Do I just periodically save the box location with a time stamp on it, then do I just get timestamp closest to the server timestamp for the location?

Sorry if the question confusing, I'm struggling to understand my self

latent heart
#

So you want to briefly display the hitbox as it was when the player was hit on the server?

#

So the only thing that really matters if the location and rotation, the time is pretty much irrelevant?

dark parcel
#

I want to have a debug box to illustrate extreme lag environment. A green box is the current location of the actor in the server when the data for the hit is received (which will be the current loc) and red box will be the area where the client hit the actor at his world

#

Trying to get the diff between the two to get tolerance for verifying the hit

latent heart
#

You don't technically need to store a hitbox every frame or whatever.

#

Every time the client shoots and thinks it's hit, store an id and the location (use an even increasing int32 and a map) - when the server acknowledges that hit, send the id and the location/rotation that the server saw it was at.

#

When you get that, draw both boxes.

#

Then delete the id from the map

dark parcel
#

Yeah I think I am way overcomplicating it. And thank you for the explanation. I totally get it

Would you happend to have a case use for time stamp? As I was told that it is necessary for network game

latent heart
#

If you only want the location difference, the timestamp is irrelevant.

#

Maybe you can store teh send time and receive time back from the server and half it to get an estimate of your lag at that particular moment.

lost inlet
#

and this, with a more frequent update rate, actually served my old studio fine

#

it actually is a more frequent update rate in newer UE versions

dark parcel
#

Do you have q case where you use the time?

lost inlet
#

round timer, rewinding for validating bullet hits

#

yeah it updates at 10Hz in 5.2

#

by default

#

it used to be an update every 5 seconds

dark parcel
#

That's the part where I'm trying to understand. So if the hit is invalid, server can rewind values on the client but how do I apply time to check validity of bullet hit

lost inlet
#

it's easy enough to have a ring buffer of positions and you can send a timestamp from the client

#

also the game state time does have a smoothing algo now (rolling average)

dark parcel
#

So as far as I understand, the server will have its time and the client will send its time. Do I just compare where the bullet is at based on the time stamp on the server and the client?

lost inlet
#

the client sends what it thinks the server time is (from the GS)

dark parcel
#

Ohh

#

I will keep on experimenting to make sure I get the whole idea. Tyvm both of you

crude marlin
#

Hey, on a listen server I have a pre-lobby where players can choose their teams. And after that I want to travel to the character selection map with seamless travel.
But when PostSeamlessTravel is called on the server, the server doesn't know about all the players with GetNumPlayers(), I'd only want to start the initialization process when the server knows about all the players after the seamless travel.
Is there any way to know when does the server knows about everyone?
Or is there any way to know with how many players did the server start the seamless travel, so I could just keep checking until it's right?

hollow adder
#

Hi guys. Im working on slot based inventory that has a replicated tag stack container for its data (array of GameplayTags and int32s). Evertyhing works fine as long as I use the c++ slot class but if I use a BP derived slot class replication break (even if I dont change any settings on the slot) and I get NetDeltaSerialize mismatch read error.

#

using c++ class:

#

BP for the deagle:

#

any ideas?

cedar forge
#

greetings, I have 2 children produced from the same father, the replication settings are the same in all of them, but when I use RPC in one actor, it works correctly, but when I use it in the other, it does not work correctly, what is the reason?

cedar forge
#

this code works correctly on one bullet but not on the other.

blissful talon
#

Hello, does anyone have some good explanation of UNetDriver? I can't find anything focused on google

compact flame
#

How do i replecate my blendspace 2D

twilit radish
twilit radish
cedar forge
twilit radish
#

Then check what's the difference between the two and in what exact step it doesn't work any more ๐Ÿ™‚

#

It seems to be fine from your screenshot. But for all I know it might not even be this specific part that's the problem.

#

The reason why I mentioned the owner thingy is because your SV_Sound event seems to be an RPC from client -> server. Which only works if the client is the owner of that actor.

quasi tide
quasi tide
#

How what?

compact flame
quasi tide
#

There are a plethora of tutorials covering how to do replication.

quasi tide
#

I'd recommend looking for a starter tutorial.

#

The pinned posts in this channel have some good resources as well.

compact flame
compact flame
#

Another replecation question this one is not animation but something to do with the true first person thing it switches from first to third person how do i make the first person rotation show on other players screen for instance in first person if you move your mouse your character rotates left or right baced on if you moved ur mouse left or right how it dont show on multi player idk how to replacate that

feral citrus
#

Hello,
We are having problems hosting and joining LAN games (with open "ip") on IOS on testflight. Development build works fine IOS-IOS, IOS-Android, IOS-PC, everything works when IOS is dev build, but when we make a shipping build and upload it to testflight game just crashes on open level. UE 5.0.3 from source

blissful talon
#

I'm trying to implement a server/client beacon, however for some reason the client doesn't connect to the server. I have followed some tutorials to setup the base code and it works fine using third person example, however the same code and configuration doesn't work using Lyra project. In Lyra the client basically doesn't receive any response from the server, even though they are using the same IP and port.

I have no clue why it may the case, so I wanted to basically find out how the beacons actually establish the connection, and see what is not called and why

twilit radish
#

In general there are not an extreme amount of resources about things like these. They are rather specific and very few projects actually have a need to do much in the first place with something like changing the NetDriver to something custom.

twilit radish
#

Although I don't know in specific what Lyra does with all those things. Didn't look much at it.

blissful talon
#

How do you search on his website though? There is no page called "something beacon" , I guess it's nested somewhere

twilit radish
#

That's.. Certainly a good question ๐Ÿ˜…

#

Not entirely sure.

blissful talon
#

I hate that he moved the multiplayer compendium from the pdf to the website. When I started learning the networking I have used the pdf version, and anytime I want to look back at some of the stuff he talked about I can't find anything on his website ๐Ÿ˜ฆ

twilit radish
#

I can give you the PDF if you want. I still have it on my PC exactly for that reason.

blissful talon
#

Yeah, sure, I'd appreciate it ๐Ÿ˜„

twilit radish
#

Don't sue me Cedric.

blissful talon
#

Thank you ๐Ÿ™

twilit radish
#

I am not 100% sure if this is truly the latest version of the PDF but most of it should still be in there regardless.

blissful talon
#

It's fine

quasi tide
#

He moved to the site because it is far easier to update and keep current.

#

It still has all of the same information

twilit radish
#

From his point I understand it and I don't blame him for it whatsoever, he's not getting paid for it by any of us after all. I'm already extremely thankful he did all of this in the first place. I just don't find it nearly as convenient though.

quasi tide
#

I find it more convenient

blissful talon
#

The only problem that I have with the website is that I can't find a search bar to quickly get to specific things

twilit radish
#

The search function is definitely my biggest issue. The other issue however is that I can't easily download it any longer. If my internet goes down or his webserver goes down there's no way to see it any more.

#

Which is why I have that pdf in the first place ๐Ÿ˜›

blissful talon
#

How can I find out what are the net driver definitions applied in the editor? I find the configs a bit weird, I mean there are different .ini files for each platform and some others for EOS, and each one clears and adds different driver definitions, I'm affraid that the beacon net driver is cleared somewhere, making the client/server unable to establish the connection

opaque swift
#

All I want is to spawn characters when I hit the Sphere, that's it.
But it only works on the server side. The client cannot spawn it.
(There are multiple same Sphere actors on level.)

blissful talon
#

So a way of doing that is the following:

opaque swift
dark edge
#

pawn, playercontroller, or otherwise manually set to owning

#

Playerstate maybe?

opaque swift
#

So you mean, "GameMode is not a directly owned actor, and you cannot run "Run on Server" type RPC functions directly in GameMode. Instead, you should run the RPC functions inside an Actor owned by the player and interact with that actor GameMode if necessary. "

#

What do you mean by actors owned by the client? Replicated checkbox? Taking these into consideration, I made RunOnServer > Multicast (RPC) in Actor_BP.
The server can spawn it, but the client still cannot spawn.

#

So you mean for example you can spawn it directly inside my own character? If so, I'm trying.

opaque swift
#

not working

tawny delta
#

Hi guys is here someone familiarized with UnrealEngine Replication? Iยดm having hard time to fix some aspect of the multiplayer I'm trying to implement.

hoary spear
formal solar
sinful tree
# opaque swift Thank you for your response. I ran this action in GameMode, unfortunately it did...

Its your order that's the problem.
If you want this happening on the server, you should just use a Has Authority check immediately on your overlap using the authority path - that'll make sure its the server running everything else.
Don't check if the instigating actor is locally controlled as that'll block the execution further on the server.
From there, you should be able to spawn the actor later on down your code. No need for any RPCs.

tawny delta
#

Is it possible for me to show you my problem in a VC channel, so I can show you all the context of the game?

formal solar
#

Not interested personally

formal solar
# hoary spear The actor must be owned (GetOwner) by the player invoking the rpc

This has me confused, what exactly is an RPC?

If I create an event and say run on server, then any snippets of logic executed inside this event are RPCs ('procedures') that the server is running?

If I try and call a function in my game mode (which only exists on server), that's an rpc?

I feel like I have a decent practical knowledge of all this but my theoretical understanding is bad

quasi tide
#

Remote Procedure Call

#

RPC would be the client calling a server RPC or the server calling a Client/Multicast RPC

#

The function that you actually mark as "Server" "Client" or "Multicast"

#

That's the RPC

formal solar
#

But if I have an unowned actor

#

And in my unowned actor I call a server rpc to spawn a replicated actor

#

That will run

hollow eagle
#

no it will not

#

clients cannot call server RPCs on actors they don't own

#

server RPCs can only be called by clients that own the actor they're trying to call the RPC on.
Trying to call it on an actor the client doesn't own will simply do nothing.

fair latch
#

Generally you want to only call from your player character or controller. Both being something they own

#

For server rpc

#

Setting owner can only be done by the server?

hoary spear
#

i run mine from playerstate ^^

#

but same rule applies. owned by the invoker

#

so I can trigger an RPC in MY character,

#

but not in someone else's character

fair latch
#

Set owner node only can be done by the server or im wrong?

hoary spear
#

Only way i'd trust it

#

if clients could claim ownership on their own.. ๐Ÿ˜„

#

that'd be crazy

hollow eagle
#

a client can certainly call set owner but the server is just going to continue rejecting them trying to do anything with that actor. At best the client will desync from the server's state because it mistakenly things it owns something it doesn't.

fair latch
#

Yeah i was just woundering if its possible :D. Posses can only be done on server side too right?

formal solar
#

Well what about replicated behaviour of stuff in world

Like you have a door that at t=100 will play explosion effect on all clients

hoary spear
#

in effect that's done on server

hollow eagle
#

the server can call RPCs on everything regardless of owner. Client RPCs will only run on the owning client, multicast RPCs will run for everyone.

sinful tree
fair latch
#

Are there advantage for grabbing relevant player and running on own client for each of the relevant player as opposed to multicast?

pallid mesa
#

nu, multicast already does that for ya

sinful tree
formal solar
#

Yeah so in my case the unowned actor spawning another actor on server

I was thinking a 'run on server' event

And the actual RPC would be the spawning node

Not the red event node

#

So the spawn would be invoked on server

#

But the red event node would be invoked on ???

fair latch
#

When a client spawn something it will only exist in their machine

pallid mesa
#

nu, u cant run a server rpc on a non owned actor... although beginplay execs on server, so you could spawn a replicated actor from a non replicated actor in the server execution context

formal solar
#

I'm not talking about client spawning

hollow eagle
#

as has now been stated multiple times: a client cannot call a server rpc on something it doesn't own

#

what you have said will not work

#

trying to do so will result in nothing happening

#

the server rpc won't run

#

at best you'll get a log that a client tried to do something it wasn't allowed to

pallid mesa
#

u can have a non owned actor in the world that spawns a replicated actor in the server, that works (beginplay authority for example)

formal solar
#

Well presumably if actor is unowned then an attempted call is made on all clients and on server, and the client calls are all dropped but the server one goes through?

fair latch
#

Server owned everything iirc

sinful tree
# formal solar Yeah so in my case the unowned actor spawning another actor on server I was thi...

Marking an event as "Run On Server" is marking the event as allowing an owning client to call the function to then be executed on the server. It is not necessary to mark everything you want to be executing on the server as "Run On Server", rather only things that you want to allow a client to be able to call so that the server then runs it. It's like allowing the client to say to the server "Please do this".

Events can happen on both the server and client and depending on how those events are called it could be executing on either or both.
For example: Begin Play - it fires on clients and the server for a replicated actor spawned by the server. If you use a "Has Authority" and use the "Authority" path, everything that happens from that point is running on the server. So if you set up a timer from there, that timer will only be firing on the server. So then if you wanted the server to spawn an actor every 5 seconds, you could use that timer to then call a Spawn Actor node to continually spawn an actor every 5 seconds without marking anything "Run On Server".

latent heart
#

It should really be called "Send to server" not "run on server"

#

Too many people think it means "this only runs on the server"

sinful tree
#

Or "this needs to run on the server"

formal solar
#

I understood your second paragraph but not the first

sinful tree
#

Cleaned it up a bit

left lance
#

I tap into GameState::HandleMatchHasStarted() to do some calculations on replicated variables, but I noticed that not all variables are replicated by this point... (E.g., I have a variable that is replicated with the condition: InitialOnly and it's value is 0 every time (it's default value), but it should be different value by the time the player joins (testing via adding players after starting the server).

When I put in a delay of 0, the replicated variable is then seen to be the proper value the next frame. Is this a safe thing to do? Or do I need to use a different method (e.g., don't use HandleMatchHasStarted) to ensure I'm always grabbing the latest replicated variable?

formal solar
#

I am sure I have some cases where I'm unnecessarily run code on both clients and server and this is causing bandwidth issues

left lance
hoary spear
normal crypt
#

Hey. You guys ever seen this? I have two reliable multicast functions that I call on the server's player character in c++. One of them is called on clients and the other isn't. The one that isn't called on clients is still called on the server itself...

formal solar
#

does possessing a pawn with a player controller automatically assign a player ownership over that pawn

dusky yarrow
misty birch
#

I have a vehicle blueprint, and Im setting up seats for the vehicle, but the problem is the clients have to RPC on the vehicle and they can't all own the vehicle.

#

How can I get past this?

misty birch
#

But I need to set what seats are available

#

on the vehicle

dark edge
#

In Pawn:
Input -> ??? -> TryEnterVehicle(Run on Server Event)
TryEnterVehicle -> do the vehicle entering stuff

#

The rpc has to be in your pawn or playercontroller

#

once the logic is serverside (after the RPC) you can do whatever,

misty birch
#

is there a way to go from the vehicle blueprint to the controller to the server

dark edge
#

the vehicle and pawn etc exist on both the server and client

#

your question doesn't make sense.

#

a run on server event can be triggered on the client side and it'll run on the server side

misty birch
#

My Enter Vehicle function and variables are on the vehicle blueprint itself

dark edge
#

that's fine

#

read what I posted

#

RPC inside the character

#

THEN do the vehicle entering stuff (you're on the server now)

misty birch
#

ill try this now

#

So would I cast to the character from the vehicle bp to call the function?

#

and then do the rpc on the character?

dark edge
#

Here's what you're currently doing:
Pawn Vehicle
Input -> Talk to Vehicle -> RPC -> Enter

And here's what you should be doing:
Pawn Vehicle
Input -> RPC -> Talk to vehicle -> Enter

misty birch
#

Only reason this is a bit more confusing is because the Pawn can only Try to enter the vehicle, its only in the vehicle bp where it decides weather you can actually enter the car by checking the seats

dark edge
#

Seats can be a replicated property, you can handle that case before the RPC

#

Start like this. Make a function on the vehicle that puts a pawn inside it (whatever that means in your context)

misty birch
#

i see what u mean, ill do the check on the pawn input and then once I know I can enter the car, do the RPC

#

great, i should just have this all in the character at this point

#

for some reason i didn't realize i could modify the vehicle variable from the character

dark edge
#

The character should handle everything up to getting into the actual vehicle. The vehicle should handle putting the character into a seat or whatever I think.

#

It can go either way though

blissful talon
dark edge
#

I would start out by making a vehicle with an overlap sphere that yeets any character that walks into it into the vehicle to test that part without relying on the client doing anything but walking near it

#

once that works, implement triggering it from the client

#

make sure small parts work before tying them together

#

and if you want to Press E to enter but also Press E to do other stuff, look into an interaction system

misty birch
#

i mean im not gonna have a lot of stuff for one input, maybe max 2 or 3 things

#

So would branches just be fine for that?

dark edge
#

What 2 or 3 thing?

#

open door, enter vehicle, press button?

misty birch
#

I mean like E to enter vehicle and then E to pickup item, and E to open door

#

thats 3 things

dark edge
#

I'd just make an interaction component or interface really

#

it's simple

misty birch
#

Ill watch some youtubes ab interaction stuff when it comes to that ig

dark edge
#

It just turns the character-side code into something like this:

Press E -> determine what to try to interact with -> RPC
RPC -> Interact with it

#

That's it for the character really

#

then what happens depends on the reciever of the interact call

#

A vehicle puts you in it. A door opens. An item has you pick it up, etc etc

misty birch
#

this is nasty

left lance
#

When is it safe to assume a replicated variable will be given to a new player? I thought HandleMatchHasStarted() would be the best spot, but this seems to give inconsistent results (e.g., so actors will have their replicated variables correct and some will be incorrect - e.g., still their default values)

hollow eagle
#

never, the engine makes no guarantees about when replication occurs aside from some very specific circumstances

left lance
#

Well... shucks. Maybe I'll do some RPC stuff instead

#

Ive noticed (maybe by luck?) that when I spawn an actor at runtime the HandleMatchHasStarted function always triggers after I have replicated variable values, but actors placed in the level don't. Is this just me getting consistently lucky? Or is it behaving differently because the actor is spawned at run time

dark edge
#

What are you actually trying to do?

left lance
#

A lot ๐Ÿ˜›

I have a delegate setup that any actor can tap into that fires whenever the HandleMatchHasStarted function fires (if it has already been fired before I tap into it, then it'll just call the passed in delegate right away). A found this to be a very handy 'Networked_BeginPlay' thing, but now I'm calling into question whether or not the assumptions I made about this method are valid

#

In one actor, I can get the latest rep_notify variable to set things up so late joiners will have a valid state when they arrive. This class is spawned at runtime and never has a problem.

In another actor (not spawned at runtime), I'm trying to sync a variable that'll get updated locally in a timeline node (replciate with initalOnly). But the variable doesn't have it's latest value, so now I'm worried my whole system is based on a false assumption and I've just gotten consistently lucky with the first actor

twin tree
#

Hey folks, is there any way to prevent the player from kicked back to the entry level every time a network error happens? I found this thread- https://forums.unrealengine.com/t/network-error-force-loads-entry-map-for-client-when-server-shuts-down/405257
Is the only way to do this to change the default entry map? Maybe I misunderstood the thread. Myself and my clients are quite perturbed about being booted back to the main menu screen instead of a character selection screen, and unfortunately clients cannot be logged in upon starting the game at this time

Epic Developer Community Forums

This seems to have been an issue for some time now without being resolved. If a listen server disconnects, the connected client in the session will get a Network Error event and is then loaded into Entry, regardless if that Network Error event is connected to a Open Level or console command (open mapname) these will be ignored and the client wi...

misty birch
#

Okay now im having a problem where clients can't access the box collision that is in the seat item, but the server can.

Accessed None trying to read property BoxCollisionComponent_14_4FB63B7A4AD9D572F8A83AB49529E3C1". Node: Branch Graph: GetClosestSeat Function: Get Closest Seat Blueprint: BP_ThirdPersonCharacter

#

I can see at runtime that its set

#

what doesn't make sense is that it can access every other variable in the seat array

#

just not the box collision

#

how is the client able to access the boolean but not the component that i know is set

#

it knows that seat 0 is unavailable but the box component prints as None only on clients

fossil spoke
twin tree
#

That doesn't involve changing the game's default entry map, anyway!

low phoenix
#

Is there a way to change the default NetCullDistanceSquared value without modifying the UE source?

low phoenix
fossil spoke
#

It seems

#

As though you can change the UOnlineSession::HandleDisconnect function to inject your own method for disconnecting.

#

As its virtual

#

And is whats called to ultimately force a Client Disconnect

#

Via GEngine->HandleDisconnect(World, NetDriver);

twin tree
#

๐Ÿ™ I'll take a look. You are a lifesaver, thanks so much for your time.

fossil spoke
#

You may want to setup your own function for this

#

As UEngine::HandleDisconnect is not virtual

#

And is what sends you back to the default level

#

You may want to duplicate this function and just change the specific code for that

#

To your level you want

#

Actually, looking at our code, it seems we have literally done the same.

#

UPGGameEngine::HandleDisconnectToHangar

twin tree
#

Fan-friggin-tastic, this is great news

left lance
# left lance Ive noticed (maybe by luck?) that when I spawn an actor at runtime the HandleMat...

It seems that by spawning the actor at runtime instead of placing in the world, HandleMatchHasStarted() will trigger AFTER replicated variables have been received, whereas if the actor is placed in the world, it will maybe be correct inside HandleMatchHasStarted(). Granted, this is just through testing multiple times... So, it could still be wrong, but I geuss for now I'll assume it's safe if spawned at runtime

left lance
#

Essentially, the root issue is when a player joins a match, an actor's begin play (or HandleMatchHasStarted) will fire BEFORE any of it's data has been replicated with it. I guess I just expected it to spawn with the most recent replication data

#

Most recent being anything that was fired before the player attempted to connect (I realize if stuff fired while connecting/shortly after connecting but before everything was initialized, that that replication data might not make it in time)

thin stratus
#

@left lance if the Actor that is placed in the level has NetLoadOnClient or whatever it is called set to true, then you might have BeginPlay with the default data? Try setting it to false and the Actor should spawn from replication

brisk tartan
#

hi guys. i'm trying to test multiplayer in my game using "standalone game" and "use one process" unchecked. When both processes are running, putting the windows side by side it's easy to tell how how the unfocused client is chugging at 5fps + major network latency.

When i test lyra standalone side by side, the gameplay is relatively smooth on the client that isn't even in focus. Is there an easy explanation as to why this is possible and how i can achieve the same to test my game appropriately? thanks!

left lance
thin stratus
#

@left lance multiple actors replicating at the same time is kinda never guaranteed to be valid on BeginPlay. That's what OnReps are for

sturdy owl
left lance
twin juniper
#

I do not understand the replication very well, I want to execute a Server function on an Actor when I interact with the Actor doing an Input Event. Some help, please?

thin stratus
#

You can't execute ServerRPCs on Actors that the calling Client doesn't own

#

Your Interaction stuff has to happen AFTER the RPC, not before it. You have to RPC in the Character or wherever first.

twin juniper
hoary spear
#

If a replicated array is updated multiple times in one function on the server, will it batch replicate to clients?

#

I would expect batch

#

so only one exec from OnRep_MyArray

fathom aspen
#

If it's updated synchronously then yes

#

A frame of replication won't come mid execution

hoary spear
#

And there's no silly queue for whatever reason

#

good, thanks

#

so the error is in my code ๐Ÿ˜›

chrome bay
#

Depending on what's in the array, e.g. if it's pointers to objects, you might get multiple calls to OnRep, even in the same frame

hoary spear
#

Structs

chrome bay
#

Do they contain object refs?

hoary spear
#

No, just a bunch of tags really

chrome bay
#

all good then, should only get one OnRep call each time

hoary spear
#

Interesting to know that it could be different with uobjects tho

#

or pointers*

chrome bay
#

It's because actors replicate independently, so GUID's might be mapped at different times

hoary spear
#

I see. Makes sense

chrome bay
#

The first change will be the array size changing, the second might be one of those pointers being populated etc.

hoary spear
#

otherwise it would have to wait for everything to be done, before updating the array

chrome bay
#

yeah

#

Even then, you might get those actors on different frames

opaque swift
#

Guys, there's something I'm wondering about. When I spawn the actor with the RunOnServer > Multicast method, both server and client can see the spawn process.

Only when I do RunOnServer > Spawn, both server and client can see the spawn process.
Adding SwitchHasAuthority also works fine.

If they all work properly, which one is the correct one?

chrome bay
#

Run on Server-> Spawn

upbeat basin
#

If you're spawning a replicated actor then it should be on the server

chrome bay
#

The multicast method will spawn not one but two actors on the client, the "real" one the server replicated, and the extra one the client spawned.

#

You never change anything persistent with a multicast

#

They are for one shot events only.

opaque swift
#

Oh thanks so we don't need to multicast since the actor is Replicated

#

So what is SwitchHasAuthority? I read but I don't understand much. Does that mean the action is run only by the Server?
The client cannot run the server anyway. Why are we using this?

thin stratus
#

@opaque swift mostly for events that are in fact running on everyone and you can't do anything about it

#

Such as BeginPlay

opaque swift
#

So there isn't much difference between "RunOnServer > Spawn" and "RunOnServer > SwitchHasAuthority > Spawn".

thin stratus
#

Theoretically not. Client could call it locally via cheats but not sure that gives them much

opaque swift
#

Okay, now everything is forming very well in my head!
Thank you so much.

opaque swift
#

Guys, what exactly does the "Replicates" tick in Actor details cover?
I mean, just RunOnServer was enough for spawning, but I needed RunOnServer > Multicast to hide the actor.

Is "replicate" just the process of extinction and existence, and "replicate movement" is just for location?

twin juniper
#

I have this "CustomEvent" on PlayerController and I cast to an Actor, the current "CustomEvent" is Executed correctly in Clients as a Server, but "Change" function not. How can be done it?

rotund cosmos
#

Can I call ServerTravel with ?listen parameter while using seamless travel to create a listen server?

loud frost
rotund cosmos
rotund cosmos
upbeat basin
# rotund cosmos yes. For me, when I pass along the ?listen option after the map name, while usin...

The purpose of that function should be changing the map while carrying all the clients with itself, compared to OpenLevel which would only change the map and don't care about any network connection (whether as server or client). I'm not exactly sure on this but ServerTravel might be required to be called from a server only due to it's purpose. So if you're on standalone, you might first need to use OpenLevel with ?listen to become a server, which then might allow you to use ServerTravel

rotund cosmos
thin stratus
#

So I'm not going to repeat what's already written in that

#

Please check the pinned posts and read through that

#

If you still have problems after reading it a bunch of times, feel free to ask again

upbeat basin
opaque swift
shrewd ginkgo
#

can anybody help me for add my lobby menu to my viewport

#

I can stream

bronze glade
#

I'm trying to make multiplayer spectating, and I have it set up so that when the player presses m1 or m2 they go to the next/previous player. I am trying to access the player list in the gamemode. I know gamemode is server only, so how can the clients get the player list from the gamemode to switch spectate players as well?

twilit radish
#

The game state has an array with all player states.

bronze glade
#

Okay I'll try going through gamestate instead

bronze glade
#

img 1: gamestate modifying living player list
img 2: player character adding / removing from list when they spawn or die
img 3: player character getting gamestate (at begin play after a few other things)

I get the error "Accessed None trying to read property GameState" Whenever I call either part of image 2

bronze glade
twilit radish
woven bramble
bronze glade
#

Thanks guys! Iโ€™ll do some more research for a better implementation then ๐Ÿ™‚

magic helm
#

The streamed levels stuff is something I need to dig into more of

fathom aspen
#

Powerful tool indeed

#

They've also got WP now which I have never got to really try

twilit radish
#

Who needs performance anyway /s

fathom aspen
#

I'm not even sure if WP counts on the same streaming levels from before, or if it uses something else

#

Been a while since I last read on the topic

twilit radish
#

I've never touched them so you're still many steps ahead of me in this regard XD

woven bramble
#

Let's say someone deleted the game we published via Steam, after playing it.
When he decide to download the game again, does it download with the save files or from scratch?

#

Is there a way to host the save files in steam?

quasi tide
#

Yes there is a way to save the files to Steam's cloud. Consult their documentation

sinful tree
blissful atlas
#

I wanted to test multiplayer in Unreal Engine, but I can see the server on my own computer. When I open two different instances of the game on my own computer in separate windows, there is no problem. However, on a remote computer, I can't see the server.

twin tree
#

#multiplayer message for a bit of context.
I'm using a duplicate of UEngine::HandleDisconnect, except I changed this line to use a different map to boot clients to when a network error occurs:

I'm using the modified function in UOnlineSession::HandleDisconnect as GEngine->HandleDisconnectToCharSelect(World, NetDriver);, but I still get booted back to the game's default entry map instead of /Game/Rotr/CharacterSelect/CharacterSelectMap

What am I doing wrong here?

#

Oh shoot sorry should this go in #cpp?

compact flame
#

How do i make my ragdoll work in multiplayer

rose pollen
#

is there a function for a client to detect if it is connected to a listen server vs a dedicated server?

wicked ember
rose turret
#

I'm looking at fast TArray replication but I don't understand how it works -- it seems to work on deltas, but what if I send a delta over UDP to a client and it gets lost? how does the array know which version the client is on (so it doesn't need to send an old delta?)

hollow eagle
#

You don't send data over UDP, the engine does. And the engine makes its own guarantees about reliability with its own networking protocol on top of UDP - replicated properties are reliable and will eventually be received (assuming the client doesn't just disconnect)

#

If the client drops packets then the server will eventually resend that same data. Deltas are based on the client's last confirmed state so if a client never confirms they received something it'll get resent.

rose turret
#

I see. so somewhere in the engine is some ACK'ing logic for these fast TArrays?

hollow eagle
#

not for fast arrays specifically

#

for property replication in general (and delta serialization)

quiet mortar
#

Why is this suddenly not working

#

it has been working up until now, now it wont even work at all

quiet mortar
#

it works on some maps and doesnt work on some others

#

for no reason at all

thin stratus
#

You would need to explain what "not work" results in and what's the difference between the maps it works on and the ones it doesn't work on

compact flame
#

How do I replicate my regolls

thin stratus
#

What are "regolls"

shrewd ginkgo
#

can any body help me about random character selection

rose pollen
pallid mesa
#

the way skeletal meshes replicate in unreal is by replicating the root of the skeletal mesh

#

if you wish to replicate each bone sparately then you'll likely want to send bone data transform from server to client and apply the impertinent interpolations

#

i recommend you looking at PhysicsReplication.cpp

icy jetty
#

Rigamaroles ๐Ÿ™ƒ

dusky yarrow
#

doesnt UE5.3 replicate physics bodies now?

loud frost
#

new to mutiplayer
i have a question
if there is 1 server and 3 clients and everyone has same variable named ChosenNumber but with diffferent value
now if i want to take average of all the value , what should i do ??

sinful tree
loud frost
sinful tree
#

There's a Player Array in gamestate that gives you a reference to all the playerstates in the game. Playerstates have a variable called "Pawn Private" which will be the reference to their pawn.
Loop through Player Array, get Pawn Private from the array element, cast to your custom pawn class that contains the value. Add the values up in the loop.
On the loop completed, divide the total value by the length of the Player Array.

#

Keep in mind, that value can only be calculated reliably on the server, unless you have your pawns set to always relevant as clients may not have the pawns of all players if they're not network relevant.

loud frost
sinful tree
#

I learned mostly from helping people on here. I'd see someone having a problem, I'd look into how to solve it by mucking about with the engine.

loud frost
#

any suggestion for new people in multiplayer ??

shadow hatch
#

question about the blueprint version(and also cpp tbh i suppose) of on replication functions

#

do they fire even if the value of the variable is default

pulsar grove
#

Onrep calls when the value is changed on server side regardless of default value

nocturne quail
#

why this should not work?

void ASurvivalCharacter::ServerProcessMeleeHit_Implementation(const FHitResult& MeleeHit)
{
        MulticastPlayMeleeFX();
        UGameplayStatics::ApplyPointDamage(MeleeHit.GetActor(), MeleeAttackDamage, (MeleeHit.TraceStart - MeleeHit.TraceEnd).GetSafeNormal(), MeleeHit, GetController(), this, UMeleeDamage::StaticClass());
        LastMeleeAttackTime = GetWorld()->GetTimeSeconds();
}

bool ASurvivalCharacter::ServerProcessMeleeHit_Validate(const FHitResult& MeleeHit)
{
    if (GetWorld()->TimeSince(LastMeleeAttackTime) > MeleeAttackMontage->GetPlayLength() && (GetActorLocation() - MeleeHit.ImpactPoint).Size() <= MeleeAttackDistance)
    {
        return true;
    }
    return false;
}
#

it will compile, but will always return false.

#

I can do like this.

void ASurvivalCharacter::ServerProcessMeleeHit_Implementation(const FHitResult& MeleeHit)
{
    if (GetWorld()->TimeSince(LastMeleeAttackTime) > MeleeAttackMontage->GetPlayLength() && (GetActorLocation() - MeleeHit.ImpactPoint).Size() <= MeleeAttackDistance)
    {
        MulticastPlayMeleeFX();
        UGameplayStatics::ApplyPointDamage(MeleeHit.GetActor(), MeleeAttackDamage, (MeleeHit.TraceStart - MeleeHit.TraceEnd).GetSafeNormal(), MeleeHit, GetController(), this, UMeleeDamage::StaticClass());
        LastMeleeAttackTime = GetWorld()->GetTimeSeconds();
    }
}

and it works, but the quesiton is why ServerProcessMeleeHit_Validate return false

hollow eagle
#

first, don't use validate for this purpose. If a client is slightly out of sync you're going to disconnect them for no reason.
second, debug and find out.

hollow eagle
#

validate is only useful for detecting outright impossible situations such that you want to disconnect a client because they're clearly either cheating or in a state that's impossible to reconcile with the server.

nocturne quail
#

I am disconnected

hollow eagle
#

validate is almost never useful, least of all for checking basic montage timings and distance which are both things that can easily be out of sync in normal gameplay.

nocturne quail
#

will not use validate for this case

nocturne quail
rose turret
#

if I have N clients, does the server keep N copies of bookkeeping information for replication?

I ask because for the fast array serialization, it seems like there's some state that's per-client (the last ACK'd version of the array) and it got me wondering about where that's stored

thin stratus
#

Is that StaticMesh part of the Pawn?

#

In theory the easiest is still to make sure the Pawn is the ViewTarget

#

If not, then you need to manually handle that via some other replicating propery that can identify the owner

#

Could hide it by default and only show it to the OnRep_Controller receiver

#

cause that's usually the local player

bronze glade
#

Sorry for a really basic question, does the Run On Server replicates option for custom events run the event on the client and also the server, or does the client just tell the server to run it and then the client does nothing? Or is it something different?

#

I have a section of blueprints that I thought would work with Run on Server, but it does not so I think I just have a fundamental misunderstanding

fossil spoke
fossil spoke
bronze glade
#

If the event has variables, does it use the server's variables or the clients?

For example I have a variable for referencing the gamemode (obviously client can't get gamemode), so if the event uses Run On Server, will it have the variable from the server, or the undefined variable from the client?

fossil spoke
#

The parameters of the RPC are sent along.

#

If you have a GameMode parameter on a Run on Server RPC, it will always be empty, because how would the Client be able to fill that parameter as you pointed out.

bronze glade
#

I'll send my specific example real quick maybe it will help me understand for this specific case a bit better. Thank you for explaining everything so thoroughly btw I appreciate it ๐Ÿ™‚

#

So in image 1 I am inside of the player character, getting the gamemode and setting the variable through a blueprint interface I made. This happens during begin play. On the client obviously this value would never be set. For the server though, it does get set and the next calls go fine

On image 2 I am running the RPC Cast To Server event and using the gamemode reference. It is not used as an input of the event, rather just getting the variable set previously. So I would have thought it would use the variable that the server had set instead. But it seems it's using the clients variable (empty)

dark edge
#

5.3 apparently added some prediction stuff

dusky yarrow
#

tho it was a cube that was not owned by anyone so that might be the reason why it wasnt being replicated?

dark edge
#

You might not have had physics replication turned on for that cube, who knows

dusky yarrow
#

no i remember ticking the "replicates" checkbox. i honestly think it was the fact that the cube was not owned by anyone so UE was confused which instance of the cube it should replicate

dark edge
#

I'd just make a physics cube actor, and begin play -> has authority? -> delay -> big impulse.

#

see if the clientside version gets yeeted along to follow the serverside one

#

theres a lot of tuning parameters for physics replication too, you can make it stricter or more lenient

#

I don't have a video handy but I got player-constructed vehicles replicating really nicely. Havn't caught up in my UE5 version but it should work. Replicating rigid body physics is pretty easy, making it seem smooth and dealing with latency on the client is the hard part.

dusky yarrow
#

yeah i pretty much did that when i was working on the game. the server yeets and the clients replicate. it was always just that the cube sometimes ends up in different spots when landing

dark edge
#

it'll always be slightly different

dusky yarrow
#

yep that could be it

dark edge
#

you can tune how different you consider to be close enough

#

10cm is nothing for a spaceship's position, but is a lot for something smaller-scale

dusky yarrow
#

yeah that was for a grenade toss thing

#

so being as accurate as possible was crucial

dark edge
#

afaik the physics is simulating on both sides, just the clientside is being "nudged" towards the serverside result, with a hard snap if error gets too big.

dusky yarrow
#

i ended up implementing my own physics replication for grenades specifically

dusky yarrow
#

at least i know for sure that's the case for how CMC corrects it's sim desyncs

#

and with the new large coordinate system the error should get less and less

#

so you can be less strict with the physics correction so you dont overfill the network stack

marble gazelle
#

Did you call mark array dirty thing after removing? (array, not item)

#

You said add works. I'm talking about removal

#

So you don't "remove" an item but just change its value?

thin stratus
#

Tbf they wrote that in the original question hehe

marble gazelle
#

I just woke up to my defense . . .

thin stratus
#

I'm not sure why that would not work

#

What exactly is Item

#

Struct?

marble gazelle
#

did you add each item one by one and marked them all dirty to have proper replication keys?

#

I'm not sure if that's enough. IIRC you had to mark each item individually. I think I had a similar issue at some point.

#

Ok, sad

#

I mean, you could step into the replicate function with a debugger and check why it's ignoring the entry

#

Your array has to implement call static bool FastArrayDeltaSerialize(TArray<Type>& Items, FNetDeltaSerializeInfo& Parms, SerializerType& ArraySerializer); in bool NetDeltaSerialize(FNetDeltaSerializeInfo & DeltaParms)

#

DefaultEngine.ini

[Core.Log]
LogNetFastTArray=Log

I guess.

#

as said, for me it seems the items are not initialized properly

#

I'll see if I can find smth in my old project verions (We removed multiplayer as it was too much effort^^)

#

we wanted to do an MMO type game, but with 3 ppl, in our spare time. this was not managable^^

#

Well lack of xp and ppl^^ In the end I was / and am writing all code on my own and if you add MP, so proper prediction etc into the equation, everything just blows up. Especially if there is no one else in your team that has net exp to discuss things with.
Now with Singleplayer things are way simpler and mor managable if I have to write all the code^^

#

So I think you need to call MarkItemDirty for each item, otherwise it doesn't seem to work, as this is the only place the sets a replication ID.

#

and maybe prior beginplay, as I think the first bunch could be sent before

#

(assuming you add the values before, basically add and mark should be in the same function call)

shadow hatch
#

im trying to run listen server in PIE and im getting some errors because i think my 'Get Controlled Pawn' function keeps referring to player one, the host, but how do i make sure the function retrieves the connected clients pawn instead

#

basically trying to attach a widget component locally to every player

shadow hatch
#

this seems to have circumvented my issue since it seems like otherwise the code runs on the 'server' thus it runs double for the host even if its not meant to

thin stratus
#

BeginPlay calls on every instance

#

So if you don't lock it to local controller with that node it will run for every player on the server

shadow hatch
#

the way i had it set up worked just fine when running dedicated simulation but i had a 'is dedicated server' check somewhere down the line

#

but controllers do exist on both server and local client dont they so theres that

#

ive eliminated all the errors ive had except this one, im guessing im referencing my player controller somewhere but it doesnt tell me exactly where though pikaglare

#

C_1 refers to connected player im assuming, not the host

half umbra
#

hi, can the client change the value of the replicated variable?

#

should i change these variables server side only

shadow hatch
#

pretty sure client can change the variable on client side but not on server side if youre not using a PRC to run the code on the server but then if the value is changed on the server it will override the value on the client again if that makes sense

half umbra
shadow hatch
#

well yeah unless you need the variable to be different on each client

half umbra
#

what if i run Multicast Event and then run Server event?

#

can i do that?

#

Server >>> Multicast >>> Server

#

this is okey?

shadow hatch
#

wait why would you do that though multicast also runs on server

#

unless you run multicast locally then it runs locally too

half umbra
#

I run Multicast to run character animations for everyone, and then I want to do the logic only on the server, using MontageNotify

#

Play Montage (On Notify Begin)

#

I want spawn Projectile etc

#

and this should spawn only on server

shadow hatch
#

anim notifies can be set to run on server and after that i think what you need to do is add a branch with 'is server' to ensure that certain logic only runs on the server

#

doesnt really matter for coop, i think, but then you gotta have a branch with 'is server' set up in your anim notify logic

half umbra
#

will be ok?

shadow hatch
#

mmmmmm

#

i think it would be better to run 'can run cosmetic events 'false or just literally use the is server branch and what notify are you working with anyway

shadow hatch
#

well this is better

#

idk i think authority was... hmm

#

you will have problems with AI because i dont think ai has network authority but i might be wrong maybe someone smarter can elaborate

#

in case you want ai and players to use the same functionality

half umbra
#

ok, thanks

#

I thought it worked the same ;p

shadow hatch
#

in some cases

half umbra
#

i should use Get Game State >> Get Server World Time Seconds, for check game time?

shrewd ginkgo
#

can I set server name without advenced session plugin

half umbra
#

but if you use dedicated server then I think you can do something with this

#

with database

shrewd ginkgo
#

like steam?

#

then I need to use advenced session

#

ty

robust linden
#

hey, I created a 1st person template project to then set it to multiplater later on. The issue I have right now is that the mesh of other players is invisible right now, probably due to the fact that it was a 1st person template. Are there any settings I need to change for my mesh to be visible?

#

I have two meshes for one character btw, one for 1st person view the other for 3rd person

fallow bison
#

You guys know much about replicating custom blueprint-based actions?

Iโ€™m not currently worried about client cheating or things like that right now. I just need to know the order in which actions are run throughโ€ฆ like.

If my client needs to move forward with add force. Do I run the add force within the blueprint and the server, then compare them? Or make it so the add force is only run through the server with a has authority?

twilit radish
# fallow bison You guys know much about replicating custom blueprint-based actions? Iโ€™m not cu...

If we're talking about something like a prop with physics enabled, lets say a barrel for example that can be kicked around, then you would probably want to apply the force only on the server and have Unreal take care of the 'making sure it gets replicated to clients part' as Unreal already covers this in specific. If you're looking for something character controlled I would go for the built in character system, it's fully multiplayer compatible though extremely limited in extending with custom behaviour in blueprints. If those aren't a proper fit for your specific project's needs then you're quite quickly thrown in the deep by making sure it all works on your own. However depending on if it's a blueprint only project I would absolutely stick as much to the engine as you can in this case as C++ is pretty much the standard in Unreal regarding multiplayer, especially for more fundamental things like those.

fathom aspen
#

Sure, it just won't replicate

wicked radish
#

I have an intermittent frame drop when running my game in editor. Every few seconds at regular intervals. Only happens when playing with multiple players. Goes away in standalone. Any ideas? even if it goes away in packaged build, it's too bad to ignore.

fathom aspen
#

Profile and optimize your game

#

For example sending too much data to clients would mess up their experience

#

Also editor content is not cooked

#

So take that into account

wicked radish
#

Happens in empty level with any character (incuding starter FPS character)

#

I've heard people solving by turning off UDP messaging but doesn't work / not a solution for me

wicked radish
#

No idea. No effect for me so irrelevant. Really frustrating and hard to search for because anything realted to "frame drops" or "Stuttering" brings up all sorts of shit. I'm getting a regular drop in frame rate every couple of seconds. Infuriating. Only had this since moving to 5.2 I think

sinful tree
#

Calling too many reliable multicasts perhaps?

oak prawn
#

hello, I have a question for my game, whoever won the mini games should write their name and everyone's score should appear in a list. Does anyone know of a guide video for me to do something like this?

wicked radish
twilit radish
# oak prawn hello, I have a question for my game, whoever won the mini games should write th...

If you're talking about an online system with a bunch of people their names / scores those are called "leaderboards", there should be plenty of information about it on the internet by searching with that word. If you're however referring to something along the lines of for example 4 friends playing against each other and just at the end listing their scores etc. then I don't really think there are any guides or videos for that. It's also not a very difficult thing to achieve I would say if you've gotten that far. The score part is just simply keeping track in for example the player state of a player what their current score is. A name can just be send from the client -> server whenever they are done with entering their name and can then be replicated to other clients through for example again the player state (I believe Unreal even provides a default name system) ๐Ÿ™‚

oak prawn
twin juniper
#

Any good tutorials to learn how to make multiplayer games?

fathom aspen
#

Plenty to pick from in this channel pins

amber stone
#

Would anyone here be able to fill in some gaps for me in the process of building a headless dedicated server, but having the ability to access a classic server browser list from the client end, specifically with hosting the dedicated listings on steam servers? I know this is a broad topic, but I'm semi-versed in how the RPC works between the clients and server while working from within the editor, I just need a more refined look at the entire pipeline.

rain condor
#

Yo! When i wanna sprint on client got stutter

twilit radish
#

I would find it very unlikely Unreal provides a way to do what you're asking for because assigning to replicated properties on a client is a valid technique to use for prediction. If that would invoke the onrep which is only supposed to be invoked by the server changing state then you get a very messy situation really quickly. If you simply want to invoke the method you assigned to be the callback you can do so your self. At least in C++, not sure about blueprints.

sinful tree
#

Why not just use a setter function that then calls the logic you want when you set the variable vs. directly setting the variable.

sinful tree
# rain condor Yo! When i wanna sprint on client got stutter

That's because you're increasing the movement speed on the server before the client knows about the increase of speed, and then the server corrects the client's position.
You can set it locally on the client first before hand, but then you'll run into a problem if you start introducing lag. The only appropriate way to handle sprinting while using the character movement component is to make a flag that gets stored in the saved moves within the character movement component (needs C++ to do)

twilit radish
# amber stone Would anyone here be able to fill in some gaps for me in the process of building...

If you're asking "how is this normally done?" then all it really is that dedicated servers register to some kind of server and say "hey I am alive and people can join me" from which clients can retrieve a list and in most cases filter based on whatever they want to and then just connect to it. Not entirely sure if Steam specifically provides a way to deal with a dedicated server list. Depending on how many dedicated servers that are in the end you'll probably get some different architectures though. To name a random example AWS Gamelift will probably have to deal with more than a few hundred servers ๐Ÿ˜›

rain condor
amber stone
sinful tree
# rain condor Thx to reply! Is any way to did it without character component?

The trouble is, the CMC is over 3000 lines of code that also handles client side prediction and replication - if you think you could do the same without the CMC, you'd have to make your own movement logic and unless you include client side prediction, you'd have to either live with client authoritative movement (allowing clients to move anywhere in the world at whatever speed allowing cheats) or server authoritative, basically not caring that your clients move laggily and they have to wait for the server to replicate the movement before they see anything.

sinful tree
#

The sessions retrieved usually contain whatever is needed in order to establish a connection with that particular server as well.

amber stone
#

Doing that from the client side of my code is the part that I feel like is going to be my real entry point for testing(after I get my dedicated server built and packaged and my stuff synced to a depot on steams end)

#

if im thinking about that right

#

Im trying to get myself into a full development pipeline with this stuff

#

I have my version control set up via a helix core/perforce set up on a VM I have

opaque swift
#

I added a password setting in the Create a session section. What I want is for it to only join the session that matches this password.
How can I do that? (I searched a lot)

amber stone
#

I'm just trying to get the full dev pipe running in a way that I can test this stuff from the ground up with full network capability with the platform im trying to host on (steam)

sinful tree
amber stone
#

yeah I will host on my end

#

that makes it way more convenient honestly

#

ill just host on my infrastructure, I just needed to know the steps to interact with those session subsystems

#

Thats the portion of the pipeline I'm unfamiliary with still.

#

I can fully replicate a unreal game and such, but Id only ever done it via the editor, and through the unreal launcher.

#

Now im at the point where im doing source builds of the engine with my full version control set up

#

trying to get an actual dev infrastructure running for a team of people.

cinder tusk
#

Hello. So I made a swimming system by this tutorial:
https://www.youtube.com/watch?v=0UFRpnNb5So&t=480s
And it works fine, just when I set the "water volume" to true, then it sets it for both of the players (I use two players) and I didn't find any solution or swimming system alternatives. Do you have any idea how to solve it, or another swimming system?

Hello guys, in this quick and simple tutorial we are going to make a simple swimming system, which will make the player able to dive and come up to the surface in Unreal Engine 5.

Animations package: https://forums.unrealengine.com/t/updated-v2-free-cmu-mocap-animation-library-2500-retargeted-to-ue4-skeleton/100523
Follow me on Twitter: https:/...

โ–ถ Play video
woven bramble
#

After clicking Event, you can access what I said (run on server etc) from the details panel on the right.

opaque swift
sinful tree
# opaque swift The only thing I want is to add a Join a Private Session button and connect to t...

Just reading the session setting is something like this, keep in mind, you probably wouldn't be directly checking from the Find Session node and you'd have additional logic to display all found sessions with custom buttons for joining a private session that would popup a widget requesting the password and you could then check it against the appropriate session result. Also, this isn't a secure way to handle the password as it would be accessible to a client once they retrieve the session and someone with a little know-how could read it and then enter the server.

opaque swift
cinder tusk
sinful tree
ivory dagger
#

im new to UE multiplayer and trying to make a FPS game. im trying to figure out should damage be handled from game mode or is it ok to apply damage from one actor's BP to another, can someone help me which way is better

opaque swift
tardy fossil
#

is there a way to hide/destroy an actor for a client once it's no longer relevant?

sinful tree
# opaque swift No no. That's not what I meant, you misunderstood me. I was just wondering if "g...

I fully understood what you were asking and that's why I responded the way I did. The Find Session node returns an array of sessions, the next thing I did was getting just the first session in the returned array (that is the Get 0 node) and that gives me a reference to a single session which I can then feed into "Get Extra Settings". Again, I'm only doing it that way just to show you how to read the extra settings of a single particular session result. The "Get Extra Settings" > "Get Session Property" bit does no looping on its own.

You would have to loop through the array of found sessions and do what you want with that array to display the found sessions, but you wouldn't loop through that array to check if the password you entered was correct for each of the sessions in the array.

#

What you would do, is once you know what session you want to attempt to connect with, is check that particular session's extra settings for some typed in password, and if it is correct, then you'd join that session.

#

Find Sessions > Loop through and create widgets representing those sessions feeding in reference to the session (likely with a join button of some kind in the widget) > Add widget to a container of some kind to display it.

On click of your Join button > Check if associated session has a password setting > If it doesn't then join the session. If it does, prompt for password > On submit of password, check password == session's password, if so, connect

opaque swift
woven bramble
# cinder tusk You meant something like this? Now it changes between walking and swimming when ...

No, I didn't mean that. But you're close.

All calculations are done on the server, so we use "RunOnServer". Create one custom event, make it RunOnServer. Create one more custom event, make it Multicast. It will be RunOnServer > Multicast. Then Multicast > functions etc. But the variables must be on the server side.
It is very difficult to explain in writing, you can solve it by watching a video for a few minutes.
This is called the "RPC" system. You can search for unreal engine multicast tutorial.

woven bramble
sinful tree
# woven bramble While on the subject; Using a single code, how can we log quickly in to a sessio...

I'm not 100% sure on this as I haven't done it myself, but you'd need something that can generate a unique code, verifying that code isn't in use currently, and then when creating the session enter that code through the session settings. Hopefully the code wouldn't be too long or confusing either ๐Ÿ™‚
A client could then do a search for sessions, filtering based on the associated code. Find a result - join, if no results, then invalid code.

I have no idea if any online subsystems have something that could handle something like this already, but that would be the gist of how it would have to work.

cinder tusk
#

This maybe? (sorry for the issues, but I'm quite new to Unreal Engine)

woven bramble
#

This will fix your problem.

woven bramble
# sinful tree I'm not 100% sure on this as I haven't done it myself, but you'd need something ...

I am able to generate unique code. This is exactly where I am stuck:
"A client could then do a search for sessions, loop through them checking to see if the code they entered is == to the code associated to the session, and if so join, if no results, then invalid code."

"Find Session > Result > For Each Loop"
All sessions that I can connect to are scanned, one of them is selected with the for each loop. Whereas "for each loop" should only scan the ones that have the code.

According to the method you gave, 1 session is selected and if the code is invalid, the system stops. Again, I have to go back and scan.
If I scan again, it's still the same session. And it is always invalid.
I couldn't figure out how to find the one with that code among those sessions.

sinful tree
#

I think if you went the filter method, you'd need it to be exact, so you may want to auto-capitalize or lowercase everything.

#

Testing with null subsystem, the extra settings works, but I'm not sure the filter does. You can still retrieve the settings and check in the loop.

cinder tusk
woven bramble
woven bramble
cinder tusk
cinder tusk
loud frost
#

@sinful tree you tell about player array , can you tell that syntax please

sinful tree
loud frost
#

For c++ in
TArray<PlayerState* > is the variable in which i can store ?

sinful tree
#

If you wanted to cache it, yes, TArray<PlayerState*>.

loud frost
#

one quick question
if i play with 3 player with llisten server in editor mode
then why it only shoows playerArraySize is 1
do i need to build and test on other machine ??

sinful tree
loud frost
#

beginplay is the issue ๐Ÿ˜…

#
APlayable_char* PlayableChar = Cast<APlayable_char>(ArenaPlayerController->GetPawn());
if(PLayableChar)

if condition its only valid on server pawn
cant on client pawn

#

@sinful tree

sinful tree
loud frost
#

no variable PawnPrivate

sinful tree
#

It's there. It's a private variable, can only be accessed within PlayerState. There is a GetPawn() function in PlayerState.

loud frost
#

one more question

think i am creating a simple thing like every client choose a number and after choose server add up all the sum and tell every client that this is add result
so i dont need to replicate the client variable ??
because server only need local client variable ??

cedar forge
#

Hello, I am trying to show the picture of my character in the inventory to be local and alive. But the problem I have is that the texture target is one, that is, the character of the last player in everyone's inventory appears.

winged badger
#

i assume you're doing it from a BeginPlay of a Character?

#

all Characters on all machines run their BeginPlay

#

you'd want an IsLocallyControlled Branch there if is

fathom aspen
#

Preferably do it from RecieveControllerChanged

#

At BeginPlay it can be a false negative

thin stratus
latent heart
#

Don't be silly.

#

AI just intuits what players do these days.

thin stratus
#

ServerRPC

glass vector
#

is it better to have a single replicated struct containing all the variables you want to be replicated, or to have separate replicated variables?

#

inside a BP

#

for network performance

thin stratus
#

No idea what the GameMode and PawnOwner has to do with that

#

But you can use the Role just fine

dark edge
#

how often is it updating, how big is it, is all of it changing all the time or just some of it, etc

static flare
#

My server spawns a building (actor) that has a replicated InteractionComponent. When a client interacts with it, I'm trying to call the component's UPROPERTY(Server, Reliable) ServerRPC_Interact(..).
I'm getting No owning connection for actor BuildingBP_C_0. Function ServerRPC_Interact will not be processed..
Is what I'm trying to do illegal?

#

I don't want to route everything through my player controller..

blissful talon
#

Hello, does anyone know whether it's possible to get any of this information client-side?

The code from the screenshot is run server-side when I have to disconnect a client beacon, thought I can't really find how I can know that the client-side client beacon has been disconnected from the server.

quasi tide
#

You can only call a server RPC on something that you own

glass vector
#

should having it in one replicated struct be better for performance?

valid bough
#

Hi, in a multiplayer game if you kill another player, should you destroy the player and respawn it accordingly or should you just keep the player in play and do a "transition"? idk what that transition entails but im just thinking here.

blissful talon
valid bough
blissful talon
#

Are you talking about the revive in sense that someone (a human) can revive a player or that the system will be doing that?

valid bough
blissful talon
#

Well, it heavily depends on the type of game you're making as well. Usually no one will be standing on the player corpse, but it may be the case, and it would be a bit problematic to respawn a player on the that spot. You may want to basically push players away once the player respawns. To improve that you may want to do some sort of explosion on the revive spot, it may not suit your game though

valid bough
opal fox
#

If i have some Replicated variables in an actorcomponent that is attached to my character, and i have marked my character as bReplicates = true; the replicated variables inside my actor component should be replicated across all clients by default ?

The variables only seem to replicate when i set Replicated = true in the blueprinted version of the actorcomponent

valid bough
opal fox
#

@valid bough yes im doing that

valid bough
#

Are you replicating the variable and stuff too? and have a DOREPLIFETIME?

opal fox
#

Yes in my ActorComponent.cpp class I have overridden GetLifetimeReplicatedProps and assigned doreplifetime to the variables

#

then I have insantiated the actorcomponent as a blueprint and are calling the functions from there

valid bough
#

Okay so I dont know your code, but it can be a logical error too. You might not have authority. The best thing to do is to add logs and follow the debugger.

opal fox
#

I call these from blueprint

#

and the variables inside the logic part are replicated

valid bough
#

if im not mistaken, UObjects cannot be replicated

#

It has to be AActor

opal fox
#

ok so is that why its possibly working when i set the component to replicates ?

#

I kinda dont want to replicate the whole component thats the thing

#

Only a few variables inside it. but ok ill read up about if thats true then i might have to the way ive done it

valid bough
#

Wait its of component, are you setting components replicates to true?

opal fox
#

I dont want to, but i tried to see what happened and then it works yes.

quasi tide
valid bough
opal fox
#

Yeah not sure how to do that since the replicated variables needs to be in the actorcomponent

#

otherwise it defeats the purpose of how i set everything up with the component

#

The component is supposed to handle everything including replication of its own variables, but i dont want to replicate the entire component

valid bough
#

I would try just moving the RPC code to the character and then call the functions in the component?

opal fox
#

I might have to replicate the whole component if i want it to be responsible for everything I guess. If i called this function as an rpc through the character it probably would work, but im doing something on beginplay in the component itself. think thats the problem

#

Dont know if its reasonable to start the process from the player, cause then it assumes that will always have this component

fringe gate
#

Hello everyone, I'm giving up on this issue, so basically, these commands are not working when you open a level with ServerTravel (work fine with OpenLevel) also other commands work just fine only the viewmodes commands.

valid bough
opal fox
#

@valid bough it kinda makes sense now that i think about it, how can the component be completely self sufficient if its not responsible for all its own replication

valid bough
carmine ember
#

I'm sure i'm missing something here, but it seems that the steam sessions are broken at least in 4.27. Our dedicated server build is not reporting the player count to steam. I can see in FOnlineSessionSteam that the players are being "registered"/"unregistered" as they join/leave.

Can anyone point me in the right direction for where to look to figure out whats causing this? it seems this reporting is not done from FOnlineSessionSteam

opal fox
#

@carmine ember check in the FOnlineSubsystem or the steamSDK

#

@carmine ember where are you getting the player count from ?

carmine ember
carmine ember
#

The function is called UFindSessionsCallbackProxy::GetCurrentPlayers

opal fox
#

ok if u check the FOnlineSessionSettings theres some variable there for public connections maybe check that?

#

i mean from the SessionResult

#

FSessionResultData this object stores some data about current players aswell, maybe check if thats the same

#

Sorry im stupid thats my own implementation of it

carmine ember
#

Yeah thats what i'm using, that is populated from the query to steamworks sdk, which is returning 0 players

opal fox
#

Result.Session.NumOpenPublicConnections but this one u can get from the result FOnlineSessionSearchResult

carmine ember
#

so steam, itself, thinks there's zero players

opal fox
#

hmm ok then

carmine ember
#

and steam's server browser reports zero players too, to confirm this

#

so it seems the server itself is not reporting the player count to steam

fringe gate
#

@carmine ember same happened to me with EOS, tried for months then I gave up

#

always returns zero

#

ue5

shrewd ginkgo
#

whats wrong about it

#

I want to do editible server name

carmine ember
fringe gate
#

That variable only works with local mp subsystem

carmine ember
#

@shrewd ginkgo if you're using steam you need to provide the -SteamServerName="SOMETHING HERE" command line argument

rotund sapphire
dusky yoke
#

Hey guys. Trying to make my players have the same ID for level generation here, and Im using GameState to convey the seed ID. However, my client can't Cast to the GameState - how should I tell the client what the ID is? I read that GameState is accessibly by both server & client, but can't be modified by the client?

quasi tide
#

Client shouldn't be modifying it anyway - you're just reading data

dusky yoke
quasi tide
#

Don't rely on delay in a networked environment

#

It's bound to fail in a real-world scenario

dusky yoke
#

What's the way to go about doing it then? It's just at the beginning of the play session, and players are locked in place while it's generating the level

quasi tide
#

You can override the OnRep of gamestate I believe. (C++ only though).

dusky yoke
#

Aaah I see. I'm just dabbling with blueprints sadly

#

Maybe I can hire someone to fix that up down the road ๐Ÿ˜…

quasi tide
#

Well, if it is a custom GS, you can also just do an OnRep for that variable specifically.

opal fox
#

@rotund sapphire thanks yeah ok well then it makes even more sense in this case to just replicate all the props

rotund sapphire
# fringe gate Help please

in Engine\Source\Runtime\Engine\Private\GameViewportClient.cpp check UGameViewportClient::HandleViewModeCommand i think it's a debug-like cheat command which depends on many things to be available or not - maybe you can figure out for yourself, but it seems "clients" are not supposed to use that command and the debug view is unlikely exists in a shipping build anyways so don't use that command. Maybe you should consider implement a similar vfx in a postprocess material rather - if possible.

fringe gate
hollow eagle
#

that command requires a cheat manager. Which would require running EnableCheats and the server not rejecting it.

rotund sapphire
#
#if UE_BUILD_TEST || UE_BUILD_SHIPPING
    Ar.Logf(TEXT("Debug viewmodes not allowed in Test or Shipping builds."));
    ViewModeIndex = VMI_Lit;
#endif

That's pretty much states it shouldnt work in a shipping build, but it may be a different method and i'm overlooking something here. Altho it may be is a shipping build you got there, and it still works (yey), the OpenLevel will instantiate a listen server for you, whereas ServerTravel is a client-only mode which is a different networking model and perhaps cheats are unavailable hence the command won't work.

hollow eagle
#

Those view modes aren't meant for use in shipping at all.

fringe gate
fringe gate
strange apex
#

hello, i am not sure why but out of nowhere this fails ( comes out of "ON FAILURE)
the last time i tested to create a lobby it worked just fine, now it wont work

dark wing
#

Is there a way to exclude server code from client? using BP?

quasi tide
#

Not out of the box.

icy jetty
#

Oh I thought heโ€™s looking for isServer

#

Or something along those lines

quasi tide
#

That doesn't strip the server code.

#

You might be able to hack around doin' it by doing a lot of BP classes that are server only and the client interacts with a server rpc that would then talk to the server only BP class. On package, just exclude the server folder of classes or something. Then for your server, you would include that folder.

#

That might work.

#

But is a roundabout way of doing it I'd guess.

quasi tide
hoary lark
#

i can hardly understand it or how it would work, so: yes

dark wing
#

So the authentication logic is not exposed

quasi tide
#

Just...use C++

dark wing
#

Even if its exposed it doesn't really matter, but its better

dark wing
quasi tide
#

Then strip that out use the preprocessor stuff

dark wing
#

I just thought there is something equal of preprocessor in BP

dark wing
quasi tide
dark wing
carmine ember
# carmine ember I'm sure i'm missing something here, but it seems that the steam sessions are br...

@opal fox @fringe gate On this I've found something interesting. In the SpaceWarServer.cpp file in steamworks sdk example project there is this code. Look at the comment:

// These server state variables may be changed at any time.  Note that there is no lnoger a mechanism
// to send the player count.  The player count is maintained by steam and you should use the player
// creation/authentication functions to maintain your player count.
SteamGameServer()->SetMaxPlayerCount( 4 );
SteamGameServer()->SetPasswordProtected( false );
SteamGameServer()->SetServerName( m_sServerName.c_str() );
SteamGameServer()->SetBotPlayerCount( 0 ); // optional, defaults to zero
SteamGameServer()->SetMapName( "MilkyWay" );

#ifdef USE_GS_AUTH_API

// Update all the players names/scores
for( uint32 i=0; i < MAX_PLAYERS_PER_SERVER; ++i )
{
    if ( m_rgClientData[i].m_bActive && m_rgpShips[i] )
    {
        SteamGameServer()->BUpdateUserData( m_rgClientData[i].m_SteamIDUser, m_rgpShips[i]->GetPlayerName(), m_rguPlayerScores[i] );
    }
}
#endif

There is code in UE4 that calls BUpdateUserData. However, its never actually invoked. This seems like a bug in UE4, but I would be shocked if a bug like this existed

half umbra
#

I need to check if the time has elapsed for 10 indexes and display this time for each index separately in the widget, how would you do it so that it is as efficient as possible? Event Tick and check time? Or 10 timers? Or what?

rain condor
#

Try get pawn owner return me unknown on BP animation

dark edge
#

Update animation runs like every frame

#

The owner is probably not a pawn.

rain condor
#

But a character is a pawn, no?

dark edge
#

It is

dark edge
#

is it ever ACTUALLY unknown?

dark wing
#

the project settings gamemode and world override gamemode are both called, this is weird

rain condor
loud frost
#
    if (ArenaPlayerController) {
        ArenaPlayerController->SetInputMode(FInputModeGameAndUI() );
        ArenaPlayerController->bShowMouseCursor = true;
        ArenaPlayerController->SetNumber(6);
        UE_LOG(LogTemp, Warning, TEXT("player controller"));
    }

if i call this function in character then it only work on server not on client

rain condor
soft isle
#

Do I need to do something out of the ordinary to get properties on a player controller to replicate? I have the following:

WorldPlayerController.h

    UPROPERTY(BlueprintReadWrite, Replicated)
    AWorldObject* ControlledAvatarActor;

WorldPlayerController.cpp

AWorldPlayerController::AWorldPlayerController(const FObjectInitializer& ObjectInitializer)
    : Super(ObjectInitializer)
{
    bReplicates = true;
}

void AWorldPlayerController::GetLifetimeReplicatedProps(TArray< FLifetimeProperty >& OutLifetimeProps) const
{
    Super::GetLifetimeReplicatedProps(OutLifetimeProps);

    DOREPLIFETIME(AWorldPlayerController, ControlledAvatarActor);
}

ControlledAvatarActor is set by the server during an RPC call, and should have been replicated back to the player owning the controller. The replication doesn't seem to happen though... it works fine as standalone/listen server, but it remains empty on client. In other words, it doesn't seem to actually replicate.

Maybe it's really obvious and it's just a matter of being blind after far too many hours on the project lately, but... what am I missing?

hollow eagle
#

is that actor replicating?

fathom aspen
#

ControlledAvatarActor is a pointer to another actor seemingly, so that one also needs to replicate

soft isle
#

It should, but I may have stuffed something up during my rewrites. Lemme go back and check

#

Yep, AWorldObject does replicate. For completeness, this is the final part of the RPC back and forth that also occurs in AWorldPlayerController. It sets ControlledAvatarActor here, but it does not seem to be replicated. However, the callback (through custom event HandleControl in screenshot) that it executes does indeed return a valid value.

WorldPlayerController.cpp

void AWorldPlayerController::ReceivePlayerControl_Implementation(FGuid RequestID, AWorldObjectPlayer* AvatarActor)
{
    FReceivedPlayerControl* Callback = OnReceivedPlayerControlCallbacks.Find(RequestID);
    ControlledAvatarActor = AvatarActor;
    Callback->ExecuteIfBound(AvatarActor);
    OnReceivedPlayerControlCallbacks.Remove(RequestID);
}
tired eagle
#

do TMAPs not replicate? even if I wrap them in a struct?

hollow eagle
#

no

soft isle
#

Actually, doing some more experiments this seems even weirder. Hooked up a bunch of get display names to print strings to try and figure out what is going on. HandleControl's Avatar Actor shows a valid actor. Checking the ControlledAvatarActor of the casted WorldPlayerController from that same exec chain shows the same actor. However, I have a custom event in the player controller as per screenshot, and there ControlledAvatarActor shows up empty.

plucky prawn
gleaming crane
#

Anyone got a good tutorial on setting up a quick dedicated server so i can have like 5 or just a handful of friends play-test on it?

thin stratus
#

The same dedicated server tutorial that exists for years should still work

gleaming crane
#

Oooh ok thats good to know actually

thin stratus
#

Build Engine from Source. Package Dedicated Server.
Host it somewhere where you know the IP from and the port is open.

gleaming crane
#

Was worried it was outdated or smthing

#

Thank you

cedar forge
plush wave
#

How do I get the Net GUID of an actor?

old knot
#

anyone knows which one has better performance in multiplayer games? create actors as subobject or spawn them at begin.

chrome bay
chrome bay
plush wave
#

Good to know they can be unique between clients

thin stratus
#

You don't need the whole IsLocallyControlled + ServerRPC if you want to spawn it on the Server anyway.

#

Then just check HasAuthority and spawn on Authority without the RPC

#

The code you are running after your Delay is bad

#

The Delay fixes the ping issues and here won't even work cause your InventoryCharacter variable isn't marked for replication.

#

You should change the Variable to RepNotify, which gives you an OnRep function (auto generated) in your function list.
You can then move the code that you call after your Delay into that function.

#

The delay should of course be deleted then.

#

That all only works if InventoryCharacter is replicated, which I'm still unsure about if it should, cause your original post talked about it being supposed to be local

#

Which means you wouldn't need the RPC and can just spawn the character locally.

#

Which removes the need for the delay too.

#

But I don't have enough info to tell you what of the two options fits your needs.

old knot
chrome bay
#

I don't follow. If they are replicated actors, only the Server should spawn them.

queen escarp
#

this is 2 clients i cant se it on the other one

#

the skeleton mesh is invisible

winged badger
#

that would probably be because you're spawning them from BeginPlay, which executes on every instance of every actor on every machine

queen escarp
#

erhm yeah ? but how come i can se the cubes then ?

winged badger
#

probably because you either had both client and server spawn a cube

#

or you had all characters spawn a cube

queen escarp
#

its attached to the same BP

#

as the skeletal mesh

plush wave
#

Does the player controller get notified when it's associated game state is ready?

#

Is OnRep_PlayerState() an acceptible canidate?

thin stratus
#

Or did you fat finger Player vs Game?

#

(PlayerState would make more sense and OnRep for Clients is then correct)

plush wave
#

Was wanting the local player to immediately convey player state information at the beginning of the game to all other players

#

Thus wanting the player controller to push info to the associated player state as soon as possible

#

Didn't know what was init first Player State or Player Controller

hoary spear
#

Is there any OnRep_GameState event we can react to ?

#

Guess ill do per var rep notifies , google dont yield me any valid results :p

fathom aspen
#

There is GameStateSetEvent in World that you can listen to

hoary spear
#

Might be best to just do it on a per var basis anyways, thanks tho, I'll keep that in mind

swift turret
#

can i spawn UObject on client side and send it to server in RPC somehow? is it possible anyway? or struct is my only option?

chrome bay
#

If you want to send runtime data then a struct is your only option.

#

Use FInstancedStruct if you want to use the same RPC to send different data types

queen escarp
#

why the hell is this getting Null reff

#

ive scheckedf the "what weapon int" it gives correct value

#

ok nevermind

rain condor
#

Any idea why animation bp is replicate only for movement cache? Second pic it's how looks in game and third it's how have to look when i have a gun

#

I check rifle anim bool and it's working ok

burnt acorn
#

Hey everyone, I am trying to destroy an actor by clicking a widget button attached to the actor from a client but nothing happens. I am calling Server RPC on click. Any idea how to go around this?

void UBaseInteractable::OnGOButtonClicked()
{
    Server_PickupItem();
}

void UBaseInteractable::Server_PickupItem_Implementation()
{
    Multicast_PickupItem();
}

void UBaseInteractable::Multicast_PickupItem_Implementation()
{
    if (Owner)
    {
        bool bDestroyed = Owner->Destroy();
        GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, FString::Printf(TEXT("Picking up: %d"), bDestroyed));
    }
}
#

Message is printed on screen and owner exists.

chrome bay
#

Clients can't call RPC's on actors/objects they don't own.

#

Also you don't multicast destroy, the actor should be replicated and you destroy it server-side only.

#

Move the RPC to something you do own, and pass the target as an argument

burnt acorn
spare cloak
#

I am very dumb plz help ๐Ÿ™
I'm trying to get Lyra LAN multiplayer to work on UE 5.2

In the Lyra menu, I can start a session on one computer, see the session in the menu on the second computer. However, when I click to join, I get a bunch of errors

Does EOS need to be enabled to play Lyra locally? (had a brief look into this and getting it setup seems intimidating...)

Any help/advice would be greatly appreciated ๐Ÿ™‡โ€โ™‚๏ธ

blissful talon
#

Hello, I need to create online beacons as soon as the player enters the world, in can be both clients and servers. What event is out there to get that information?

shrewd ginkgo
#

how can I get session result

#

I want to disable 4 connected player border if maks player 4

spare cloak
blissful talon
#

I'm not sure whether you can play Lyra using two different computers though, I have never tried to myself, though it seems like it should be a thing

azure vessel
#

Hey guys, i'm new to blueprinting and i'm trying to make an among us type of game:] I'm trying to change a bool of "is impostor" in the player state here but i think i'm confusing myself ๐Ÿ˜ฐ

grave rock
#

how do i make multiplayer i tried to make it and i packaged it and i testes it with my friend, but we couldnt find each others session

grave rock
magic furnace
grave rock
#

idk how rlly

#

i quit unreal engine cause nothing worked

#

but now im here

#

again..

rain condor
rain condor
magic furnace
#

so it's not replicated properly

#

your rifle is not replicated properly, or your bool

#

or somewhere down the line

#

you're missing repnotifies

#

right now I am guessing you only inform the server and the owning client

#

or even only the server

#

not the other players

grave rock
#

so does anyone know how i can make a multiplayer system so my friends with different networks can join

magic furnace
#

you would have the gamemode on the server determine who is the imposter

#

then just set a variable

#

ideally a repnotify

#

on that variable

#

and that is about it

#

Right now I don't even know if you replicated anything in that event, doubt u did

#

The event doesn't run on server and even if it did, it's only setting the variable wherever it runs

grave rock
#

?

#

wym

magic furnace
#

what do you mean by a multiplayer system

#

and different networks

grave rock
#

just to make it so

#

my friends can join the session

#

i quit unreal engine a while ago

#

cause i couldnt make it work

#

my friends couldnt find a session

magic furnace
#

well easiest would just be the advanced sessions plugin

grave rock
#

would that work?

magic furnace
#

with steam even easier

grave rock
#

so they can find a session

#

but wait another person told me

magic furnace
#

yeah it has everything you'd need for that

#

and plenty of tutorials

grave rock
#

i had the wrong version

#

someone told me that

#

i had 4.27 i think

#

does multiplayer work on that?

magic furnace
#

haha yes it does, unreal tournament, unreal engine

grave rock
#

or maybe i just packaged it wrong

magic furnace
#

it works since the beginning of times

grave rock
#

what are the packaging settings for multiplayer

#

cause all my game ideas have multiplayer..

magic furnace
#

if you are going to just use hosting and sessions

#

you don't have to do anything

grave rock
#

i did that

#

on 4.27

#

and it didnt work

magic furnace
#

if you're going to host dedicated servers, you need the source version of unreal engine

grave rock
#

it worked when i opened 2 windows on my pc

#

then i could play multiplayer with myself..

#

but my friend couldnt find any session

magic furnace
#

yeah, that is because you probably only have the sessions run locally

latent heart
#

How have you set up sessions?

latent heart
#

What online subsystem are you using?

grave rock
#

do i need to use a subsytem?

#

i did once

#

but i didnt test it

grave rock
magic furnace
#

It's going to be easier using a online subsystem like steam

#

or eos

grave rock
#

eos costs money right?

magic furnace
#

idk, don't use it

grave rock
#

steam then?

#

i used it once

latent heart
#

If you haven't set up a subsystem, your friend should still be able to connect directly via ip:port

magic furnace
#

steam is 100 bucks for an app

grave rock
#

but i want it to be auto

#

not like

#

that u have to give ur ip everytime

magic furnace
#

then you need to have an API

grave rock
#

just to play with someine

grave rock
magic furnace
#

your own

grave rock
#

.

magic furnace
#

an API and a database

#

that stores ips

grave rock
#

how do i do that

latent heart
latent heart
magic furnace
#

so let me ask

#

how many ips

#

do you think

#

there are on the internet

grave rock
#

billions

latent heart
#

Internet literally means inter-network. Between networks. It's almost guaranteed that you're on different networks.

magic furnace
#

so you need a system to find the ips

#

but you can't go over billions

grave rock
#

how do i make that system

magic furnace
#

you create an API

#

google what an API is

#

and what it does

grave rock
#

then?

#

make a database?

magic furnace
#

you will figure it out

latent heart
#

He's trolling you massively.

magic furnace
#

those basics will tell you

grave rock
#

what database would i use

grave rock
magic furnace
latent heart
#

Just google how to set up EOS or something.

magic furnace
#

I told him that as well

latent heart
#

Or use direct connection via ip:port.

magic furnace
#

he wanted a way without it

grave rock
#

ye but does it work

grave rock
#

i asked does it work

#

no one answered

magic furnace
#

no, we're telling you a way that doesn't work

grave rock
#

and i thought it didnt work

#

cause of this

magic furnace
#

yes

#

but then you need a way of accessing the ip

grave rock
#

so can i just use a subsystem without making the API

magic furnace
#

that is what subsystems do for you

grave rock
#

oh ok

#

so a subsystem does it auto for me

magic furnace
#

yes, they make the process simple

grave rock
#

i dont have to retrieve the ips somewhere?

#

so should i use eos

#

cause i dont really like steam cause u need it downloaded

latent heart
#

http://www.whatismyip.com go there, tell your friend the number and get him to connect to it from teh console.

grave rock
#

and some people dont have steam

latent heart
#

Then you need to use an online subsystem. Be that steam or EOS or whatevevr.

#

Pick one, add it.

grave rock
#

does eos work without epic games being downloaded

#

cause if someone doesnt have it

#

it wont work

#

?

#

will it work then?

magic furnace
#

yes

grave rock
#

al

#

alr*

shrewd ginkgo
#

how can I get session result
I want to disable 4 connected player border if maks player 4

rain condor
#

Any idea why left hand look like that?

azure vessel
magic furnace
#

yes, but you need to set the boolean for the player, right now you are setting it for the gamemode

#

so you would set it in the playerstate

#

furthermore do not use for loops in this case

#

drag off the player array and do a for each

#

you could do a for loop, it's not inherently bad, but most people would use a for each

#

unless you're doing a random number on the index to decide whichj numbers are the impostor, then it's a good idea

#

Another thing, create widget is client only, so there is no point calling it here, it's indicated by the screen icon in the top right of the node

plush wave
#

How does a replicated TArray of actors behave if some of those actors go outside of the net cull distance?