#multiplayer

1 messages · Page 85 of 1

small grail
#

For testing

#

Your game match map

hushed anvil
#

Ohh okay let me check

#

I think it's a bit weird to call a player function from the level but here's what I got

#

Yeah it doesn't do anything

small grail
#

Oh, you should just get local player controller

#

Don't get it from the character it is not possessed probably.

#

For testing, you can just simply get player controller (0)

dark edge
dark parcel
#

Is running trace every tick on server side too expensive?

#

If the trace is done locally, can't the player cheat?

dark edge
#

What are you trying to do?

quaint roost
#

hello all, i have a very concise question that i cannot find any help for online. I am using dedicated server build for multiplayer

I have a construction script that uses random bool. if the bool is true, it will generate a mesh with collision. if it's false, it will not

Will the server and client build have the same level? in order words, is it possible that the server build has the collision but the client odes not?

quaint roost
dark parcel
#

I see... i mean that kinda helps

#

checking distance, etc

quaint roost
#

i do server side collisions for simplicity in my game

dark parcel
#

was thingking too hard on accuracy

quaint roost
#

no performance issue, but i never tested above 4 players

dark parcel
quaint roost
#

btw your character model looks good. what is your game about?

dark parcel
#

cuz in games like dark soul, I think the hitbox is kinda accurate. So we have this artfiact in laggy game like u hitting the person the blood comes out but he ain'tt aking damage

#

just a random character I made quickly in Vroid

quaint roost
#

dark souls multiplayer hit registration is like the worst thing in history 😆

silent valley
#

You'd be better setting te bool on server and replicating it

dark parcel
#

@quaint roost can't u just do repnotify on each replicated static mesh? Im not sure tho, dove to Mp very recently

quaint roost
#

hmm i see. i don't need it to be dynamic. i just want it to generate once consistently

dark parcel
#

In what scenario do you need to have a collision that is either on/off? just wondering

silent valley
#

Don't use construction script, it reruns multiple times. But if the bool is an instance variable, once its set and saved in the level it will be loaded the same way.

#

But yeah, seems like there's probably a better way to achieve what you want.

quaint roost
dark parcel
#

That reminds me of nier automata

#

the level looking nice

#

Don't all the cubes need collision tho?

dark edge
dark parcel
quaint roost
dark parcel
#

Im probably gonna implement int oxff way

#

trace per tick in client, then on server check have a big box collision infront of the character

dark edge
#

but you'll want to do some serverside checks, ranging from a distance check to basically doing the same thing clients are doing, depending on how much you care about it

dark parcel
#

👍

#

@dark edge Can I ask how one would tackle montage replication that is in sync

#

Suppose one of the player is fishing or dancing

#

How can joining player see the same animation?
I tried repnotify for montage but it obviously won't play on the same animation position for obvious reason

naive bloom
#

so I have an event that is supposed to launch everyone in the game really far when its triggered but it look like it works on server side but on client side it activates and then within the next frame it immediately sets them back to where they were. any ideas how to fix this?

queen escarp
#

Hey guys question i have a "overhead name" on the players wich displays their name but in my case every name is the same on everyone

quaint roost
hearty kite
#

Hey Guys, I’ve been confused for a few days on this. Why does a blueprint network native to Lyra replicate to Clients with Server only functions, but when I do a similar network, it only runs on Server, not Clients?

Lyra Native Blueprint, Server only functions work on Server and Clients:

#

My Custom Event, using a similar function only works on Server:

#

What do I have to do to make my custom Give Weapon function work on Server AND client?

queen escarp
#

what dose this mean ?

dark edge
queen escarp
#

hehe you want it right ❤️

tame stratus
#

All I want is for each player to send their "fCamRotationPitch" variable to other players. (with this variable I make the character look up or down). but I can only see where the first player is looking. I could not understand where I made a mistake.
Character.cpp:

#

Character.h :

#

I can only see the variable of the first player in other players.

sinful tree
# hearty kite

It looks like you may be trying to access a variable from a widget when you're attempting to get the Hotbar Inventory Component and looping through it on the server, and widgets don't replicate so the server won't have it for other clients, only itself if you're running a listen server.

dark edge
sinful tree
tame stratus
#

I didn't know and i will try it thanks!

dark edge
#

Yeah it's dumb that they don't just automagically replicate the entire control rotation but this is the typical way to get a replicated pitch

#

lots of cruft from the old Unreal shooter days

kindred widget
# hearty kite

None of these get run on the client. There's a gate at the beginning of the function to only run on authority.

naive bloom
#

so I have an event that is supposed to launch everyone in the game really far when its triggered but it look like it works on server side but on client side it activates and then within the next frame it immediately sets them back to where they were. any ideas how to fix this?

hearty kite
kindred widget
#

Then it's doing something that replicates or RPCs to the client. But they're both running code on authority. Which means if these are replicated objects, authority is server and none of this code is running on clients

hearty kite
naive bloom
dark edge
#

also

#

that get player pawn 0 is goofy

#

you will only ever launch ONE character

#

the Player Array elements should have a ref to their pawn, or some other way to get to it

#

Pretty much never Get Player Pawn 0 or Get PlayerController 0 or anything else like that that uses player index

marble fox
#

im confused

naive bloom
# dark edge What happens if you just do this serverside?

If i change the custom event to run on server it only launches my server character and nobody else, not sure what the player index 0 means but i could only get something to launch when its at 0 lol, and im still pretty new so ive gotta figure out what player array does someone just told me to add it haha. I tried connecting array element to the object reference and it gave me an error.

dark edge
#

you're launching server character as many times as there are players in the server

#

drag off that array element and type pawn

#

or even character

lyric sand
naive bloom
dark edge
#

not the 1st pawn to exist on the machine, which is what you were doing

oblique nymph
#

Please help. I have a 4 player local split screen game that I been testing, and all of a sudden the player 2 character stop responding to controller 2. Instead it respond to controller 3. I reverted back to several older versions and it’s still the same. All the controllers work fine when I play overcooked from the Epic launcher. So the controller are not broken. Any ideas why??

queen escarp
#

why is this not working 😮

#

im attching it to a mesh

#

if i spawn at location only it works

sinful tree
#

What are you attaching to?

#

See if it is valid in the multicast.

queen escarp
#

player mesh

#

ok

#

yeah its valid

sinful tree
#

Ok, then you likely don't want to connect the location as you have the "Snap to Target" option on the Location Type, which should move it to the mesh.

queen escarp
#

aye that did the trick X)

#

thanks

queen escarp
#

Question how demanding are the "save game slot function" ? i mean could i save after killing a npc everytime or will that cause issues ?

fierce fiber
#

Hey guys, I have this blueprint that detects which weapon the player is holding, and depending on the value, it changes the model of the weapon in the players hand, it doesn't seem to work and I'm very stumped, any help would be hugely appreciated!

#

This is for a multiplayer FPS game

#

The custom event which contains the long string of blueprints is running of a multicast, which then gets fed into the server only custom event, this event is then called on the event tick

#

The "weapon selection" var is replicated with no conditions and the skeletal mesh is replicated 😄

small grail
#

And which class holds this BP graph?

fierce fiber
#

Its the player BP

fierce fiber
small grail
#

Ok, so where did you tell the server that one certain client changed the weapon?

fierce fiber
#

I assumed that was with the multicast being fed into the server event? Still trying to get a base understanding of replication as Im struggling to understand it, but I assumed that was the way of doing it

small grail
#

In my opinion, since you've already have the replicated variable for weapon index, you don't need RPC but just use OnRep event on client side when the client got the weapon index from the server then change it

fierce fiber
#

Yeah I tried the on rep event for when the weapon is switched, copied and pasted this set of code into it and got no result sadly

small grail
#

You need to run an RPC OnServer from client to tell server the client changed the weapon by set the value of this replicated variable.

#

The current RPC you are running is always from server side to client means server never get updated.

fierce fiber
#

Ah, so I need to get information from the client first then run it into the server

small grail
#

Wait you have Server_WeaponHand_Set

#

Where did you call this event?

fierce fiber
#

Event tick

small grail
#

Then you need to add one input for this event

#

Pass the weapon index to server

#

Because on server side, the replicated variable never changed, right?

fierce fiber
#

Yeah, it only changed for the client

small grail
#

That's why you need to add an input for your Server_WeaponHand_Set RPC

#

From the client which changed weapon to server

fierce fiber
#

Ok, Ill give something a go and get back to you captain o7, also a quick question, Im assuming, any information I want passed to the server, it needs these inputs in order to act on what I want it to do right?

#

I cant just go ahead and make a RPC for server if I havent passed any information through such as variables in the inputs Im assuming

small grail
#

If you called the RPC from client to server, you need to pass it.

#

And if you don't have a replicated variable, you also need to multicast the value from server to client as well.

fierce fiber
#

Okdokie 🫡

#

I will try this and get back to you, thanks for the guidance my smart friend

small grail
#

Cheers!

fierce fiber
#

Also, I know you probably mentioned this, but would it just be easier if I do rep notify and contain this code inside of the OnRep function for the weapon switch?

fierce fiber
late violet
#

Are there any particular requirements to sending Actor arrays over RPCs? I try to send an array of replicated Actors to server and it turns out that after being received actors are totally miss-matched on the server side, some are invalid, some have parameters that don't match the actors found on the client when sending.

small grail
fierce fiber
#

Cool, and does it need any specific condition to make sure it replicates to server and clients properly? Or can I leave that field empty and just set the var to OnRep?

small grail
small grail
fierce fiber
#

Okdokie Thanks again!

late violet
# small grail Sending replicated array is not recommended. What do you really want to do?

The array itself is not replicated, it's just an RPC parameter. The world actors collected in it however, are replicated.
As to why - I have a validating procedure on client that scans the surrounding actors and runs on tick (only when player toggles said system on). Since it has to be visually fluent and matching Client's FPS I figured I'd run the procedure itself on the client, and only if client decides that they want to perform the final action after being in a valid position I'd send found actors to server to process.

small grail
late violet
# small grail I'm sorry I can't say I understand it totally but how do you get the surrounding...

Yeah, I'm really sorry for being vague ;/ I'm under an NDA and I want to play it safe.

The client gathers the actors procedurally scanning their environment and checking their parameters. Since said actors are replicated their paraments should match the server more or less so I figured it's fine to conduct that kind of check client side. The client collects the actors in an array (non-replicated variable), and if player inputs a confirmation, sends current array over to the server through an RPC as a parameter, with the intention of telling server "perform the action on those actors that I selected". I figured if the actors are replicated, sending references to them over RPCs is safe and their instances will be recognized on both ends, but maybe I'm in the wrong here.

#

It's worth mentioning, this is a first online multiplayer project for me, so it's totally possible I'm doing something horribly wrong here 😄

prisma snow
late violet
chrome bay
#

If they were not replicated, the client would not see them at all (assuming they were spawned by the Server at runtime)

prisma snow
late violet
prisma snow
#

I think that your actors are not properly replicated and the properties on client - server don't match. Pointer replication is not buggy

chrome bay
#

It sounds like you're sending actors which have been spawned client-side, and thus can't be resolved by the Server

prisma snow
late violet
chrome bay
#

Yeah, it would likely just resolve to nullptr.

#

Unless you've forced them to be net addressable somehow, in which case, shennanigans may occur

late violet
#

The other 90% are visible to server but don't match what the client sees.

chrome bay
#

Yeah if they are null, then those actors are client-only and aren't being resolved by the Server

#

So something about the setup seems incorrect

#

You're not spawning actors server AND client side are you?

#

And sending refs to both?

late violet
#

Thank you I'll check the actor generaction 😄

chrome bay
#

Are you using any procedural generation or anything here?

late violet
chrome bay
#

Or otherwise forcing actors to be net-addressable?

#

If for example, you place a "Spawner" in the world, and that "Spawner" actor is not replicated, then server and clients all have authority over it

#

In which case, using HasAuthority() checks would not work as you expect

late violet
chrome bay
#

Yeah I suspect I know what's happening then, actors are being spawned Server + Client side. SOME of the replicated Server ones will have the same FName as ones you spawned client side (purely by fluke), and will replace them when received - the others won't, hence they resolve to null, and all the others are mismatched.

grave widget
#

I have encounterd some similar problems today. I use SpawnActor after OnAbilityAdded. Although I use the hasAuthority check, the Client spawn two actors.

#

Seems like the client has authority to the "primary instance" of an ability?

chrome bay
#

They don't, but if you ASC lives on a non-replicated actor, then the client has authority over it

#

HasAuthority() doesn't necessarily mean you are the Server, it just means the local game instance has "authority" over that actor

late violet
chrome bay
#

Actors placed in levels for example, which are not replicated, will return true for HasAuthority() on the Client

#

If you truly want to prevent code running on a client machine, you can check against NetMode

#

E.g.
bool bIsClient = IsNetMode(NM_Client)

#

RE abilities, it depends on both the replication policy and the instancing policy RE authority

#

If the ability was not granted by the Server and/or it has a "not replicated" policy, it's a client-authoritative ability

grave widget
#

That's weird, I'm pretty sure the ASC is replicated. When I do things after Event OnAbilityAdded, the client has authority to the gameplayability, When I do things fater Event ActivateAbility, client do not have authority to the ability.

chrome bay
#

I can't find an OnAbilityAdded event in the ASC

grave widget
chrome bay
#

Oh in the GA

grave widget
#

ongiveability()

chrome bay
#

Is that OnAbilityAdded your own addition then?

grave widget
#

It's just a K2 blueprintimplement node called by the OnGiveAbility() of gameplayability

chrome bay
#

Are you calling it before or after the Super:: call?

#

Actually, it gets wierd

grave widget
chrome bay
#

Looks like the ability has to actually be activated to get the authority properly:

{
    return HasAuthority(&CurrentActivationInfo);
}```
#

CurrentActivationInfo will just be the "default" if you call it from GiveAbility, that explains it

grave widget
#

oh yes

chrome bay
#

You'd probably have to check the authority of the ASC/Parent Actor if you wanted to check that from On Give Ability

grave widget
#

That was so helpful!

chrome bay
#

I also learned something 😄

prisma snow
# grave widget

wait do you have your profile pick as rider background xD didn't know that was possible

grave widget
#

O(∩_∩)O

quasi tide
#

@hollow eagle I don't know if you were still looking, but maybe the class FNetworkNotify might be handy. Inside NetworkDelegates.h. It's implemented in the UWorld class (how I found it). In there there is a notification that an actor was created.

stoic lake
#

Hi, how does the animBP replicate? does everything happen on the server?

marble fox
#

how can i attach my gun on my fps arms if i am the client but attach it to the "Character" if im not the client (Other player)

grave widget
thin stratus
grave widget
#

You can replicate your own property in your character ,and get it in AnimBP

thin stratus
stoic lake
#

thanks

graceful viper
#

Just so I'm correct you can't make an RPC function that calls on that client AND other clients? (And the server), you need 2 functions if you wanted to do this right?

chrome bay
#

You want a NetMulticast?

#

i.e, all clients and server

graceful viper
#

Yep

#

Is that possible with just one function?

chrome bay
#
void Everyone();```
#

NetMulticasts' execute on all clients and the Server

#

They are only callable from the Server ofc

blazing spruce
#

Hi, hoping someone can help.. i have a actor class called BP_InteractableBase which all my interactable actors derive from, on this class i have an overlap box and a widget component, i had it set up so if you overlap the box it displays the interaction widget and then if you leave it fades the widget back out again. I updated the system to make it so you have to be both overlapping AND looking at the object you want to interact with for it to display the widget and allow interaction however ive done this logic in my character class whereas my interactable base class was handling everything before, so now when i do this code on my character class it isn't replicating properly anymore, the server player sees everything fine but clients don't get the widget displayed, i also need to add a IsLocallyControlled check in here somewhere because rn when the client is overlapping and looking at the object the widget displays for the server player, the interaction widgets should only display for each player overlapping & looking at the object, any ideas how i can amend this to make clients see the same behaviour?

#

Minus the InteractionFadeIn function from the overlap because ive removed that now since its being handled on character

broken shale
#

I've not been able to get seamless server travel to work, is there something I'm missing here

#

I have seamless travel toggled on and a transition map set in maps and modes settings

steady cape
#

Make sure to run game in "Standalone mode"

#

Server travel in PIE is disabled. It even says so in the output log

broken shale
#

The server travel node is called in a function constructed in custom game state which is called by an overlap event in an actor if that makes any difference

broken shale
#

In the editor

steady cape
#

Yes, it isn't

lean sundial
# blazing spruce

in the 2nd picture you are only updating the OverlappingActor array on server, that's why your client doesn't see the effect, you can remove the authority switch on the two overlap event if you are only going to use OverlappingActors array for visuals and UI

blazing spruce
# lean sundial in the 2nd picture you are only updating the `OverlappingActor` array on server,...

Its not just for visuals and ui it determines weather players can interact with an actor or not, but im a little confused cause the 2nd picture is how i had it working (before i did all the stuff on the characters tick) where it was just showing/hiding widgets based on if the player is overlapping the box or not and that worked perfectly fine for both server and clients, before i wanted to change it to make it overlap and facing the object to show widgets instead

lean sundial
lean sundial
blazing spruce
# lean sundial the reason why it worked for you before is because you were executing fade in/ou...

Okay that makes sense, but i still need to keep it where it as all my interaction calls check if the actor interacting is contained in that array which all works fine for everyone, if i disconnect the check to see if the actor is in the array on the characters tick it presents another problem for me because the BP_InteractableBase class has 3 different overlaps on it, one sphere overlap that when inside will display a widget that indicates you can interact with the object and then when you get close enough to it you'll enter the box overlap which is the interaction one, if you're in the box overlap you can interact but because the GetOverlappingActors is searching for BP_InteractionBase it will show the interaction widget when i enter the first sphere overlap, not the box overlap, which is where the check to see if the actor is in the array came from because you only get added into that array when you overlap the box overlap, not the sphere one

#

So it should only show that E Key widget when inside the box

lean sundial
#

so sounds like you just want server to replicate the UI event?

#

if that's what you want you can make the fade in/out event replicated and make them call on owning client, and remove the check for is locally controlled

blazing spruce
#

With the code i have it was working exactly as expected for server, its just the client doesn't see the interaction widget come up for them, but i also need it to only happen for the local player, only the player(s) overlapping should see the interaction widget

#

If i call on owning client is the server player can see them i think

#

ill try it real quick

blazing spruce
lean sundial
blazing spruce
#

So server sees what client should see even tho server isn't in the overlaps

blazing spruce
lean sundial
#

because your intractable objects are all owned by the server

blazing spruce
lean sundial
#

and pawns are owned by their respective player controllers

blazing spruce
#

thats the actor base class atm

lean sundial
#

do the fade in/out in your character bp, like you had in your old screenshot, make those call on owning client

blazing spruce
#

which screenshot? in the character one i was calling it on the interactable base too

lean sundial
#

you can have your interact-able bp call back to the character, but the event that has "call on owning client" has to live in the character bp

#

ah i see

#

you basically need to make an "call on owning client" event on character bp, and in that event do the actual fade

#

then you just need to call that event from the server (so calling it from interactable bp is fine)

blazing spruce
#

like that?

#

cause i only wanna fade in the widget if those conditions are met

lean sundial
#

you don't have to save a ref if you just make your new event take interactable as an argument

blazing spruce
#

Like that?

lean sundial
#

it should work, i think

#

well, maybe not for fade out, so you might have to save a ref for fade out

blazing spruce
# lean sundial it should work, i think

Okay thats verrrry close to working lol problem now is that it shows the widget for the client even if they're not facing the object, so its as if its ignoring the DotProductThreshold but still going true?

#

If the left player looked slightly more to the left the E key would show which is correct behaviour

#

Client shouldn't see it unless they're facing it

lean sundial
#

that might be something else, you can try to draw debug line to see if the server sees something not expected with the dot product vector

blazing spruce
lean sundial
blazing spruce
lean sundial
ruby lodge
#

how can i fix the 9999 ping issue?

#

i did only find c++ solutions but i am only using bp

#

and even the c++ ones were really long and complex

dreamy scarab
#

@void pebblespctrum any chance you could help me get it working I can't figure it out

graceful flame
unique cloak
#

hi
I have a question
how the blue guy can see the red guys names if the blue one doesnt overlap with them?

#

They can overlap only if the boolean is true and its not replicated

kindred widget
unique cloak
#

oh and I dont remember why I made this PlayerNameString, but just ignore it, its not important for now

kindred widget
#

There's not enough info here. You have random blocks of code from different places with no connection between them.

unique cloak
#

wdym?

#

I showed the booleans

#

and where I set them

kindred widget
#

And not a single place where you use them.

kindred widget
#

bShowPlayerName is not bShowName.

#

What is ShowPlayerName?

#

How does that end up at this widget's function?

unique cloak
unique cloak
#

and

#

it calls it

kindred widget
#

Does it work correctly if you overlap once and then back away?

unique cloak
#

How can a player that didnt overlap with the box collision have this boolean being true?

unique cloak
#

the blue guy can see it

kindred widget
#

Boolean may not be the problem if you didn't set all of the other state for the widget to be invisible.

#

Also you're setting that from any overlap.

unique cloak
#

I set it to an empty string

kindred widget
#

Are you calling this at beginplay?

unique cloak
#

nope

unique cloak
#

only on these 2 places

ruby lodge
kindred widget
kindred widget
# unique cloak only on these 2 places

Needs to be checked at beginplay too. And also like I said you're calling that from any overlap. If any pawn overlaps any other pawn it will tell it to show the name. So the other red pawn could be triggering this for the blue pawn's screen.

unique cloak
#

how?

#

and why does it need to be on begin play?

kindred widget
#

Initial state is important.

ruby lodge
unique cloak
kindred widget
#

And for the how. Movements and overlaps are locally simulated on all characters on all clients. If red2 wanders close to red1 and overlaps him. That event will run for the version of Red2 and Red1 on all clients.

unique cloak
#

oh

#

so its like replicated automatically?

rain dome
#

its not technically replication, because if someone desyncs, it might call for them but not on the server

unique cloak
#

so its replication between clients or something?

rain dome
#

its simulation

#

each client is running the code independent of the eachother and of the server

#

because of Unreal's built in movement replication, they tend to sync up, but they arent technically replicated themselves

unique cloak
#

well I didnt know that

rain dome
#

but lag and packet loss can cause them to be slightly different

unique cloak
#

hmm

kindred widget
ruby lodge
#

so i need to go into the advanced steam session c++ script and change it there?

#

Idk mate, i don't usually like to mess with these things lol. I am using bp only

kindred widget
#

If you're using Advanced Steam Sessions plugin. I think they have a thing that you can get all of the extra options.

unique cloak
#

hey so what can I do to fix this simulation

#

?

kindred widget
#

Ditch widget components and extra collision volumes. Don't make gameplay classes care about displaying UI. Make a canvas that can paint or add children to it that can display names of nearby pawns.

unique cloak
#

is there a simpler way?

kindred widget
#

That is the simple way. The way you're doing it now is the difficult one.

unique cloak
#

I have no idea how to do what you said and I dont want to go very deep to that

kindred widget
#

My method proposes one or two classes. One of which is just a widget you throw on screen and forget about. Needs no extra coding, volumes, etc.

#

You want to maintain complex states, manage collision volumes, widget components, widgets in widget components, etc.

unique cloak
#

I dont get it

kindred widget
#

This is why programmers hate UI most of the time. 😦

unique cloak
#

yeah I can relate to that so much right now

#

lol

#

Im still not sure what is your method though and how can I implement it

clear island
#

if I have a pointer to an actor that is now out of net relevance, how can I detect that? I tried checking for nullptr and checking with IsValid() but it still goes through and crashes the game

fossil spoke
#

An Actor on a Client going out of NetRelevancy will simply be destroyed

#

There is no special code that runs for this

#

It just has Destroy() called on it

clear island
#

outer:

#

that code runs inside a component that belongs to a vehicle that I suspect was destroyed on the client because of net relevance

#

should I just do IsValid(this) ? or IsValid(GetOwner()) ? before doing that loop?

#

I have other similiar issues in other parts of the code not even related to that where I'm using ActorHasTag() (instead of this case where Im using ComponentHasTag) and it also crashes in the same manner

icy jetty
#

If the actor’s destroyed it prly doesn’t matter which one you do the valid check on, I would imagine

#

As long as you do it on one of them that is

clear island
#

I believe thats whats happening because I see no other scenario

#

is it even possible for an Actor to be destroyed first and then later is destroys the actor's components?

icy jetty
#

Well

#

The thing is

clear island
#

maybe IsValid(GetOwner()) is what I need

icy jetty
#

When you destroy something it doesn’t do it instantly

#

It just schedules it for deletion

#

And then it gets garbage collected later

#

Afaik

#

Hence the need for isValid checks

#

And why code can still run on it for a bit

clear island
#

yea but with so many IsValid Checks I added, how is still getting through?

#

well on that case theres only 1 but also a null check

#

maybe its because that FName variable I'm creating? maybe I should make it a constant although I dont really see how that can cause it

#

I'm also noticing theres other IsValid functions

#

IsValidLowLevel

#

am I just using the wrong one or what?

icy jetty
#

I doubt it, but I’d maybe put the code in #cpp

#

See if they can spot it

clear island
#

yea I was thinking about that too

#

maybe its more cpp related and I'm just assuming it net relevance

ruby lodge
ruby lodge
woven bramble
#

There is a Trigger Box in the Level (for multiplayer game).

What I want is for the OnActorBeginOverlap operation to work only for the person entering that box. But this works for all players.

Can anyone help? (RunOwningClient didn’t work)

fathom aspen
#

I assume 0_Base1 is a Pawn?

#

Anyways OtherActor -> Instigator -> IsLocallyControlled

#

And just in case, multiplayer tips and tricks article from pins already covers that

#

"Filtering execution paths based on Owning Client" section

uncut schooner
#

@fathom aspen , I see you wrote the network compendium for persistent-data,
Do I need C++ for this,
I basically just want the listen server player and clients to pick a character class and when they hit the new map a system will spawn whatever they chose

fathom aspen
#

Nope, not necessarily, if that's what worries you

uncut schooner
#

Oki doki

uncut schooner
#

I've tried a save game

#

But when the client travels it seems not to have data for them

fathom aspen
#

I mean I literally wrote it so I don't have to go into specifics ^^

#

There are other methods

#

You are in a learning phase from what I assume

#

Get the time to learn

uncut schooner
#

Sure

fathom aspen
#

My advice would be to "take your time to learn/practice how to do things right, rather than asking others to do your homework"

#

You will adore it at the long term

dark parcel
fierce fiber
#

Hey all, Im trying to attach a weapon to the player model using attach actor to component. The pickup works but the model doesn't show on the player model in the other players view

#

If anyone has any ideas Id be extremely grateful! Still trying to get a grasp on replication

sinful tree
#

Are you sure the Rifle reference is valid when it is reaching the server and the multicast?

fierce fiber
#

I believe so, let me do a print string to triple check

#

Oh yeah, for some reason it's not valid?

#

Thats interesting

#

This is the line trace code if that helps

sinful tree
#

It's probably in how your reference is obtained as it appears to be happening on the client.

fierce fiber
#

Im attempting it through a line trace by channel

#

Unless the "current weapon attached" var needs to be replicated?

sinful tree
#

How is the object itself being spawned?

fierce fiber
#

Just placed into the world

sinful tree
#

And it's an actor that is marked as replicated?

fierce fiber
#

On class defaults of the actor "replicated" is ticked if thats what you mean?

#

This is the error Im getting if that helps

sinful tree
#

Yep.
Are you doing anything else with the "Hit Actor" reference before it goes into the cast?

fierce fiber
#

Just this, it seems to be doing everything in this string, such as deleting the actor when its been hit, and applying the weapon to my FPS view, but it skips the attach actor node

icy jetty
fierce fiber
#

Gonna paste a couple of images in here

#

This is the custom event to destroy an actor

#

This is the custom event with the actor plugged into it

sinful tree
# fierce fiber This is the custom event to destroy an actor

I'd change up your logic.

  1. You shouldn't allow clients to randomly call an event that allows them to destroy an actor by reference without some kind of control by the server - that opens the flood gates for players to be able to delete basically any actor in the game. Like, you could have PickupItem_Server which can lead to a Destroy Actor, but you should never have something like DestroyActor_Server and allow clients to call it whenever.
  2. Replicated actors do not need to be destroyed on all instances, only on the server. Any replicated actors destroyed on the server will be destroyed on clients.
  3. Your interaction logic should likely happen on the server so it can validate what it is you're trying to do, again otherwise you're opening the flood gates for players to basically do whatever it is they want to do with actors. So you can still do a line trace to the actor on the client, and then send over the actor that you want to interact with to the server, then the server should check if you're at least close enough to the actor to interact with it, and if so, then you let the server figure out what needs to happen with that interaction and set values to replicate out to clients. You likely do not want to use RPCs to attach an actor, I believe you can do this just on the server and it'll propagate to the clients automatically.

You do not need to multicast everything. Stateful things should be handled through replicated variables. Multicasts are usually only useful for playing sound effects or displaying visuals.

As for your issue and what NeoExcidious I think was alluding to, is this Destroy Actor" call you have here connected through these lines?

fierce fiber
#

Yeah the destroy actor is connected through those lines, also thank you so much for the boatload of information!

#

: D

icy jetty
#

But then I would expect to see a "pending kill" error

sinful tree
fierce fiber
#

I see, I shouldn't be destroying the actor because its meant to attach onto the player, ok that was just me being blunderful at 2am, so now Im wondering why it isn't showing on the player or attaching to the player, Im assuming multicast means that I want all players to see the action happen and not just the owning client, so this confuses me as to why the actor won't attach

#

Oh thats interesting, it is attaching, but very far away

icy jetty
#

if it's going to 0,0,0 something is going wrong during the attach

fierce fiber
#

On the attach actor I did snap to target and it seems to work just fine, just now need to figure out how to hide it to the player its attaching to then Im good to go haha

#

Also, thank you, both of you for the help, I understand that its probably a pain helping a newbie to the multiplayer scene

icy jetty
#

and like Datura said Multicast is prly not what you want to use here. I find it to be a very deceiving feature of UE, because it makes you think oh easy I just do Multicast, when in fact you should just be using replication

woeful anvil
#

Anyone able to get World Partition to work with ReplicationGraph or is it Iris only?

grave widget
#

Hey guys. I want to make a beam weapon in multiplayer games recently. Of course , I can not replicate the local target data every tick , but I also want the beam line move as smooth as it can be on server and other clients. Is there any elegant method besides just shorten the TargetData replication frequency?

naive bloom
#

alright so i finally packaged my game and sent it to my friend through a google drive, however we couldn't find each others session (in unreal editor i have a whole system for hosting and joining games that work when i run two instances in stand alone) Are we not able to find eachother becasue i havent looked into subsystems yet? or do i not need that yet since i dont have it published to any platform?

pseudo wagon
#

Get your IP on the internet and send to your friend.

plucky prawn
#

Or use a vpn which is at least 1000000x safer, or use a third party thing like steam to handle your lobbies

cold moat
#

guys, I'm a bit clueless on a situation, I want my game to have movement forwards to the camera rotation, but how would I make a good system so the player can't cheat changing camera position client side? having the camera location on the server?

fossil spoke
#

In that you only send a Hit to the Server if it maintains its damageable target for a few seconds.

#

The Unreal Tournament project on github has a weapon like this from memory

#

Might be worth you taking a look how they do it

grave widget
#

That is a pretty nice but more complex method. I will search for it .Thank you

#

Hmm, I think I was already use it , just replace the instant GE with a period GE. What I really want is how to make the visual effect(Niagara System) move more smooth with discontinuous Hit data. Now I just use Vinterp to interp current TraceEnd vector to the Desired TraceEnd. But it is a little bit lagging.

rancid stratus
#

If I swap between maps that have the same game state, it is the game state that will be destroyed?

#

And is it the same for player state?

grave widget
#

If you use seamless travel Gamestate will persist by default.

unkempt tiger
#

Should my player controllers distinguish between 'possessed' characters to 'viewed' characters to support spectating?

#

Say, when the controller's view target is some pawn, and assuming it wants to load some HUD widgets which should be visible and functional for spectators as well

#

And if so, what's a good way of doing that?

#

I thought about instead of maintaining a reference to 'controlled' pawns, instead maintain a reference to the view target, with an additional boolean function 'is also possessing viewed pawn'

#

but this approach feels a bit questionable

blazing thicket
#

Hi guys! I have a question about character spawning. I'm working with a dedicated server. On the client side, locally, I have a character class selection. After the player makes his choice the character class variable is written to the Save Game, then when the player connects to the session I take the saved character class variable and through the playercontroller I call the character spawn function. The spawn function itself is created in GameMode.

So, when I connect to the server in the logs I see that the variable character class comes to the playercontroller, but the character does not spawn.

I have for quite some time can not figure out what the reason and ask for advice. Maybe the solution could be simple, but since I've been trying to solve this for a long time I just can't see it.

pliant moss
#

I am currently working on a game that features a vast open world with multiple discrete regions, each managed by its own server. The world is loaded client-side, and I am interested in exploring whether Unreal Engine 5 can support seamless server transitions without forcing the client to reload the entire map.

In other words, can a client, after having loaded a world locally, connect to a different server and synchronize with the server’s state of the world, without having to reload the entire map? Essentially, I’d like the server to take over seamlessly from the client’s existing state.

I understand that Unreal Engine traditionally handles server connections and map loading as a linked process, but I’m curious if there’s a way to manage and synchronize states of individual actors between the client’s world and the server’s world separately, outside of the standard map loading process.

Has anyone tried something similar, or can anyone provide guidance on potential approaches to handle this in Unreal Engine 5?

fathom aspen
#

I mean looking at the code, I can pretty much tell that you are lacking basic multiplayer knowledge

#

Have you looked at this channel pins?

#

Have you read the pinned multiplayer compendium? @blazing thicket

fathom aspen
fathom aspen
fathom aspen
#

Persistent data compendium awaits you in CheckThePins

woven bramble
#

Thank you, it worked 🙂

unique cloak
stoic lake
#

Hi there, I'm trying to set some replicated variables on the server, and then get them on the client however the variable doesn't seem to sync. This happens on an Actor component. Why could this be?

#

fixing this would prevent me from having to set a dozen reliable multicasts on tick 😂

fathom aspen
#

I mean nothing so exceptional about it. Make sure the ActorComponent is replicated and the owning Actor for that component is replicating as well.

cold moat
#

Is the built-in actor damage system replicated by default?

stoic lake
#

Is there a way to check ping?

chrome bay
cold moat
# chrome bay no, there's nothing to replicate really

But the On Take Any Damage event for example, it is not replicated? 🤔 I was reading here meanwhile, the built-in damage system is more of a bunch of functions that return new amounts, right? But there is some events there as well.

ruby lodge
kindred widget
#

Yeah, it's a steam issue with SteamSockets. They stuff the ping in the session arguments for some reason. 🤷‍♂️

ruby lodge
#

there are thousands of mulitplayer games running on steam and made with unreal engine that have this fixed

#

HOW

kindred widget
#

Getting it out of the session arguments?

ruby lodge
#

yea but how

kindred widget
#

Are you using AdvancedSteamSessions?

ruby lodge
#

yes

ruby lodge
#

that's how i handle it so far

kindred widget
#

Yeah. Advanced sessions has a GetExtraArguments or something.

ruby lodge
#

this ?

ruby lodge
#

how do i get the information out of it that i need, because its output is basically the same as the results output of the find sessions advanced node

kindred widget
#

I don't have a project to test that on. But you put your session result into that. And then need to iterate over the settings to find the one for ping.

ruby lodge
#

i can't split the structure pin of server info

kindred widget
#

No. GetExtraSettings

#

It takes the ServerInfo and gets it's settings out of it.

ruby lodge
kindred widget
#

ExtraSettings is a list of settings that relate to the session info. GetExtraSettings gets those for you as an array. You need to ForLoop over the ExtraSettings returned form that and find the one with the name that matches "P2PPING" I think.

ruby lodge
#

and also not convert it to string

#

or text

stoic lake
#

how would I get this in multiplayer?

winged badger
#

you get a local controller then camera mamager from it

#

the GetXXX[Index] can bite you in the arse in MP

kindred widget
ruby lodge
fathom aspen
#

But ping changes, you are doing this on construct...

ruby lodge
dusty spruce
#

Hey guys, Im making a little game that requires multiplayer. I am using UE5.1, could anyone recommend dedicated server hosting methods for my condition. Thanks in advance

kindred widget
glass vector
#

how do you get the player state of a controlled pawn, given a controlled pawn as a reference

#

like you can get all player states from the game state, but is there a way of getting the player state of a pawn, given that you only have a ref to the pawn?

#

especially when you are calling from a client, where you don't have references to the other player controllers

ruby lodge
#

we need to find the exact settings name

#

i tried PING, PINGINMS also

ruby lodge
#

i.e. before the session is even created

#

here in extra settings

kindred widget
#

The code seems to imply that it inputs that automatically from the steam subsystem. I don't know if AdvancedSessions does something else.

graceful flame
#

What can be done to reduce input lag for character movement component jumping? I’ve got a customized CMC using saved moves for dashing and it works great but when I tried to setup a custom flag for jumping it didn’t seem to change anything.

#

When testing with average lag setting the jumps are sometimes delayed or skipped.

ruby lodge
blazing thicket
fathom aspen
#

Here

#

And go over the other pinned messages, familiarize yourself with them

blazing thicket
graceful flame
#

Jump is part of default movement component and has built in prediction but why is it so awful for input lag? When simulating using average profile. I don’t get it.

#

My other character using custom movement component has auto bunny hopping so it’s a non issue but my primary base character class doesn’t have auto jump but instead uses the default jump but it performs so poorly. What can be done?

clear island
#

is the actor PivotOffset replicated?

latent heart
#

The pivot offset is editor only I think.

#

And probably not replicated.

clear island
#

I was just thinking when I attach this actor to another, that pivot offset will be take into account I believe

#

just wondering if I change it on the server, when I attach it to a player for example, will it be attached at the same location on the clients

#

ok yea you're right

#

its editor only

latent heart
#

The pivot offset isn't used at all, I think, for attachment.

clear island
#

I just saw the comment

latent heart
#

It's just for rotating an actor that isn't attached to anything.

clear island
#

I see

latent heart
#

Your best bet is to add a parent actor to use as the pivot.

clear island
#

well I guess I can just adjust the socket position

clear island
#

whats the best way to know on the server, when the client player controller is ready? do I have no other way than to send a server RPC from the client?

lost inlet
#

Define "ready"

#

And why the server needs to know about this ready state

clear island
clear island
lost inlet
#

Well I'd use the game state for that, but I would expect this to work as soon as the actor has begun play

clear island
#

thats why I was doing it on the player controller

lost inlet
#

I'm not sure what I'd expect to do with this project specific information

#

On a client, in BeginPlay, it can be assumed that the game state is known

clear island
lost inlet
#

Any actor that exists in the world

#

There's a bunch of code for this guarantee in AGameStateBase

clear island
#

so when any BeginPlay is called, GameState is guaranteed to be ready and initialized

quasi tide
#

There's a function, in GameMode, that tells you when the client's PC is ready to receive RPCs

clear island
#

is it InitNewPlayer ?

quasi tide
#

I don't remember. But if you hover over it in BP, it'll say that something like, "this is the first place it is safe to RPC to the controller" or something like that

clear island
#

PostLogin

#

thanks

marble fox
#

Anyone who can help me fix the FX?

sinful tree
#

You're multicasting correctly, I think the problem is you're referencing the same gun on both players instead of spawning a separate one for each before setting it in the "Equipped Weapon" variable.

clear island
#

TIL RPCs can be received before BeginPlay is called

marble fox
lost inlet
marble fox
clear island
#

seems like sending a client RPC to a controller on PostLogin is indeed "safe" but it can reach the controller when the controller is not fully initialized yet (BeginPlay wasn't called)

marble fox
quasi tide
#

If you specifically need it to be called after BeginPlay - do a server rpc to let the server know that BeginPlay has been called on the client

clear island
marble fox
#

eyy i fixed it

sinful tree
# marble fox
  1. Is this "Interact" happening on the server? If not, the the value isn't really being replicated, it'd only be set on the local client.
  2. You're doing a "Get Actor of Class" which always gets the first one that the game can find in the game, so it definitely is referencing the same one.
  3. You do spawn another one and attach it to the player - that should likely be happening on the server, and then you'd set the return value from that as the equipped weapon.
marble fox
#

so SpawnActor -> Return value = Variable, Set that return value as equipped weapon and now it works

woven basin
clear island
#

then when BeginPlay is called, I use it

pallid mesa
dusty spruce
#

Hey quick question, Im trying to make a game that involves multiplayer and dedicated servers, any way to set this up in UE5.1. Thanks in advance cheers 😄

thin stratus
#

Same way you set it up in mostly any other version

#

Also why not jump to 5.2?

woven basin
#

How do I handle server/travel disconnects in C++? I've found HandleTravelError, but that is a blueprint implementable only function.

Surely there is a way to handle an error and then grab the error to display on the UI etc?

kindred widget
#

It's almost like UI was meant to be handled in the scripting language.

woven basin
#

but failing that, I'll go about it another way using BP. Just looking for a C++ option for reference.

fathom aspen
fathom aspen
#

sigh, thought you were trynna steal it 🥷

hushed anvil
#

Hey guys, I'm trying to make a simple multiplayer project using a Dedicated Server, and I want to simply run an instance of the Server on an AWS instance, the server works on AWS, but for some reason I can't join it through my computer. Are there any requirements for me to set up? Thanks in advance 🙏

subtle peak
#

Hey why is this cast always failing on the client? Is there another way of getting the player state in a widget?

short arrow
subtle peak
mystic estuary
#

Hello, I'm trying to create a character selection menu, where player basically selects the character prior to join a session. The problem that I have is to how can I pass the selected character to a server it connects to? I guess it should be the player controller, but if I naively assign the character class to a field in PC, and then join a session, it'll be nullptr on the server.

Any advice on how to do it?

quasi tide
#

You can store their selection in the client's GameInstance. Then in something like AcknowledgePossession, do a rpc to the server and let the server know what character you selected

mystic estuary
#

Where is the AcknowledgePossession though?

quasi tide
#

PlayerController

mystic estuary
#

All right, thanks

pliant moss
#

Hi everyone, I'm transitioning from a single-player game to a multiplayer server in Unreal. The server uses the same assets as the single-player level. Will these assets stay in memory when connecting to the server, or will they be unloaded and then reloaded? My concern is to minimize load times during the transition. Any insights would be appreciated. Thanks!

mystic estuary
quasi tide
#

Yeah - and that should always be happening

#

By default, the GM will create a generic Pawn class.

#

You have to go out of your way to set that to none.

mystic estuary
mystic estuary
quasi tide
#

Then spawn one. And when they actually spawn in, create the one that you actually care about

#

Or find some other way

#

PostLogin, server does a client RPC to ask for what character they wanted. Client does a server RPC to tell them the character.

#

As an example

#

Or pass in options when connecting.

mystic estuary
#

So, if I store the character class on client's game instance, would I be able to get it in client RPC from PostLogin?

quasi tide
#

The client RPC is just an RPC from the server to the client

#

There is no reason you couldn't.

#

Because in the client RPC, you would get the character from the GI and then do a server RPC with that info

mystic estuary
#

I'm actually not sure how game instance works in networking. Does every user have an own one that doesn't replicate it by default, so that would be the place to store data I want to keep through several worlds on client side?

quasi tide
#

Each client has their own. It is not networked.

#

It persists throughout the entire lifetime of the application

mystic estuary
quasi tide
#

Every instance of the game has their own.

mystic estuary
#

All right, thank you

#

I'll try to achieve my goal using the RPC's

wintry forge
upbeat basin
#

Is.. HasAuthority check hackable?

wintry forge
kindred widget
kindred widget
#

Shouldn't matter though. At most it should put the hacker in a state of desync and mess up his gameplay. No one else would notice it.

kindred widget
# wintry forge I made a movement by applying add force with the tick, but the client is shaking...

Complicated question. Simple answer, give the client authority. Move the actor on the client and sent it's new location to server to be replicated, skipping owner. Cheatable though. You could emulate the CMC and locally simulate the client's inputs while sending them to server and just jump them back when too far out of sync. Bunch of work though.

Even simpler answer, make use of the CMC's flying mode. It has a lot of friction, braking settings and it already works for network. And the work you'll be doing to make it work will end up close to the CMCs code anyhow. Saved effort.

wintry forge
#

Thank you for answer, what is CMC?

#

"Character Movement Component" i understand thx

#

i can't see it

kindred widget
#

Your Pawn would need to be a Character class type.

wintry forge
#

like this

kindred widget
#

Yeah.

wintry forge
#

In my own system, I took the actor transform on the server and did a client set actor transform, but it still shaking.

kindred widget
#

It will always shake unless you let client locally simulate it. Server does not send enough updates fast enough to keep up with 60+ framerates. Even more true on servers limited to 10-20fps in case of some dedicated servers. But I think your issue is that it's fighting itself. Plus these RPCs are incorrect. You're setting a replicated state and then sending an RPC. Chances are the RPC will reach the client before the new transform does. Anything that needs to be updated from the replicated variable should be done via a RepNotify.

pliant moss
wintry forge
#

Thank you for telling the problem here, I can do more precisely, but I still can't fix the flickering on my own system :/

#

All I want is the client not to shake like in the video

#

why this is not working on client

kindred widget
kindred widget
# wintry forge Thank you for telling the problem here, I can do more precisely, but I still can...

If you don't care about cheating right now. Let the client do the simulating. Let them add force and do their own thing. Each tick RPC their transform to server and let server set that in a RepNotify variable that is SkipOwner. In the RepNotify function, set the actor's location and rotation using that. It'll look a little jumpy on other clients. But the client piloting will look smooth. Later you can interpolate the new position on other client's tick function, etc etc.

pliant moss
jaunty panther
#

Im trying to use lanch character multiple times fairly rapidly, and SP it works fine, but when i add a second person on listen server net mode it crashes when applying the second one while being impulsed as the main client/server. The secondary client wolnt move at all when the impulse is supposed to be applied.

jaunty panther
#

I partially figured it out, its my custom event causing the problem... I still dont know how to replicate and spawn the stuff properly though.

jaunty panther
lunar radish
#

This may be like the noobiest thing to ask, but... What are some examples of things that would need to be set up for multiplayer. I know somethings dont and somethings do, but other than that, I am at a loss. I assume that any actions of a character would have to be, but what are some others?

naive bloom
lunar radish
#

An open world rpg with rideable dragons

naive bloom
cold moat
#

anyone knows a way to put on rep functions inside categories? I would pay for it

#

the pay for it part is a joke btw

lunar radish
naive bloom
lunar radish
#

I will look into it! Thank you!

queen escarp
#

i mean i have 100 hp and i should take 20 damage = 80 but i have 100 and takes 20 + 20 = 60 then gains 20 so = 80

#

super weird

pliant moss
queen escarp
#

@pliant mosswell this was more of a multiplayer bugg really but 😛

pliant moss
queen escarp
#

aye gotcha

#

but i dont wanna use someoneelse system x)

#

whats the point in that .p

#

whers the "fun" in that

pliant moss
#

Well its kind of built in the engine 🙂

queen escarp
#

oh x)

pliant moss
#

Anyways, it was just a suggestion. but ofc. if you want to built the system yourself, you can totally do that.

broken shale
#

I've been trying a number of different iterations and haven't gotten the server travel to work right... here, I've got an overlap actor that triggers the following off of the authority branch (and nothing on the remote branch). The player who triggers the overlap loads into the next level fine but the other player appears to have spawned off the map and is completely frozen

#

Previously I had the authority branch calling open level and server travel and I had the remote branch calling open level and server travel through an on server custom event

sinful tree
#

The overlap itself should be getting triggered on the server if it is a server spawned or a placed actor, in which case, all that should be required is a Has Authority node using the "Authority" path and connecting that into the cast and server travel node you have displayed. No RPC needed.

broken shale
#

Thats the entirety of it

limpid parcel
#

rn im tryign to learn replication and for that im trying to create a sphere that on any collision, changes to a random material from 6 materials given, the issue i have is that it only changes on the server and not on any client, here's the header/cpp file (header file top, cpp file bottom): https://pastebin.com/2n0hDbyD

broken shale
#

This is specifically what happens... in the smaller window you can see the second player sort of begins loading the level and then it just freezes with it partially loaded. The lager window behind it is from the first player who made the transition successfully

limpid parcel
sinful tree
# limpid parcel rn im tryign to learn replication and for that im trying to create a sphere that...

On_Reps are meant to be used when a variable is changed and it gets called when a new value is received on a client (so yea, if you want the server to also call it, you'd have to do so manually in C++) but right now you don't have any variable that is driving that OnRep. You would also want the server to be setting the value of that variable so that everyone receives the same value.

You currently have this line in your .h:

int32 tick;

This should read more like:

UPROPERTY(ReplicatedUsing=OnRep_ChangeMaterial)
int32 ChangeMaterial;

This sets up the variable to call the defined function on clients when they receive a new value.

Everything else that follows is in the .cpp file. You have the following code:

void AColorCube::OnOverlap(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult)
{
    if((OtherActor) && (GetLocalRole() == ROLE_Authority))
    {
        OnRep_ChangeMaterial();
    }
}

Immediately above the OnRep_ChangeMaterial() line (very important that it is above) do the following, which will then set the value of this variable on the server.

ChangeMaterial = FMath::RandRange(1, 6);

Within the OnRep_ChangeMaterial() function, replace all references to "tick" and change it to "ChangeMaterial" and remove this line entirely as we've moved what this is doing into the Overlap.

tick = FMath::RandRange(1, 6);

Finally, you need to update the GetLifetimeReplicatedProps function to include this:

DOREPLIFETIME_CONDITION_NOTIFY(AColorCube, ChangeMaterial, COND_None, REPNOTIFY_Always);

This does some additional set up in regards to how the replication happens. (Namely, setting it up as a Notify, No special replication condition, and Always call the RepNotify, even if the value stays the same)

#

So now, when you change the "ChangeMaterial" variable on the server, it'll be replicated out to clients, and when the clients receive the update, they'll automatically call the OnRep function associated to that variable, and based on your code, set the material based on the replicated value that was received that is now stored in the ChangeMaterial variable.

limpid parcel
#

oooo i didn't know about hte DOREPLIFETIME_CONDITION_NOTIFY thank you so mjuch and it does work now

stoic acorn
#

I'm trying to spawn connected players from one (of two) teams to a specific set of player starts that have Tags. e.g. PlayerStart1, 2, and 3 for TeamA
In the GameMode 'On event OnPostLogin' I'm creating an array of each group of PlayerStarts then attempting to Spawn Players.

The problem is that when I listen to what goes into the array it doesn't match the PlayerStart names and returns something like. PlayerStart2_13, so when the player is spawned they're somewhere else in the void and fall to infinity

Anyone have any idea why this might be happening?

limpid parcel
sinful tree
#

Not sure about that. It's a macro that is needed in order to facilitate OnRep variables. You can change the replication condition and the repnotify condition which are both enumerators. The "REPNOTIFY_Always" can either be that or "REPNOTIFY_Changed" which changes the behavior to always calling the OnRep whenever the variable is set even if it doesn't change, or only when the value changes.

The replication condition has several values. Some are listed on this site as to what they mean:
https://docs.unrealengine.com/4.27/en-US/InteractiveExperiences/Networking/Actors/Properties/Conditions/

hushed anvil
woven bramble
#

Hello. I can Multicast a function with RPC and display it on all clients. But what I want is for other Clients except me, how can I do that?

So this process should be Replicate for other Clients, not Replicate for me.

sinful tree
#

Alternatively, if you're using a variable with an OnRep you can set its replication condition to Skip_Owner which should mean the variable will only replicate to clients other than the owner of the pawn/character.

woven bramble
#

The IsLocallyControlled Branch didn't work.

woven bramble
#

There is a process where I Multicast after RunOnServer. This Multicast connected with the Set Actor Rotation.
I want the person playing the game not to be Replicated, but for other users to see it as Replicated.

Also, If Has Authority didn't work.

sinful tree
# woven bramble How can I do this?

Create a variable, mark it s Rep w/ Notify. Set replication condition to Skip_Owner.
RPC to server the value you want to send to others, server sets the variable.
There will be a generated OnRep function - in this function you would do your Set Actor Rotation using the variable you created.

woven bramble
sinful tree
#

In that function you do the set rotation and use the variable value.

woven bramble
#

It didn't work :/

#

btw yes, it's pawn/character

broken shale
sinful tree
#

That's the value you're reading from that you're sending out.

#

Also, are you sure the RPC is being triggered?

sinful tree
broken shale
#

And the other player is able to fly for some reason, at least when testing it with keyboard instead of in VR (but the flying doesn't occur on the first level)

sinful tree
# broken shale I've currently got it set to just run as a command console execute (but have als...

I'm no expert on server travelling - my main bit of being able to help was with how you're getting to the point of calling ServerTravel. As long as you're sure it's called on the server, which you are since you're using the Authority path on an overlap event, then it'll be getting called. The other bit was the "Absolute" option which you shouldn't have enabled if you want your clients to come along. Everything else beyond that I wouldn't be able to help with, sorry. 😦

broken shale
#

Thanks for trying!

#

Appreciate it and all your prior advice

ancient adder
#

How does the basic jump/add movement in the pawn work? looking at the code i can't tell how they're replicating it

sinful tree
ancient adder
#

I also looked there, no obvious replication or rpc

woven bramble
sinful tree
# ancient adder I also looked there, no obvious replication or rpc

It's not obvious at all, but that's where it is handled. The CMC sends saved moves to the server, this allows the client to move predictively, and the server attempts to play back whatever the client was doing, and if the server is ok with it, it doesn't send corrections. If the server couldn't play it back the same way, it corrects the player to where it thinks it should be.

ancient adder
#

Aha i thought its as simple as RPC or replicated variable, Thanks

broken shale
# sinful tree I'm no expert on server travelling - my main bit of being able to help was with ...

Well FYI I'm a little closer to figuring it out. The Default Player Pawn is set to none in maps and modes (which I think is because the VRE template I've built off of is set to be able to swap between flatscreen and VR). When I set default pawn to something it fixes the problem with the client player freezing up on the second level. Still not quite working but at least know where I probably need to look

icy jetty
#

It should never be set to none anyway

mellow stag
#

what is causing this issue im using dedicated server on steam with steamsocket netdriver

#

Assertion failed: MappedClientConnections.Remove(ConstAddrRef) == 1

#

dedicated server randomly crashes

winged badger
#

callstack?

timber frigate
#

Hey guys how can I make a tagging system where one person is a tagger and the other person is a runner. When u get tagged, you die and the roles are switched. As the tagger u have to be looking at the runner and be super close to them before pressing the left mouse button to tag them and kill them. How can I use blueprints to detect if a player should get tagged and make the roles?

broken shale
icy jetty
#

Do you have your own camera pawn you can set it to?

#

Idk much about vr tbh, I just figure you’re going to have issues if there’s no pawn possessed at runtime but I could be wrong

timber frigate
#

I have my own first person character and camera. Someone suggested doing a hit box for the player and seeing if the other player collides with it and presses left mouse click. Idk how to do that in blueprints tho

#

Idk if u were responding to me or not still lol

limpid parcel
#

What does the FORCEINLINE macro do, and where can I find out about more macros like it?

thin stratus
#

That's more #cpp than multiplayer

icy jetty
#

It’s a bit more work than that in multiplayer, but that’s a start

limpid parcel
#

Where can I learn about more of the Conditional Property Replication macros and when to use them?

#

I can find them through the source code but I'll still be confused on how it exactly works, like this one

upbeat basin
#

Be less safer than this? Or is it just overkill? Or is it depends to the design (rather than safety) to split the event to server and client or not?

#

I'm considering the above safer because RPC calls should prevent a client calling server or mc event

small grail
#

But as long as you are using on server means calling server from a client...

sinful tree
upbeat basin
#

I see, thanks for the opinions

fierce fiber
#

Anyone know any good tutorials on steam multiplayer lobby system going into a game? Im making a team deathmatch based MP shooter

fierce fiber
#

Like a party system I mean, similar to fortnite I guess? But in a team deathmatch scenario

#

Cant find any tutorials for beginners, if anyone has anything that could help Id be greatful

small grail
#

So it means you will have a server to put your all player accounts data there and use http websocket to get it? Or just a simple lobby with your characters in and the data are all saved local.

glass vector
#

Does client authoritative movement work for pawns a client has ownership over (but not possessing it)?

#

Like if I own a pawn which is a car, but I'm not possessing it, does the client authoritative movement still work for the car?

chrome bay
#

Depends entirely on how your networking is setup

#

Whether something is client-authoritative or not depends on the networking code you added to control movement

#

A client can SEND an RPC for an actor which is not "possessed", if that was the concern

queen escarp
#

question im casting to the palyers BP by reffering to the actor but its casting to all those clients conencted aswell

#

how can i single down to a specific player bp?

small grail
queen escarp
#

yeah

small grail
queen escarp
#

oh right so the one that im casting to is reffered by a "actor object"

#

and it runs correctly but i get loads of error since im guessing it runs on all clients (remote) but just not affecting them

small grail
queen escarp
#

well ok so bascily this is for when im killing an "enemy" then it runs a code wich should give the "damage causer" exp/gold" wich runs correclty but im getting erros and i guess those are from the other clients

#

i can show u more of the code sec im rebuilding luightning*

small grail
queen escarp
#

yeah

small grail
#

And you gives extra gold/exp should be from server side, right?

#

You don't need to multicast anything though...

#

Ok, ideally, you have player states already. So make some replicated variables there and setup the gold exp from server side and they should be replicated to your client.

queen escarp
#

yeah so ill show u sec

#

wait i have to multicast since im chaning bools right

#

and checking the health

#

i mean this is the short answer

small grail
queen escarp
#

aye sec imma narrov it down

dark edge
dark edge
#

delete all that

#

no multicasts here

#

Are you doing your damage stuff on the server?

small grail
#

It should be on server. DamageEvent is supposed on server only in Unreal.

dark edge
#

Oh I know but you never know who you're dealing with lol

small grail
#

Ah, maybe not using apply damage at all? Then it kinda makes sense.

queen escarp
#

erhm

dark edge
#

Event Damage -> did you die? -> Tell GameMode or whoever, passing over yourself and the instigator and whatever else.
GameMode sets whatever variables (gold and xp), which should be replicated with repnotify

#

You can multicast a death event for visuals and sound etc but don't multicast ANYTHING taht has to do with permanent state (gold and xp)

queen escarp
#

oh so im using apply damage but im multicasting + server it

#

i should only server it ?

dark edge
#

no

#

only server should be doing that

#

If you're new, just delete every multicast in your project

queen escarp
#

haha

dark edge
#

they are fine for cosmetics and other non-stateful things

#

but they are a trap

#

learn RepNotify

queen escarp
#

i obviously watched tutorials

#

and he uses alot of multicastts

dark edge
#

every tutorial sucks

queen escarp
#

x D

chrome bay
#

delete that playlist from your head

small grail
#

I think what Adriel means is if you know what you are doing, just be fair to use mutlicasting

chrome bay
#

All YT MP tutorials are "I did this and it worked so I guess that's how you do it", and subsequently they never tested outside the editor

dark edge
#

Multicast chat maybe, cosmetics (play death animation), stuff like that. Nothing that would have any effect on the game a few seconds later.

queen escarp
#

aye

chrome bay
#

me replicating my entire chat history party_manny

#

(don't do that tho)

dark edge
queen escarp
#

aye okey

#

but either way

#

this is not related to that id say

fathom aspen
chrome bay
#

tbh I'm not even using it 😄 the whole thing ended up being a collosal waste of time

oak pond
#

is it possible to make this like splitscreen? like just for testing at least, because its annoying switching between both when the bigger one goes on top

dark edge
#

Just have play in editor launch 2 windows

oak pond
#

oh true

tight elk
#

facing this issue when login in eos any idea why this is happning using 5.1 source and making dedicated server

novel shore
#

Hey guys! I wondered if someone know a way to have Chaos Vehicules less buggy when replicated?

quasi tide
#

Not a lot people can do without specifics. What you're asking is incredibly generic.

dark edge
quasi tide
dark edge
quasi tide
#

Change the rules

iron thunder
#

does anyone know any good UE5 tutorials on adding multiplayer to already existing games, I've looked around but cant find any that are free or that actually work

fierce fiber
#

Hey all, I was wondering if anyone could tell me what I might be doing wrong? For some reason, the second player that joins the lobby isn't being assigned a team, or atleast it doesn't appear on their hud or the print string doesn't say which team they are assigned to

#

Here is the gamemode

#

Player Controller

#

Widget

icy jetty
fierce fiber
#

Ah my bad, I was under the impression that everything in the gamemode was replicated, then I forgot that the player controller can only be modified to a single client, right, I see what the problem is haha, Let me replicated the booleans and see what happens

#

Also thank you! haha

#

Thats interesting, even though Ive said when the amount = 3, it still assigns and extra person to the red team, and Id imagine vice versa for blue

#

Is this because the host doesn't count as a connected player? So should both ints on login have -1 set to them before the int select?

icy jetty
lean current
#

I have read about multiplayer basics, from types of servers to how they communicate with clients. Additionally, I have also made an online game using only python and got the server-client relationship to work by hosting a dedicated server. I want to do the same with unreal engine.

I have a rough prototype of a game but I can't really test much or continue development because everything depends on it being online with 2 players (most logic will have to be refactored once I make it online so I should start with it being multiplayer).

I want to make a dedicated server, and have most logic run on the server.

To start; How do I create a dedicated server so that 2 players can join a server and play a simple 2D top down game?

fierce fiber
dark edge
#

For testing locally, you can play in editor with 2 clients and a background server

lean current
dark edge
#

no, you'd build a server (for linux probably)

#

but cross that line when you get to it

worthy wasp
#

GameMode is a ServerOnly thing yah - in a ListenServer configuration - how would I target the player controller that is assocaited as server?

is this right?

AVI_PlayerController* ServerController = Cast<AVI_PlayerController>(UGameplayStatics::GetPlayerController(GetWorld(), 0));```
kindred widget
#

Usually your code should not care about the players as who is the listenserver.

worthy wasp
#

so help me understand -
I'm trying to do a chain of events to "Set Is Ready" (like a lobby)
I can see that in PlayerController - i can RPC set the boolean just fine - it shows synced on teh server which is all i care about....

I need to have the GameMode call back to the player controller that is the server and call EveryoneIsReady() - so I can enable a button to StartMatch()

worthy wasp
kindred widget
#

Oof. I hate those systems. Much rather just let everyone ready up and trigger a check to see if everyone is ready to start.

But to answer the question. It still shouldn't matter. You should have a different button/ code path to call in the UI based on a simple IsServer check. Host won't see the ready button, clients will. Host can just get the game mode directly and call the start function.

#

If you need a check to iterate over the controllers to know if everyone except the host is ready, you can just check if it's a local controller. Player's own will be true. Any other controller on the server is false to that. So if not local controller and is ready

storm zinc
#

Log for clarification

******** PreLogin ***********
[2023.05.22-18.17.35:656][296]LogNet: Login request: ?Token=2bac53f1-d3a2-410e-b0ec-f1b9f2a24d00?Name=DESKTOP-SDE8QNO-5A29DB614809B849F41B5C9A01111E9C userId: NULL:DESKTOP-SDE8QNO-5A29DB614809B849F41B5C9A01111E9C platform: NULL
[2023.05.22-18.17.35:689][297]LogNet: Client netspeed is 100000
[2023.05.22-18.17.36:526][322]LogNet: Join request: /Game/EasySurvivalRPG/Maps/PocketTowne_WP?Token=2bac53f1-d3a2-410e-b0ec-f1b9f2a24d00?Name=DESKTOP-SDE8QNO-5A29DB614809B849F41B5C9A01111E9C?SplitscreenCount=1

******** PostLogin **********
[2023.05.22-18.17.36:529][322]LogTemp: Display: Controller Unique ID: 72249
[2023.05.22-18.17.36:529][322]LogTemp: Display: Checking Token 2bac53f1-d3a2-410e-b0ec-f1b9f2a24d00 With ID DESKTOP-SDE8QNO-5A29DB614809B849F41B5C9A01111E9C Against Incoming ID: 72249

So the player controller UniqueId uses this FString uid = FString::FromInt(NewPlayer->GetUniqueID()); And that's where the 72249 is coming from.
However, the const FUniqueNetIdRepl& UniqueId from the PreLogin when I do ToString() on it, is the huge DESKTOP etc.. which looks like it may be a serialized object perhaps? Is there any way to convert that with the FUniqueNetIdRepl to get the integer value?

#

It's the same as the "Name" option parameter so...

lean current
# dark edge no, you'd build a server (for linux probably)

what I meant to ask was; I want to test the game as it's supposed to be played: 2 players in one game. So if I do what you said will it be the same as launching a dedicated server? I know I eventually have to host a server (am already doing with other games not using unreal), but I don't even know what file to host or how to get it

lean sundial
kindred widget
#

GetUniqueID returns a FUniqueNetIdRepl.

storm zinc
#

mmm k I will see if I can change this code around. Might make a struct to store instead of a FString then

lean sundial
kindred widget
#

PlayerState

lean sundial
#

you are right, so i guess their problem is calling it on an object that's not PlayerState, which ends up calling the UObject function that returns uint32

storm zinc
#

mmmm so the playerstate has the actual wrapper on it?

lean sundial
#

yeah, playerstate has this function

const FUniqueNetIdRepl& GetUniqueId() const
storm zinc
#

i see that now...

#

Time to go look up C++ again HAHA

#

It's so weird compared to C# and such... all the ptr's and such

worthy wasp
storm zinc
#

hehe ya

#

trying to wrap my head around the syntax is frustrating to keep everything in check right now

worthy wasp
#

i dont have much of a problem with that as I do with the pointers/references and when to use each (and HOW to use references lol)

keen root
#

i got a question: how do i replicate projectiles? i tried to make a function with a custom event that runs on server but it just crashes

#

pls help

latent heart
#

Same way you replicate everything else?

#

What's your error?

keen root
#

yeah....

#

how do you replicate everything else?

#

sorry but im kinda new here

#

there is no error

#

it just freezes for a second then repsawns the instances in different sessions

#

i dont know how should i set the custom event

latent heart
#

How are you spawning them now then?

kindred widget
# keen root i got a question: how do i replicate projectiles? i tried to make a function wi...

Simple answer. Just spawn a replicated projectile on the server.

More complicated answer. You usually don't. Projectiles move too fast. Their server lifetime can spawn and die faster than they even have a chance to replicate. Leaving your clients unaware someone fired. Thus you need to design a system that plays firing on all machines. Not very well versed in this past this, but Jambax wrote a thing about burstcounters. But I think he's also said he doesn't use those anymore.

wicked latch
#

Hey there! I created a blank project in 5.2, created a blueprint derived from character, and set up some basic movement via add movement input, just the basics. I set up a listen server and had friends join me and the movement was jittery. Replicate movement was checked on the player, so was replicates, and even set each component to replicate (as well as unchecked it for them just to make sure). Both myself and my friends are running at no less than 120fps, one of them lives several states away while the other lives an hour away.

I ran movement through RPCs as well as just straight off the input action nodes, changed which subsystem I use from steam to EOS, adjusted update speeds, changed tick rates, discarded the character movement comp and made my own, and so many other things.

The player isn't the only thing jittering either, objects with physics enabled jitter and sometimes straight up teleport when replicated.

whole pine
#

why does my listen server have movement but my clients dont and how do i fix it (using default top down template movement)

radiant dew
# whole pine why does my listen server have movement but my clients dont and how do i fix it ...

kinda still learning stuff but i can link you a video and docs you should read asap to understand basics... https://www.youtube.com/watch?v=OVeo3cVTIcU&t=1118s
https://cedric-neukirchen.net/docs/category/multiplayer-network-compendium

🧑🏻‍🚀Get the project files here on Patreon: https://www.patreon.com/posts/66842088

In this video we take a look at the basics of replication. We will cover the concept of replication and what it takes to replicate the server instance to the client instances to keep everyone in sync.

We also take a look at how we set an actor to replicate, we l...

▶ Play video

This compendium is meant to give you a good start into multiplayer programming for Unreal Engine.

#

watch those and youll understand surely

whole pine
#

thx

whole pine
#

idk, still confused

#

do i multicast the movement with RPC

woven bramble
#

In Actor_BP, when I enter a Box, I want the operations to run only for those who go inside that box. The "Is Locally Controlled" and branch method worked. So now the Print String is only reflected to the person who enters that box.
But when I do a visibilty operation it doesn't work. I chose "Owner Only" for RepNotify, which didn't work either.
Any recommendation?

whole pine
#

how do i go about RPC'ing something like this with multiple exec's?

rapid sky
#

Hey Guys, I have a weird issue with blendspace locomotion animations. When i test it in editor all works perfect and when testing via steam the server sees the client animations slower, like, way slower! Although the velocity values are the same. tested it via print string, i dont have a clue anymore whats the issue. Anyone stumbled upon this?

kindred widget
rapid sky
#

Smooth and slower! No stutter

kindred widget
#

That's a new one. O.o

rapid sky
#

😄 yea im confused as hell 😄

oak pond
#

I also got a problem with animations, whats even wrong here? these transitions are doing nothing but these variables are replicating fine

#

and why does replicate checkbox on a variable seem to do nothing? I can replicate a variable without that being ticked

whole pine
oak pond
#

they can collide, and yeah they use the same bp

whole pine
#

oh, im trying to make mine not collide

oak pond
#

cant you just disable collision then

whole pine
#

didnt work

oak pond
#

like

#

just not have them collide with each other in their collision settings

whole pine
#

i know, it didnt work

broken shale
#

Having an issue with seamless travel where the host ends up floating like a spectator and the client is just frozen under the map… starting to suspect this may be the cause, does that sound right? And if so s there a blueprint implementation anyone is aware of as a workaround?

https://forums.unrealengine.com/t/ue5-seamless-travel-bug-found-we-found-the-cause-and-also-have-a-workaround/583652

Epic Developer Community Forums

There is a bug that occurs in UE5 when seamless traveling that occurs if a client beats the server in loading the next level. There’s a race condition that causes the server to never see that client as having loaded the new level, therefore never transitions it’s player controller over to the new level, and the server and all the clients hang. ...

whole pine
#

is there a way to make default topdown template movement networked

small grail
#

Switching by gameplay features I think.

whole pine
#

dont know what that is

small grail
whole pine
#

alright thx

small grail
# whole pine alright thx

You'd better check the video from Unreal youtube channel talking the details of this sample. It is more complicated than I expected by the way.

whole pine
#

is it bad to make a whole game using listen server then convert it to dedicated later on?

small grail
amber barn
#

hi guys, is it possible to just join games online via direct IP? following this vid
https://www.youtube.com/watch?v=IZQjLjmVMdo and my code..

void UPuzzleGameInstance::Host()
{
    UEngine* Engine = GetEngine();
    if (!ensure(Engine != nullptr)) return;
    Engine->AddOnScreenDebugMessage(0, 10, FColor::Green, TEXT("Hosting"));

    UWorld * World = GetWorld();
    if (!ensure(World != nullptr)) return;
    World->ServerTravel("/Game/ThirdPerson/Maps/ThirdPersonMap?listen");
}

void UPuzzleGameInstance::Join(const FString& Address)
{
    UEngine* Engine = GetEngine();
    if (!ensure(Engine != nullptr)) return;
    Engine->AddOnScreenDebugMessage(0, 10, FColor::Green, FString::Printf(TEXT("Joining %s"), *Address));

    APlayerController* PlayerController = GetFirstLocalPlayerController();
    if (!ensure(PlayerController != nullptr)) return;
    PlayerController->ClientTravel(Address, ETravelType::TRAVEL_Absolute);
}

ive tested a couple times now and i have portforwarded 7777 and 17777 but the connection always times out, wondering if i am wasting my time trying to get this to work and should move onto sessions

I think it should work but the client joining just gets timed out, i guess could be firewall?

small grail
#

I remember you can do that in the same network. I'm not sure about internet.

amber barn
#

yeah sorry should have said, local network works easy, but internet might need vpn/hamachi i guess?

#

just wanted a quick way to play with mates to see if my game is fun, without building out heaps of network lobby code etc

small grail
deep shore
small grail
amber barn
#

ahh ok well might look into steam pack

@deep shore by reserve a port you mean forward on your router?

amber barn
small grail
#

Don't need to worry too much about like shitty firewall or port forwarding shit

amber barn
#

haha yeah true, do you have a good resource for me to learn? just a youtube link would be enough or article if its not too much trouble

small grail
#

You can just dive epic's document.

amber barn
#

oh whoa they have one, no worries

deep shore
amber barn
small grail
#

Or you can use ipconfig to check your public IP

amber barn
#

you can? haha

#

oh whoa, thats cool gave me 2

small grail
#

curl ipconfig.in/ip
this command is for your public one

amber barn
#

aweosme thanks, same as the one we tried to use but didnt work

#

so must be port forwarding

#

but i did try forwarding already

small grail
#

Open the ports in windows firewall too

amber barn
#

ah

small grail
#

For TCP and UDP

#

That's why I suggest steam😅

amber barn
#

i think everyone will have to let the app trhough the firewalla s well i think

deep shore
small grail
#

Because steam makes the network rules for you

deep shore
#

but joseph is making a good suggestion too, i haven’t set up connecting via IP through steam but supposedly it’s pretty painless

amber barn
#

ya 100% ill give direct Ip wtihout steam another quick crack then go via steam

#

thanks for the support both of you

deep shore
#

you’re welcome!

small grail
#

Cheers!

#

BTW, I had so much bad memory for doing GDK games, their network service on their own windows system is just a nightmare...

#

Probably you need to know network very well and set it correctly at home just like other console platforms have the same infamous issue of NAT

whole pine
#

I copied this video 100% so wtf dont i have networked movement

sinful tree
whole pine
#

nah i just realized i had to restart unreal engine and it magically works now

#

weird

sinful tree
#

Yeah that's always fun. Sometimes a restart can do wonders.

whole pine
#

now i know lol

amber barn
whole pine
#

how come i have the same exact camera settings on my client (left) as the listen server (Right) and the camera is in a different location, angle, everything

#

client has a camera and server has a separate one placed in the map cause i couldnt figure out how to connect the client to the map camera

whole pine
#

i used this to make it so client can use the same camera as server but if i spawn 2 clients only one of them uses the proper camer

small grail
#

Wait, is it local or online? Nevermind if it is online.

whole pine
#

im getting an error when i try to save my project and im kinda freakin out

#

its thru the listen server irght now

small grail
whole pine
#

the first one

#

i put a delay and it worked

#

but i want the camera to work instantly

#

for everyone

#

a delay before the target blend node

#

i put the target blend code on the event tick and it works fine now

#

but why am i getting an error when i save

#

"The asset '/Game/TopDown/Blueprints/BP_TopDownCharacter' (BP_TopDownCharacter.uasset) failed to save.

Cancel: Stop saving all assets and return to the editor.
Retry: Attempt to save the asset again.
Continue: Skip saving this asset only."

small grail
#

So if you want it to be work instantly, you need to blend it as soon as the pawn is possessed.

whole pine
#

event tick made it work fine

whole pine
#

any ieas

#

ideas

small grail
#

Did you have your game running? Or did you open two unreal editor?

whole pine
#

neither