#multiplayer
1 messages · Page 85 of 1
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
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)
Why you doing anything from the level?
Is running trace every tick on server side too expensive?
If the trace is done locally, can't the player cheat?
Yes, but you can trust yet verify
What are you trying to do?
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?
u can have client side volume (or even multiple volumes) that are very accurate, and a server side volume that is bigger and
- if a client detects a collison, send to server
- server checks against it's bigger volume, if true, then execute collision logic
i do server side collisions for simplicity in my game
was thingking too hard on accuracy
no performance issue, but i never tested above 4 players
Trying to trace collision on the weapon when attacking
btw your character model looks good. what is your game about?
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
I am doing this course, @quaint roost https://smartpoly.teachable.com/courses/enrolled/1920999
just a random character I made quickly in Vroid
dark souls multiplayer hit registration is like the worst thing in history 😆
This would be almost impossible to achieve in practice.
A random stream would make the values predictable but its unlikely the order of construction of every actor would be consistent for all clients and server.
You'd be better setting te bool on server and replicating it
@quaint roost can't u just do repnotify on each replicated static mesh? Im not sure tho, dove to Mp very recently
hmm i see. i don't need it to be dynamic. i just want it to generate once consistently
In what scenario do you need to have a collision that is either on/off? just wondering
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.
i have these walls that are made up of cubes. the design is that the cubes are randomly scattered
That reminds me of nier automata
the level looking nice
Don't all the cubes need collision tho?
yeah so you can do server side hit detection or clientside with some sanity checks
Yup, not sure what would be the cheapest way while having efficiency in performance
i simplified my question alot haha. you are right they all need collision. i'm using the random bool to decide whether to place a cube at a particular spot or not
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
Clientside would be most efficient and best IF everyone behaved
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 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
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?
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
Ok I solved the issue. I was using "Random Bool" node but now i use Random Stream and i set the default seed to a predetermined number so that it always generates the same random numbers
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?
the fuck is that font lol
hehe you want it right ❤️
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.
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.
Why not use the replicated pitch already available to you?
I agree with Adriel, but what you're missing is that variables only replicate from Server -> Clients. You have to RPC the value to the server so it can then set it in the fCamRotationPitch, then you'd need to use an OnRep function for that variable to drive the actual position on other clients.
If you're just doing the standard shooter thing, https://github.com/EpicGames/UnrealEngine/blob/407acc04a93f09ecb42c07c98b74fd00cc967100/Engine/Source/Runtime/Engine/Private/Pawn.cpp#L954
I didn't know and i will try it thanks!
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
None of these get run on the client. There's a gate at the beginning of the function to only run on authority.
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?
show your code
Ok, I'm confused - why does the first function (Clear inventory function) affect the Client (the client clears inventory on death), but my Give Weapon function, although implemented similarly, when event called, does not affect the Client, only Server. What's the difference, i can't figure it out.
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
Arg, okay thanks man I'll dig more.
This is in the game state event graph
What happens if you just do this serverside?
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
im confused
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.
it's launching your server character because your server character is character 0
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
First players in the index will always be local players, then remote. Using index 0 will only launch your local player
IT WORKS! im still not entirely sure why that works yet or the logic behind it but thank you so much i been trying to figure that out for days 🙂
Each Player has a Pawn, you want to get THAT
not the 1st pawn to exist on the machine, which is what you were doing
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??
why is this not working 😮
im attching it to a mesh
if i spawn at location only it works
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.
Question how demanding are the "save game slot function" ? i mean could i save after killing a npc everytime or will that cause issues ?
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 😄
First of all, why do you need to call it every tick?
And which class holds this BP graph?
Its the player BP
Just doing this purely for testing, it will be shifted else where haha
Ok, so where did you tell the server that one certain client changed the weapon?
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
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
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
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.
Ah, so I need to get information from the client first then run it into the server
Event tick
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?
Yeah, it only changed for the client
That's why you need to add an input for your Server_WeaponHand_Set RPC
From the client which changed weapon to server
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
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.
Okdokie 🫡
I will try this and get back to you, thanks for the guidance my smart friend
Cheers!
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?
It did also work btw so legend
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.
I suggest do OnRep, yes. Because it is not necessary to be a RPC since it is just for something visual
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?
Sending replicated array is not recommended. What do you really want to do?
You may check reliable for your RPC event. And for OnRep, you probably could set the condition for skip owner.
Okdokie Thanks again!
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.
I'm sorry I can't say I understand it totally but how do you get the surrounding actors and where did you get them?
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 😄
We do something similar for our RTS and it works fine. Send commands (move/attack etc) with an array of affected actors. As long as the actors are net addressable should work. If it desyncs, I'd check that the actors are properly replicated to begin with
Ok, thank you for the confirmation. By "net addressable" you mean just replicated right? Or is there more to that phrase?
Also if the actors were not properly replicated, wouldn't the server just see all of them as invalid instead of desyncing?
If they were not replicated, the client would not see them at all (assuming they were spawned by the Server at runtime)
Yes, replicated = net addressable as far as I know
Yes they are. And I've debugged the replicated variables printing their "OnRep"s and all. Seems to be running fine just on wrong actors for whatever reason.
I think that your actors are not properly replicated and the properties on client - server don't match. Pointer replication is not buggy
It sounds like you're sending actors which have been spawned client-side, and thus can't be resolved by the Server
But in that case, wouldn't it resolve to nullptr instead of picking the wrong actors?
I'll double check on that, thank you.
Yeah, it would likely just resolve to nullptr.
Unless you've forced them to be net addressable somehow, in which case, shennanigans may occur
Some are null pointers byt that's like 10% of the cases.
The other 90% are visible to server but don't match what the client sees.
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?
Thank you I'll check the actor generaction 😄
Are you using any procedural generation or anything here?
I MAY have forgotten to put the IsServer check in the spawner. Looking into that RN.
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
Damn it I sure did.
I'll patch that up and see if that fixes all the issues or just some of them. Thank you kindly for the help guys ❤️
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.
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?
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
That's exactly what I observed, but I was dead sure I spawned the actors server-side only and started to question my understanding of RPCs themselves since they're new to me 😄
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
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.
I can't find an OnAbilityAdded event in the ASC
Oh in the GA
ongiveability()
Is that OnAbilityAdded your own addition then?
It's just a K2 blueprintimplement node called by the OnGiveAbility() of gameplayability
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
oh yes
You'd probably have to check the authority of the ASC/Parent Actor if you wanted to check that from On Give Ability
That was so helpful!
I also learned something 😄
wait do you have your profile pick as rider background xD didn't know that was possible
O(∩_∩)O
@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.
Hi, how does the animBP replicate? does everything happen on the server?
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)
In most cases, the information that AnimBP needed was from CharacterMovementComponent whose data was replicated by itself through its owner actor's channel.
That's a good question. Last time I had to deal with this I had to learn the hard way that Attachment is replicated and what the Server attaches to is the law.
We ended up overriding the Attachment code in C++ for that Actor so that it doesn't replicate the Attachment.
You can replicate your own property in your character ,and get it in AnimBP
Not at all. As Irei (i hope that's correct, cause I have no Kanji keyboard setup) said you usually use already replicated data
thanks
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?
void Everyone();```
NetMulticasts' execute on all clients and the Server
They are only callable from the Server ofc
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
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
Make sure to run game in "Standalone mode"
Server travel in PIE is disabled. It even says so in the output log
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
Absolutely zero
Oh, so if I run as client or listen server it’s just not going to run it?
In the editor
Yes, it isn't
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
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
the reason why it worked for you before is because you were executing fade in/out purely based on overlap event, and that happens on both server and client without any authority check (the then 1 pin)
your new implementation checks the content of the array and use that to decide to fade in/out, but your array is only updated on server
if you don't want your client to modify your array, the other simple thing you can do is just to do your fade in/out without checking to see if the actor is in the array
so only use the overlap actor result
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
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
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
yeah so if i make the fade in and fade out event Run on Owning Client, its fine for server but client doesn't see them but the server sees the ones the client should be seeing
and you are doing this on a character/pawn?
So server sees what client should see even tho server isn't in the overlaps
The fading no, that happens on the InteractableBase class cause the widget is a widget component of that class
ah, call on owning client events have to be on character/pawn
because your intractable objects are all owned by the server
and pawns are owned by their respective player controllers
thats the actor base class atm
do the fade in/out in your character bp, like you had in your old screenshot, make those call on owning client
which screenshot? in the character one i was calling it on the interactable base too
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)
Okay so to call it from the character ill need to save a reference to the overlapping actor thats im looking at so if all checks on that tick go true i should save a ref there?
like that?
cause i only wanna fade in the widget if those conditions are met
you don't have to save a ref if you just make your new event take interactable as an argument
good point, so from there i just call the interactable BP's 'InteractionFadeIn' event? and make them not replicated again
Like that?
it should work, i think
well, maybe not for fade out, so you might have to save a ref for fade out
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
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
problem is, with the original way i had it set up where it didnt show the widget for the client it did still only open the draw if they were looking at it, just didnt show the widget so it 'technically' was working before changing the code lol
ok acutally i just thought of something..... there's a much simpler solution and you can keep most of your old code. All you had to do is make Overlapping Actors array replicated
holy shit you're right! that's working now cheers mate
nice! yeah sorry idk why i didn't think of the super obvious solution before and went the hard route
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
@void pebblespctrum any chance you could help me get it working I can't figure it out
Are you emulating network lag? There’s a ui and console commands which both can generate fake lag. Maybe it’s on by mistake?
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
Are you talking about the sessions bug there it returns 9999.
oh and I dont remember why I made this PlayerNameString, but just ignore it, its not important for now
There's not enough info here. You have random blocks of code from different places with no connection between them.
And not a single place where you use them.
here
bShowPlayerName is not bShowName.
What is ShowPlayerName?
How does that end up at this widget's function?
Its a widget component
and
it calls it
Does it work correctly if you overlap once and then back away?
How can a player that didnt overlap with the box collision have this boolean being true?
yes, but
the blue guy can see it
here
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.
Are you calling this at beginplay?
nope
yes i am
only on these 2 places
no i don't think so. It's a known issue but i can't find a solution
I have a vague memory of there being a weird bug with that with Steam. Just a few.
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.
Initial state is important.
any idea maybe how to solve this?
its false by default
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.
its not technically replication, because if someone desyncs, it might call for them but not on the server
so its replication between clients or something?
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
well I didnt know that
but lag and packet loss can cause them to be slightly different
hmm
This was what I remembered. They do this weirdness thing where they send the ping data through as an extra setting. You have to pull it out of those.
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
If you're using Advanced Steam Sessions plugin. I think they have a thing that you can get all of the extra options.
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.
is there a simpler way?
That is the simple way. The way you're doing it now is the difficult one.
I have no idea how to do what you said and I dont want to go very deep to that
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.
I dont get it
This is why programmers hate UI most of the time. 😦
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
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
Show the code that crashes and the error its producing
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
ok so this is where it crashes (this part is internal UE code)
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
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
I mean I'm just guessing here, I'm assuming the owner of that component (which is an actor) is getting destroyed but that code is still running somehow
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?
maybe IsValid(GetOwner()) is what I need
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
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?
yea I was thinking about that too
maybe its more cpp related and I'm just assuming it net relevance
which thing lol? You mean a specific node?
i am already getting the server info and then testing for ping in ms
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)
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
@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
Nope, not necessarily, if that's what worries you
Oki doki
Damn this is in depth, I can read through this but I am crunched for time, if you could help me with specifics?
I've tried a save game
But when the client travels it seems not to have data for them
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
Sure
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
Use game instance, they are persistent data. Will exist from start game till the game is destroyed if im not wrong
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
Are you sure the Rifle reference is valid when it is reaching the server and the multicast?
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
It's probably in how your reference is obtained as it appears to be happening on the client.
Im attempting it through a line trace by channel
Unless the "current weapon attached" var needs to be replicated?
How is the object itself being spawned?
Just placed into the world
And it's an actor that is marked as replicated?
On class defaults of the actor "replicated" is ticked if thats what you mean?
This is the error Im getting if that helps
Yep.
Are you doing anything else with the "Hit Actor" reference before it goes into the cast?
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
Where is that destroy actor server event called?
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
I'd change up your logic.
- 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.
- 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.
- 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?
Yeah the destroy actor is connected through those lines, also thank you so much for the boatload of information!
: D
I was essentially wondering if he's calling Destroy on an Actor, followed by trying to attach said Actor to Component
But then I would expect to see a "pending kill" error
So yea, that's part of the problem - you're likely attaching the actor then immediately destroying it, so the reference ends up going invalid, but happens to do so after the actor is already destroyed, so the actor is no longer valid.
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
print out your transform/location
if it's going to 0,0,0 something is going wrong during the attach
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
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
Anyone able to get World Partition to work with ReplicationGraph or is it Iris only?
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?
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?
Get your IP on the internet and send to your friend.
Or use a vpn which is at least 1000000x safer, or use a third party thing like steam to handle your lobbies
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?
One approach is to make the beam weapon handle damage on an accumulated basis.
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
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.
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?
If you use seamless travel Gamestate will persist by default.
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
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.
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?
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
GetNextViewableTarget exists, and it's luckily virtual. Override it to your liking
Not really... it persists to transition map, but not to destination map
PlayerState will however indeed make it to the destination map, but ofc only with seamless travel
Persistent data compendium awaits you in 
You're king.
Thank you, it worked 🙂
hi, if you wanna help me with something I asked a question on other server here https://discord.com/channels/807733033192390676/1109433568289112095, thanks 🙂
Discord is the easiest way to communicate over voice, video, and text. Chat, hang out, and stay close with your friends and communities.
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 😂
I mean nothing so exceptional about it. Make sure the ActorComponent is replicated and the owning Actor for that component is replicating as well.
Is the built-in actor damage system replicated by default?
Is there a way to check ping?
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.
the 9999 ping only appears if it's not lan
Yeah, it's a steam issue with SteamSockets. They stuff the ping in the session arguments for some reason. 🤷♂️
there are thousands of mulitplayer games running on steam and made with unreal engine that have this fixed
HOW
Getting it out of the session arguments?
yea but how
Are you using AdvancedSteamSessions?
yes
have you seen this?
that's how i handle it so far
Yeah. Advanced sessions has a GetExtraArguments or something.
this ?
but how does this node benefit me now?
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
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.
like this?
i can't split the structure pin of server info
sorry mate if i am appearing to be stupid rn haha but i feel kinda lost xD
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.
you can't connect this type of array element to ==
and also not convert it to string
or text
how would I get this in multiplayer?
you get a local controller then camera mamager from it
the GetXXX[Index] can bite you in the arse in MP
I don't have access to that plugin. I'm sure it has some sort of GetSettingName, or some related BP function.
we are getting closer i think
only problem now is that P2PPING is wrong i think
But ping changes, you are doing this on construct...
it'S only for when finding the server
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
Not sure. Don't you need to GetSessionPropertyInt or Float or something?
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
ok, yea i changed it to this now. Still it doesn't work
we need to find the exact settings name
i tried PING, PINGINMS also
oh now i get why it's not finding anything. I have to put it into extra settings when creating the session. Hmmm now that doesn't help me at all then because i cannot input the ping myself
i.e. before the session is even created
here in extra settings
The code seems to imply that it inputs that automatically from the steam subsystem. I don't know if AdvancedSessions does something else.
.
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.
it always works with the ping , just not on steam. So even in standalone mode on lan or online it does work. JUST NOT ON STEAM. Smh i will just take it out for now and maybe put it in at a later point in time, thx though
No, where can I find it?
I got it, thanks!
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?
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
The pivot offset isn't used at all, I think, for attachment.
I just saw the comment
It's just for rotating an actor that isn't attached to anything.
I see
Your best bet is to add a parent actor to use as the pivot.
well I guess I can just adjust the socket position
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?
ready to receive a client RPC from the server
when the player joins the server, I need to send him some server options/data
Well I'd use the game state for that, but I would expect this to work as soon as the actor has begun play
is the player controller guaranteed to be initialized when the GameState receives that data? because some of the data I'm sending from the server, will need to be passed into PlayerController->SetSpawnLocation() and PlayerController->SetRotation
thats why I was doing it on the player controller
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
BeginPlay from which class
Any actor that exists in the world
There's a bunch of code for this guarantee in AGameStateBase
so when any BeginPlay is called, GameState is guaranteed to be ready and initialized
There's a function, in GameMode, that tells you when the client's PC is ready to receive RPCs
oh, thats exactly what I need then
is it InitNewPlayer ?
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
ok found it
PostLogin
thanks
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.
TIL RPCs can be received before BeginPlay is called
i can send the code of how im doing when im setting it
RPCs can be pretty much called when an actor channel exists
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)
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
its ok I can just cache the data received and when BeginPlay is called, I process it
eyy i fixed it
- 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.
- 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.
- 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.
Thanks
I fixed it by just making a variable after spawn actor and setting equipped weapon to that
so SpawnActor -> Return value = Variable, Set that return value as equipped weapon and now it works
How are you doing that out of curiosity?
I'm just saving the data I receive as a member variable inside my PlayerController class
then when BeginPlay is called, I use it
in case anyone is interested - something i recently wrote - streaming big quantities of data using rpcs https://vorixo.github.io/devtricks/data-stream/
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 😄
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?
It's almost like UI was meant to be handled in the scripting language.
unless its for a loading screen etc that can only use Slate, hence why I'm trying to grab it in c++
but failing that, I'll go about it another way using BP. Just looking for a C++ option for reference.
Why are you pulling the multiplayer network compendium? 
tryna stream it everywhere
sigh, thought you were trynna steal it 🥷
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 🙏
Hey why is this cast always failing on the client? Is there another way of getting the player state in a widget?
At the time construct gets called, the playerstate might not yet be valid, you could try looping cast failed with a delay
You're right! This worked. Thank you 😄
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?
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
Where is the AcknowledgePossession though?
PlayerController
All right, thanks
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!
Isn't it called only if the player controller possesses a pawn though?
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.
Uhm, maybe I'm missing something. I thought that I can connect to a server, and have only a PS and PC without any pawn, and then create one depending on my needs.
Yeah, I have already set it to none
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.
So, if I store the character class on client's game instance, would I be able to get it in client RPC from PostLogin?
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
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?
Each client has their own. It is not networked.
It persists throughout the entire lifetime of the application
Does a server have one though? You said that each client has one. I'm asking to be sure that I understand it correctly 😄
Every instance of the game has their own.
I made a movement by applying add force with the tick, but the client is shaking, how can I solve this?
Is.. HasAuthority check hackable?
I could never solve this case in replicaton :/
another video
If I understand the question. The client should keep most of the assets in memory that it can while loading. If it has a palm tree mesh loaded when connecting to the server. It will destroy the component using it of course. But the static mesh should remain in memory long enough to not need to be reloaded from disk in most cases. Likely a hardware dependent question though.
Sure. It's just an enum on an actor. Could be memory edited.
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.
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.
Thank you for answer, what is CMC?
"Character Movement Component" i understand thx
i can't see it
Your Pawn would need to be a Character class type.
like this
Yeah.
In my own system, I took the actor transform on the server and did a client set actor transform, but it still shaking.
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.
Great, thank you. So basically if i load a map on a standalone client. which later connects to a server with the same world and assets. i wont need to reload everything. the components yes. but all the textures and meshes will still be in memory. I was just thinking if there was some automatic GC when loading a new world
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
Mind you I'm not 100%. I've just noted from personal testing that in shipping game I can load a map from main menu. And if I'm fast enough I can drop back to main menu and load into that level much faster the consecutive times. Which led me to believe it wasn't purging much. That was tested on a somewhat small map though.
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.
Okay yeah, i will look into it a bit closer. seams like an optimization that is at least possible to do.
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.
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.
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?
what kind of game are you thinking of?
An open world rpg with rideable dragons
whats your level of knowledge right now do you know what replication is yet?
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
My level of knowledge is very low, but growing. I have heard of replication, but dont understand it yet.
ok first few basic things you'll need to really understand is replication, how to host and join a session, and subsystems. those will take up a good bit of time but after that you can at least have people get into games with each other.
I will look into it! Thank you!
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
There is a framework called gameplayAbilitySystem which is great for RPGs, calculating damge, Buffs, debuffs, everything. Its has a bit of a learning curve. But if you plan to have these kind of things with different weapons, specific animations for weapons etc. It will really make your life easier 🙂
@pliant mosswell this was more of a multiplayer bugg really but 😛
Yeah, GAS is basically built for multiplayer. Abilities are replicated by default etc.
aye gotcha
but i dont wanna use someoneelse system x)
whats the point in that .p
whers the "fun" in that
Well its kind of built in the engine 🙂
oh x)
Anyways, it was just a suggestion. but ofc. if you want to built the system yourself, you can totally do that.
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
It looks like you may be attempting to call an RPC on an actor that a player wouldn't own. Are you getting messages in your log indicating "No owning connection for...." when you attempt to trigger this?
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.
You also probably do not want to use the "Absolute" option as this can boot players from the server.
Here's a good read on handling server travel and persisting data: https://wizardcell.com/unreal/persistent-data/
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
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
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
with the ticks, they come up the same on the client and server, but the actual change of the material doesn't happen on the client
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.
oooo i didn't know about hte DOREPLIFETIME_CONDITION_NOTIFY thank you so mjuch and it does work now
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?
where can I learn more about the DOREPLIFETIME_CONDITION_NOTIFY
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/
For anyone's wondering, you need to open UDP and TCP ports to all IPv4 with the port 7777, you can do that in the Security Group Inboud Rules editing which is where your instance is in AWS management dashboard.
Also, you'll need to make 2 inbound rules for TCP and UDP for port 7777 in the Windows Firewall Advanced Settings window.
Hope that helps, it certainly did for me!
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.
If this is on your pawn/character, then you can do IsLocallyControlled plugged into a Branch and use the false path - that'll mean it happens on any non-locally controlled copies of the pawn/character.
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.
The IsLocallyControlled Branch didn't work.
How can I do this?
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.
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.
Please excuse my ignorance, is that what you mean?
Partially.
You need to RPC to the server, when running on the server, you set the variable. You do not need to multicast afterwards.
You should see a function on this actor named OnRep ActorRot - that function will be triggered when the value has been replicated.
In that function you do the set rotation and use the variable value.
This is i think the pertinent section of the log but nothing stands out to me:
Are you changing the actor rotation on the client before sending it to the server?
That's the value you're reading from that you're sending out.
Also, are you sure the RPC is being triggered?
It's less of an issue about the RPC as you're using an event that triggers on server anyway. Ideally there would be no Client->Server RPCs on actors that would never be possessed or otherwise owned by clients. Just leave it as an ordinary event or function.
I've currently got it set to just run as a command console execute (but have also tried it with servertravel). No RPC. Just running off the authority branch from the overlap logic and it still results in one of the players transitioning into the next level but frozen and with it only partially loaded
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)
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. 😦
How does the basic jump/add movement in the pawn work? looking at the code i can't tell how they're replicating it
It's handled through the Character Movement Component.
I also looked there, no obvious replication or rpc
Thank you. Yes, it worked as you said. But I realized that this method did not fit the system I wanted to make.
So I'm going to develop and ponder.
Many thanks again.
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.
Aha i thought its as simple as RPC or replicated variable, Thanks
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
It should never be set to none anyway
what is causing this issue im using dedicated server on steam with steamsocket netdriver
Assertion failed: MappedClientConnections.Remove(ConstAddrRef) == 1
dedicated server randomly crashes
callstack?
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?
The vre example uses VRStartPlayer1 to spawn the player in. If I set default pawn to default then a blank sphere appears in the level or if I set it to the player character it adds a t posing copy.
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
U werent responding to my question right I'm not doing vr
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
What does the FORCEINLINE macro do, and where can I find out about more macros like it?
I wasn’t replying to you sorry. For your problem, I’d prly just add a box collision component, and then use onComponentBeginOverlap or onComponentHit as needed
It’s a bit more work than that in multiplayer, but that’s a start
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
I was thinking about this while considering where and how should I broadcast my events. For example would this;
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
But as long as you are using on server means calling server from a client...
I don't think it matters. They're both effectively the same. The one you're considering would mean one less event dispatcher to worry about which I think would be better.
I see, thanks for the opinions
Anyone know any good tutorials on steam multiplayer lobby system going into a game? Im making a team deathmatch based MP shooter
What means a lobby system?
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
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.
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?
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
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?
Which player you want to run this code?
yeah
That's why I asked which one😅
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
Hmmm, can you describe more about the case you are doing? like the feature you are implementing.
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*
So you have the damage event passing the causer right? from the server.
yeah
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.
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
Sorry but too small to read😅
aye sec imma narrov it down
SERVERSIDE:
Pawn:
Event Died -> it notifies GameMode or GameState, telling it the Instigator of the last damage tick it took -> GameMode or GameState takes it from there.
GameMode:
OnSomethingDied -> add to the instigators or their playerstate's Gold and XP value (Replicated, RepNotify)
no
delete all that
no multicasts here
Are you doing your damage stuff on the server?
It should be on server. DamageEvent is supposed on server only in Unreal.
Oh I know but you never know who you're dealing with lol
Ah, maybe not using apply damage at all? Then it kinda makes sense.
erhm
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)
oh so im using apply damage but im multicasting + server it
i should only server it ?
no
only server should be doing that
If you're new, just delete every multicast in your project
haha
they are fine for cosmetics and other non-stateful things
but they are a trap
learn RepNotify
every tutorial sucks
x D
delete that playlist from your head
I think what Adriel means is if you know what you are doing, just be fair to use mutlicasting
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
Multicast chat maybe, cosmetics (play death animation), stuff like that. Nothing that would have any effect on the game a few seconds later.
aye
Remember, all tutorials suck. But this looks like a decent explanation
https://www.youtube.com/watch?v=hbUMaelkqXM
Discord 🐺 https://discord.gg/K28cmFAM5F for devs to lounge & make friends.
Patreon 🐺 https://www.patreon.com/werewolven
You gotta be serializing and oodling that 😄
tbh I'm not even using it 😄 the whole thing ended up being a collosal waste of time
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
Split screen is a thing but unless you want your project to actually have couch splitscreen I wouldn't bother
Just have play in editor launch 2 windows
facing this issue when login in eos any idea why this is happning using 5.1 source and making dedicated server
Hey guys! I wondered if someone know a way to have Chaos Vehicules less buggy when replicated?
Not a lot people can do without specifics. What you're asking is incredibly generic.
How do I make my game more fun?
Number go up
What about golf?
Change the rules
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
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
Mmm, I don’t see any great white balls 😀 on your variables, which suggests they’re not being replicated, and I believe you might need to use onRepNotify when you want clients that join to receive updates
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?
Well the count starts at 0, so 3 is 4, no?
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?
Oh, I didn't know that, thank you!
Just fire up a headless instance of the game, you can do it with command line args
For testing locally, you can play in editor with 2 clients and a background server
will that be the exact same as when I release the game and pay to host a dedicated server?
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));```
Why do you need to?
Usually your code should not care about the players as who is the listenserver.
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()
hence my question - is this the correct way to target the player controller that is the ListenServer ?
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
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...
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
I don't think you should be using GetUniqueID() to identify a player over network, and should use FUniqueNetIdRepl, since that's actually unique across net and will have the same value across server and clients. GetUniqueID just gives you the index into GObjectArray
hmmmm k
GetUniqueID returns a FUniqueNetIdRepl.
mmm k I will see if I can change this code around. Might make a struct to store instead of a FString then
from which class? the only GetUniqueID calls i could see are from UObject and the various ObjectPtr class, none of which returns FUniqueNetIdRepl
PlayerState
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
mmmm so the playerstate has the actual wrapper on it?
yeah, playerstate has this function
const FUniqueNetIdRepl& GetUniqueId() const
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
i feel the same way about working Java as a dayjob and coming to this as a night thing :/
hehe ya
trying to wrap my head around the syntax is frustrating to keep everything in check right now
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)
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
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
How are you spawning them now then?
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.
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.
why does my listen server have movement but my clients dont and how do i fix it (using default top down template movement)
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...
This compendium is meant to give you a good start into multiplayer programming for Unreal Engine.
watch those and youll understand surely
thx
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?
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?
Smooth and slower, or the same speed and stuttering?
Smooth and slower! No stutter
That's a new one. O.o
😄 yea im confused as hell 😄
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
do you have it so your clients can ignore collision with each other? and if so, do the clients spawn using the same player blueprint?
they can collide, and yeah they use the same bp
oh, im trying to make mine not collide
cant you just disable collision then
didnt work
i know, it didnt work
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?
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. ...
is there a way to make default topdown template movement networked
You can try to check Lyra sample and it has a top down mode
Switching by gameplay features I think.
dont know what that is
This one
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.
is it bad to make a whole game using listen server then convert it to dedicated later on?
It's not bad but it is a pain if you do not know exactly what you are doing for the network part.
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?
I remember you can do that in the same network. I'm not sure about internet.
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
I guess so, for us, we just made a simple steam pack and usually works really well.
yes it’s possible, i was able to set it up where people type the IP into a box and click join. I did have to reserve a port though.
You can make the steam pack very quickly without changing much of your online session code.
ahh ok well might look into steam pack
@deep shore by reserve a port you mean forward on your router?
interesting, ill find a tutorial not familar with that at all
Trust me, it is the easiest platform for testing online stuff and usually it works for most of the people on their PC because they can play steam games in 99% of the cases😅
Don't need to worry too much about like shitty firewall or port forwarding shit
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
You can just dive epic's document.
oh whoa they have one, no worries
sorry I meant forward a port and reserve a static IP address
ahh ok what do you mean reserve a static ip?
I was getting my ip my googling 'what is my ip address' is that IP listed correct? hahaa
Or you can use ipconfig to check your public IP
curl ipconfig.in/ip
this command is for your public one
aweosme thanks, same as the one we tried to use but didnt work
so must be port forwarding
but i did try forwarding already
Open the ports in windows firewall too
ah
i think everyone will have to let the app trhough the firewalla s well i think
google DHCP Reservation, there are plenty of walkthroughs on how to set it up. I remember connecting directly via direct IP didn’t work until I did that, it drove me nuts too
Because steam makes the network rules for you
but joseph is making a good suggestion too, i haven’t set up connecting via IP through steam but supposedly it’s pretty painless
ya 100% ill give direct Ip wtihout steam another quick crack then go via steam
thanks for the support both of you
you’re welcome!
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
I copied this video 100% so wtf dont i have networked movement
Discord: https://discord.gg/CHm7RZJ
Project Files: https://www.patreon.com/forsakenreality
UE5 How To Set Up Top Down Template Multiplayer Replication
In this video we will learn how to Replicate the top down template for multiplayer in unreal engine 5. We will go over multiplayer replication for Click to Move and in future videos we will se...
You probably did something wrong, or missed something, or the tutorial is incorrect in some way.
Yeah that's always fun. Sometimes a restart can do wonders.
now i know lol
i get PTSD from hearing/seeing NAT haha
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
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
Yeah, because you need to GetPlayerController 1
Wait, is it local or online? Nevermind if it is online.
im getting an error when i try to save my project and im kinda freakin out
its thru the listen server irght now
So which one gets the correct cam?
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."
So if you want it to be work instantly, you need to blend it as soon as the pawn is possessed.
event tick made it work fine
my player blueprint wont let me use the camera actor ref from the level blueprint appearently... it wont let me save if i do though
any ieas
ideas
Did you have your game running? Or did you open two unreal editor?
neither


