#multiplayer

1 messages Β· Page 706 of 1

dark edge
#

This is a weirdass way to just multicast playing an animation though

#

Why not just multicast Punch and have Punch play MyPunchMontage

#

So control rig can't have keyframed timelines?

#

I'm sure it has some concept of "an animation"

#

play control rig sequence

#

or whatever

torpid mantle
#

hiya, when talking to a server via http.. the json responses you are getting, should those be mapped to uobjects? is this typically how its done, or doesn't matter

halcyon totem
#

I have a question regarding dedicated servers , is there any way to control the game? for sample, if I have 2 different game modes in my game, but when I start my game it starts on TDM, how can someone change the game mode if the server needs to be running?

#

while the server runs it just shoots out code in the DOS looking window, but how can someone change stuff like game modes? if its running in TDM, and someone wanted to play DM how can they change it if they are just clients

#

can anyone recommend any good blue prints or plugin from the marketplace that might have a solution to my problem?

dark edge
#

Console commands, etc. Look at how other games do it.

halcyon totem
#

how about a tutorial to set up a poor mans dedicated server, where for example, I can run a dedicated server on a PC in my room and you could connect via IP? do you you know of any good links?

fathom aspen
#

You see his name up there?

dark edge
#

for building, just google how to build dedicated server and follow the documentation

stark tree
#

Hi, simply want to use the Collab Viewer template over 2 different internet connections. Absolute beginner here, please help. I have 2 laptops and they connect over LAN but not over the internet.

#

I have read the official documentation that asks the port 7777 to be open and stuff. It is open on both of my wifi. It still can't find the other one

scenic turtle
#

Hi all, I would like to select the spawn location of the user, before they travel to the dedicated server. So user will select from 4 spawn points on the startup map and then they travel to the dedicated server and spawn on the locations that they choose. For this I use the override ChoosePlayerStart , GetAllActorsOfClass (PlayerStart) in GameMode and also the Gamestate to create a variable which can be modified from the client side as well. In player controller I create a Run on Server RPC and I try to call that from a trigger box on the startup map, with no luck. I guess It is something to do with the ownership of the triggerbox or I am not sure. If you know some other way to accomplish this, please let me know. Thanks!

marble gazelle
scenic turtle
marble gazelle
hollow eagle
marble gazelle
#

Interesting, didn't know about that, thx^^

odd jacinth
#

,.3

mortal kernel
#

Hey I'm having a camera shake that scales up with a timeline :o how would I replicate this shake? The process rn is the following:
OnBeginOverlap -> Authority only -> Cast to my pawn -> add to an array of overlapping actors-> The player camera manager for the overlapped player-> add that to another array-> then check if all players are overlapping -> if true -> Get all Camera managers (from the previous array) -> Start Camera shake (it's an endless shake that starts with a scale of 0) -> then start playing the timeline which increases the scale over time

old yoke
#

I'm trying to follow the documentation on extending saved move data for the character movement component, but can't figure out where to actually put the data into my custom FSavedMove_Character. I've tried to override FSavedMove_Character::SetMoveFor, but my override is never called.

tidal lichen
#

Hi, any ideas if it is possible to link actors server client manually? For example:

  1. Server spawns new actor 'ServerActor' (not replicated)
    a few minutes later...
  2. Client spawns new actor 'ClientActor'
    a few minutes later...
  3. Server enables replication for actor 'ServerActor' and sends RPC with some ID
  4. Client receives RPC, finds 'ClientActor' by ID and somehow pairs theirs networking stuff,
    so that 'ServerActor' replicates as 'ClientActor' on clients from now on
latent heart
#

You could spawn an actor on the client, like a preview one, and when the server gets around to replicating the proper one just delete the preview.

tidal lichen
#

yes that is also possible solution i had in mind

twin juniper
#

@tidal lichen I don't think it works.

#

Hello guys.Also when I am implementing replication graph I see a line where class names starting with skel and reinst are not added at all?.What are those classes??

livid mist
#

Anyone know why the rotation of a player isn't replicating to other clients? The code that happens when you're rotated is replicating, but visually the player does not rotate for anyone but themselves.

twin juniper
#

Are you doing it via anim bps??What do you mean visually

livid mist
#

No, the rotation of the capsule changes. But the clients can't see each other rotating

twin juniper
#

A video might help

livid mist
#

one sec πŸ™‚

#

Also my character is acting strangely too. I'm reworking a lot of my code, so temporarily I set the character model to play just 1 animation, but for some reason it's only playing the idle and not the one I selected.

#

The player doing the rotating can see the rotation happening, but the other can't

#

Give me a moment, I'm recreating my bp from a fresh one. I'm still learning so may need to start fresh

twin juniper
#

Try to do a multicast of your rotation

mortal kernel
#

Is Global Time Dilation replicated? or do I need to do that?

prisma snow
#

Just so you don't have the same problem as I did, it can happen that some json field changes and then the matching struct field will be empty. Once I spend a good while debugging and it was a change in json naming, nothing on my end

floral crow
#

[2022.04.04-18.50.30:925][ 8]LogNet: Warning: UActorChannel::ProcessBunch: SerializeNewActor failed to find/spawn actor. Actor: None, Channel: 12

Any idea of what could be causing a replicated Actor to be "None" on a client? This is during a seamless travel. The client immediately crashed as soon as the seamless travel finished

floral crow
winged badger
#

this generally happens when server sends a NetGUID for an Actor with a static NetGUID that the client doesn't have

#

since this happened right after loaded world

#

i don't think you messed around with spawning actors with matching names on server and client

#

with IsFullNameSupportedForNetworking being true

#

other options include some Actor classes not being loaded on client

fathom aspen
winged badger
#

you can, only if you're connected to dedicated server lobby beforhand

#

otherwise there won't be a playerstate to persist

fathom aspen
#

ofc

#

Isn't he?

fathom aspen
# fathom aspen I've done something similar in the past. You can look into `APlayerState::CopyPr...

Here is a spawn system I worked on, where you can join a lobby in progress, pick a zone you wanna spawn in from the map menu, and based on that you will be spawned in that corresponding zone. The system is really customizable, you can keep picking different zones as long as the zone is not full. The system is also optimized and work smooth with ...

β–Ά Play video
fathom aspen
winged badger
#

if you're not connected to dedicated server lobby

#

you can still stash the location in PlayerState

#

use the APlayerState::PostNetInit override to RPC that location to server

#

and then run the HandleStartingNewPlayer on server from that RPC's _Implementation

#

the PlayerState would need to pull that information from something persistent though, and PlayerController is better for this use case, as it will replicate first due to its higher NetPrioerity, making starting delay less

fathom aspen
winged badger
#

you could, in theory, pull the game info from session data

#

then have a lobby on your own local machine

#

in case you are hot joining into an ongoing match, for example

#

in that case your connect to dedi is a hard travel, and you don't have a PS persisting

fathom aspen
#

Ah I get it now. thanks!

floral crow
floral crow
# winged badger i don't think you messed around with spawning actors with matching names on serv...

I'm adding an actor that should be carried over through SeamlessTravel using GetSeamlessTravelActorList. It makes sense that it is this actor the one causing issues, but I don't get why.

Here's how I'm adding it to the list. Is there something wrong with my approach?

void AMyPlayerController::GetSeamlessTravelActorList(bool bToEntry, TArray<AActor*>& ActorList)
{
    Super::GetSeamlessTravelActorList(bToEntry, ActorList);

    AActor* MyActor = UGameplayStatics::GetActorOfClass(this, AMyActor::StaticClass());

    if (IsValid(MyActor))
    {
        ActorList.Add(MyActor);
    }
}
rancid orchid
#

This question may actually be better here:
What is the more common pattern:

  1. Tell TDM GameMode player has died: OnCharacterKilled(...)
  2. GameMode records score / kills and stores them in itself.
  3. GameMode updates Gamestate with the data copy (assume in any way).

or

  1. Tell TDM GameMode player has died: OnCharacterKilled(...)
  2. GameMode tells the game state to update its score.
    So in this case GameState acts like a Model. But this also makes the game mode coupled with the specific game state.
fathom aspen
latent heart
#

Game mode is about flow, game state is about... state.

fathom aspen
#

GameState is the class that does this

rancid orchid
#

I understand GameMode is flow

#

but to flow you need Data so to get data you need to access the gamestate?

#

second approach makes you always access the game state for this data.

fathom aspen
#

FYI GameState is a property in GameMode

#

It's meant to be that way

#

From AGameModeBase.cpp

rancid orchid
#

Thats all im asking, if it was designed to act as a model, which seems like it may be,.

quasi tide
#
  1. GM says "50 kills to win"
  2. Character dies - tells the GS. GS checks if the current score has reached the limit set by the GM
  3. GM ends the game when it has.
rancid orchid
#

That explanation has a flaw I think, GS is checking the win condition, I assume GM should be doing that.

latent heart
#

I would say the character dying should go to the game mode and the game mode udpates the game state.

fathom aspen
#

As long as you're on the server, it doesn't really matter

latent heart
#

And the GM checks to see if the score limit has been reached

#

The GS shouldn't handle that sort of stuff.

rancid orchid
#

It matters mostly for readability and in larger teams so im trying to wrap my head around most used pattern πŸ™‚ .

latent heart
#

GS should handle holding vars and rpc broadcasts to all players about game stuff

rancid orchid
#

I agree with Daekesh, sounds like UE is designed for GS to be a large Model class (somewhat)

quasi tide
rancid orchid
#

I kinda dislike the pattern set πŸ˜‚ but its not far from what I would do.

#

Cool cheers, that kinda solves that.

quasi tide
#

It's probably overall easier to do things like you said, due to the GM guaranteed to be on the server only. But really, just do what is understandable to you.

#

I do it this way because GS is the "state" of the game and GM is the "rules". So to me, when the state changes (adding 1 point for example), the object responsible for handling state should be the one to change it.

#

Could just as easily reason about that GS is just a representation of the state of the game, where the GM makes sure the rules are followed as well.

latent heart
#

I prefer a MVC approach myself.

quasi tide
#

Either is fine imo. The most important thing, imo, is that you understand w/e way you work with.

latent heart
#

That is one of the advantages and disadvantages of UE. There's 50 ways to do everything and 1/2 of them are probably correct.

fathom aspen
latent heart
#

Why when the GM updates the score itself?

#

GS->SetScore(x); If (GameHasEnded() { EndGame(); }

#

Or GS->AddKill(player); etc

fathom aspen
#

Ah ok I thought that this would be done using delegates , totally forgot the classes are interchangeable πŸ˜›

latent heart
#

In my ideal world, the game state wouldn't even know about the game mode!

quasi tide
#

Yeah, but 1998....

fathom aspen
#

passed away long time ago lol

quasi tide
#

It was a lawless time back then

latent heart
#

It's pretty lawless now in UE.

winged badger
#

best to have your GameMode stash a pointer (and spawn it if its spawned) to the persisting Actor

#

im guessing it is spawned here, how is it spawned?

twin juniper
#

Hello guys.Also when I am implementing replication graph I see a line where class names starting with skel and reinst are not added at all?.What are those classes??

floral crow
winged badger
#

if it persists through semless travel

#

it should be spawned by server, and replicated

#

never spawned locally

floral crow
#

It is spawned by the GameInstance, on the server. Do you reckon it would be better to spawn it by the GameMode instead? I put the property on the GameInstance as a guaranteed place to keep a ref to it on clients as well

winged badger
#

it would, because it removes the need for that awkward GetAllActorsOfClass

#

also, c++ has better options for that, too

#
for (AMyActor* MyActor : TActorRange<AMyActor>(GetWorld())
{
}
latent heart
#

You could spawn it on the game mode and set the refernece on the game state

winged badger
#

i spawn my persistent actor from base GameMode (shared by lobby and game levels)

#

i stash the pointer in the GameMode

floral crow
#

In fact, it is the GameMode that does the spawning actually

AMyGameMode::InitGame(/* params */) {
  // code...
  UMyGameInstance* GameInstance   = GetGameInstance<UMyGameInstance>();
  GameInstance->SpawnMyActor();
  // code...
}```
winged badger
#

and immediately set it on base GameState as well

#

@floral crow do it right after Super::InitGameState

#

that is the perfect place for it

floral crow
sharp hornet
#

Over time I've moved more and more things to GameState because it's hard to predict what you might want replicated, and my GameModes have gotten pretty small

#

If cheating is a concern you definitely don't want things on GameState that you are trying to hide from clients

shrewd tinsel
#

can i replicate variable from client to server and then to all clients without rpc?

pallid mesa
#

replication goes server -> client only

shrewd tinsel
#

ok thanks

#

can i make it so client cant spam rpc?

#

if i make rpc not reliable

#

will the rpc go to server 100 percent but not instantly or there is a chance it wont go through at all?

pallid mesa
#

afaik unreliable rpcs aren't resilient towards packet loss

shrewd tinsel
#

what does that mean?

pallid mesa
#

that unreliable rpc's don't ensure that the data will arrive to the endpoint

shrewd tinsel
#

gotcha

#

thanks

pallid mesa
#

np :)

livid mist
#

Found a tutorial for multiplayer gun rotation that might help me actually

latent heart
#

Yup

livid mist
#

😭

#

I just need my rotation to replicate...

#

Everyone always links to that as the answer and it's 404d

faint eagle
#

is GetWorld()->GetTimeSeconds() synchronized amongst all clients and server?

shell mantle
#

I'm new to multiplayer and unreals replication, when making a client -> dedicated server game, which character variables should be replicated and which ones shouldn't be? Like health and what not should be, but if I want to implement a god mode system would IsGodMode variable be replicated?

prisma snow
shell mantle
#

So because you would want all the health calculations to be done server side IsGodMode doesnt need to be replicated?

sinful tree
shell mantle
#

Ok I see, thank you guys for the help.

final quest
#

Hey! does someone knows how/where i can get an dedicated server for online multiplayer

fathom aspen
dark edge
plucky topaz
# final quest Hey! does someone knows how/where i can get an dedicated server for online multi...

READ BEFORE WATCHING
We have recently updated our tutorials so please watch those instead for the recommended approach to integrate GameLift with Unreal Engine.
New tutorial: https://youtu.be/tOy0xYaP3wA

Part 2: https://youtu.be/2I8JDeMGkgc

In this tutorial, we're going to show you how to host a Unreal Engine dedicated serv...

β–Ά Play video
dark edge
#

Is there any way to make joining a server seamless? That is, completely transparent to the player?

pallid mesa
#

no loading screens using the same map you mean?

dark edge
#

Yeah same map, there's only ever one level in the game

#

Everyone launches game in listen server

#

The game loop is a bit like Diablo with its town -> teleport -> dungeon loop but spaceship -> teleporter -> ground level, and ground level is procedurally generated

pallid mesa
#

so many sessions open where any player could join, like in dark souls

dark edge
#

but I'd love to do Spaceship -> teleporter -> Hosts Spaceship without a hard cut

dark edge
#

We're trying to be 100% no hard cuts from game boot up to game exit. Only hard cut right now is joining another game

#

I suppose the teleport transition would be the place to hide it, if it's a full screen VFX of some sort

pallid mesa
#

puf... not sure how seamless you could do it with native unreal travelling methods... you can for sure bring over your position to the new server but the pawn will pop in

dark edge
#

I'm fine with some sort of full screen effect filling the screen then fading to show your dude on another ship, just want to avoid hard cuts to black or a load screen or whatever

solar stirrup
#

AFAIK first connection is always hard travel

pallid mesa
#

you pass by the transition map... afaik... so maybe a fade on viewport does the work

solar stirrup
#

I think I heard something about someone modifying the engine to allow for seamless connection right off the bat, but that'll take a lot of effort

dark edge
#

On failure you're still on your ship and your ship AI is giving you the error message in game

pallid mesa
#

definitely a good problem

dark edge
#

GameInstance would survive right so that's where I'd have some TeleportVFXIntensity scalar

pallid mesa
#

@solar stirrup think so, although not speking about the actual seamless travel from the engine. When I mentioned "seamless" I meant without artifacts haha

#

viewport survives, local player survives afaik, gi survives aswell...

#

local player survives? not sure...

dark edge
#

As long as I can make it visually appear no different then the teleport to ground that'll be fine.

pallid mesa
#

yes I think you'll be able to pull it off specially if you don't need to do any first load

tawny parcel
#

I've got some actors that have somehow become stuck unloaded, if I drag select on the entire World Partition and right click to load, they still dont become loaded. I see the unload all, but is there a load all actors?

Update: Ended up just re-creating the level from a past copy.

gleaming vector
#

@sharp hornet or @flint patrol how much player count testing did you guys do for Lyra? Is there a safe estimation of player counts possible without any significant changes to the codebase? (I don't see a Replication Graph implementation, so I don't assume it's too high)

flint patrol
gleaming vector
#

rad, thanks for the answer

#

is rep graph on y'alls todo list?

flint patrol
#

TBD

#

or rather, yes on TODO list, TBD on if/when

#

basically, no promises on what arrives in any given release until it's already checked into the depot, but yeah we think it'd be a good idea to demonstrate the rep graph in Lyra

meager flare
#

On Lyra kit, are we actually playing other people or are those just really lethal NPCs? Cause dayum

flint patrol
marble rune
#

these AI are probaply better than the usual shooter player, lol

flint patrol
#

you can also make yourself invulnerable with "UnlimitedHealth 1" (you still take hit reacts but never lose health) or "god" (toggles invulnerability) cheats, which can also be set to run each PIE in the editor preferences

gleaming vector
meager flare
ember dagger
#

So Im trying to update the visiblity of a spot light on my player once the player spawns so that only the client doesnt see the light source for themself, but everyone else can see it. However, when updating the visibility of the light source it works for the server (The server cant see the light source, but other players can). But when I update the visiblity for the clients, the visiblity changes, but the server is unable to see that light source. Ive tried calling a run on server event from my begin play to a run on owning client and that doesnt work. There is no only owner see for light sources or only relevant to owner. Is there any way I can get this to work? Or something Im failing to do correctly? Ive noticed that the problems shows when updating the visiblity on the server (ie, when changing the servers visiblity for the flashlight, the server sets everyones flashlight visiblity for themself). Thanks.

dark edge
#

@ember daggerTry "Owner No See"

ember dagger
#

that doesnt exist on lights

dark edge
#

Is the spot light a component on the pawn or an actor in the map or what

ember dagger
#

a component

dark edge
#

K just on begin play -> is locally controlled -> set intensity to 0 or whatever

ember dagger
#

that results in the same things. (ie when servers sets their intensity, it also updates everyones intensity to 0 for the server)

golden stirrup
#

Do anyone have the problem, when i spawn a Pawn or Character in multiplayer the clients gets 2 actors spawned while server only 1, after some time i deleted the PawnMovement and give a try, it spawn 1 actor on Client and 1 actor on Server, so i put back the PawnMovement, now i get 2 actors on client and 1 on server

rocky topaz
#

I am working on a coop game and I want players that join a coop session to be able to resume the game alone if they want to, which means I need to replicate the save game data, I was wondering what would be a good way to do that without resending the whole saved data every time

#

I'm considering making the data to be saved replicate once when the client joins then any update to it would generate a reliable multicast to make clients replicate what just happened

dark edge
rocky topaz
#

I could just make this TMap replicated all the time but I feel like it might make things slow and with potentially thousands of FNames in it I feel like passing it over at every update is probably a bad idea

twin juniper
#

Hello guys.Also when I am implementing replication graph I see a line where class names starting with skel and reinst are not added at all?.What are those classes??

flint patrol
# twin juniper Hello guys.Also when I am implementing replication graph I see a line where clas...

internal implementation details for blueprints in the editor. skeleton is kind of (it's complicated) the 'header' for the class generated by a BP, with the functions and member variables but no code; and reinst are old versions of a class for instances being replaced during the reinstancing process when you recompile a BP (they should never be seen in practice but stick around after the recompile until the next time GC is run)

twin juniper
#

Okay great.Thanks

flint patrol
#

there's no flag for SKEL, but reinst can also be filtered out by CLASS_NewerVersionExists

#

instead of funky string matching

twin juniper
#

hello guys

#

so iam working in 4.27
i started blank project and now i want to make an multiplayer using this project

#

my first issues is iam unable to replicate character

#

how to do that?

#

in 3rd person templet it will be by default right but not in blank project how to do that?

#

i turned on replication

#

also

#

when ever i play iam getting default pawns not my characters

fathom aspen
#

You have to specify your pawn class in your GameMode settings

twin juniper
#

ok let me check

fathom aspen
#

Also make sure the level uses the relevant GameMode

#

(By making the GameMode the default or by setting it in World Settings tab)

twin juniper
#

ya i did one

#

and only one player is spawning when i select 2 player and play as client

fathom aspen
#

What's the other player then? default pawn?

fathom aspen
twin juniper
#

ya the problem with player controller now its working

#

thx @fathom aspen

#

any beginner courses for multiplayer using c++

#

can any one suggest me one?

fathom aspen
#

Tom is a really good instructor!

twin juniper
#

thx dude i will check

#

this

loud frost
loud frost
# loud frost

I set throttle input in event beginplay , so it automatically move , but one player automatic move and other not move

stark tree
#

Hi, can I do the following?

  1. Build UE4.27 from source and host a dedicated server
  2. use Oculus Quest/Quest 2 devices connected to different Wifi networks (important that its not LAN) and have them join the server
  3. They are able to see each other, establishing very barebones multiplayer
#

I need to know if its possible because building the UE4.27 source will take a few hours and I wanna know if its worth the time. Thank you.

summer tide
#

Hi- I attached my player to another character, not posses. I pass player’s move forward axis value to the character and to add movement input using server rpc. The motion doesn’t appear smooth on client but works fine on server.

latent heart
#

Do it on the client too to "simulate" the server response or it'll never be smooth on the client.

rancid orchid
#

Second options means the character will be behind and may look like it has lag (which it will), but depends on what you need.

winged badger
#

CMC is tightly coupled with Character, PlayerController, assumption that predicted Pawn is ROLE_AutonomousProxy and assumption that the predicted Pawn is possessed

#

you can move non-possessed Pawn predictively with the CMC, but it requires a few alterrations to it

#

also, you can push your another character's InputComponent to the Controller's stack, instead of forwarding the inputs

summer tide
winged badger
#

pushing the input component, no

#

that was just a side note

#

i find it cleaner that way

nova wasp
#

I imagine you would have to send movement to the character locally first

#

While sending it to the server, like daekesh said

winged badger
#

not sure the crude prediction suggested there would hold up in production level test

#

there is no replay capability there

summer tide
#

What if instead of movement input I pass the axis values to play looped anim montages? Would the player jitter on the character ?

winged badger
#

when autonomous proxy receives a timestamped position update, it replays all its FSavedMoves done after that timestamp

nova wasp
#

And will the server accept saved moves from two clients...

winged badger
#

and then applies that result to the position

#

sending moves locally to autonomous and RPCing them to server at the same time doesn't have that capability, so it will still jitter

#

less, but it will

tidal lichen
#

Hi, does anyone know if it is possible to replicate properties to specific clients only? Using RPCs it is basically possible to send data to specific client through player controller, but properties?

#

For example some treasure box, lets say i want to sync some properties with every client and some properties with clients that are very close to that box

pallid mesa
#

that's what netcull distance is for

#
  • the replication graph and IsNetRelevantFor
#

basically the definition of what makes 2 pair of actors relevant to each other

#

that's per actor granularity

#

so... I think there is no way to do granular property filtering (besides the rep conditions) unless you go deep into a lower level

winged badger
#

more like rewrite half the replication framework @pallid mesa

light iron
#

They did say deep.

wild patio
#

can someone explain to me how SetActorTransform works in replication in a character actor? I set "replicate movement" to false, and then did SetActorTransform on the character actor client side, and it moved the character on the server

#

i understand i might want the character to also move on server, but if I explicitly say "do not replicate movement", the expected behavior is to not replicate this to the server.

#

i imagine there's something i'm missing. but i'd love to understand this better so i don't get burned by it in the future

twin juniper
#

Guys can I connect to a dedicated server from browser app

#

Basically I have to host my unreal app on browser and I am looking to connect dedicated server from it

plucky topaz
#

Question about standard version of Unreal Engine across the team.

If I working on a multiplayer game, that needs to build a dedicated server, to build the dedicated server the project needs to be built with an UE version build from source (Not from the Epic Launcher).

Does that mean that the whole team needs to also have a version of UE built from source? Or just the person building the server?

winged badger
#

you don't need a dedicated server if you don't plan to distribute it that way

#

and only the one that builds the server needs to get and compile source

light iron
#

Anyone know best method to maintain set master pose mesh combination after travel?

fossil veldt
#

Anybody know as a good way to dump all the metadata / session settings from a session result? I'm trying to do this```
FString Test;
Result.Session.SessionSettings.Get("OWNINGNAME", Test);

graceful shard
#

mind blanking, please help, quick Q:
Is the role of the local player's pawn also Role_Autonomous_Proxy or is that only the Controller's local role?

shy osprey
#

Anyone familiar with why there might be a bit of a lag after the client triggers postlogin? It's making it difficult to set up proper input handling. I get possessed but it's like none of the PC is completely initialized yet

sharp hornet
#

There's always going to be some lag for initial replication of a player controller/player state/pawn. There's not really any control over what order you get things in so you'll need to set up rep notifies for whatever data you need to setup input

peak notch
#

if i set player speed inside the Character blueprint class like shown in the picture can a player change the value of that(basically Hack)?? if so should i use an event for that and set the MaxWalkSpeed inside OnServerOnly Event and then multicast to all clients?

dark edge
peak notch
#

i am but in the above i basically want to know if a player can hack and set there own value into the set Max Walk speed since it's inside Character blueprint class only

ember dagger
ember dagger
#

Okay, well using this process in the player controller seems to solve my problem

twin juniper
#

Guys can I connect to a dedicated server from browser app.Basically I have to host my unreal app on browser and I am looking to connect dedicated server from it

vocal scaffold
twin juniper
#

So instead of default replication graph I need to set this one

vocal scaffold
twin juniper
#

How to swap them.

twin juniper
#

Thanks for Info.

polar lotus
#

hasn't HTML5 been deprecated and removed

#

since 4.24?

#

or are you just using 4.23

loud frost
#

Any best multiplayer tutorial ??

dark edge
twin juniper
#

@loud frost there are some in youtube.

#

Hello guys.In replication graph we have two modes.One is spatialize static and spatialize dormant.What is the difference between two.Like I know we can change dormant to dynamic and static.So if I have an actor as static will it not replicate anything at all.??I have guns which I just need to spawn on server and then on they don't need to replicate at all.But once they got destroyed on server they need to destroyed on all clients.Which one should I choose

stark tree
#

Hi, can I take the new Unreal 5 multiplayer game Lyra, take it apart and use it for a VR meeting app? I just need to use its multiplayer and I need to do it over the internet, not LAN

dark edge
stark tree
marble gazelle
#

Well Multiplayer it self works out of the box with unreal. The challenge might be voice chat and replicating the users movements.

prisma coral
#

hey everyone. I am having an issue in my project where the host gets unpossessed from its pawn whenever someone else joins and im just not sure why?

marble gazelle
#

Did you implement who possesses what?

prisma coral
#

no the pawn im using is just the default pawn for the level

stark tree
marble gazelle
marble gazelle
dark edge
stark tree
stark tree
prisma coral
twin juniper
#

Hello guys.I am using replication graph and add network dormancy is not working at all.Whenever I spawn an actor and watching it through debug it is always in dynamoc bucket

vocal scaffold
twin juniper
#

hello guys

#

iam spawning an actor and its working in server and clients can see it but when iam trying to spawn the same actor inside client only the owning client is able to see it and interact with that, but in server cant see it and another client is able to see it but unable to interact with that

#

in wall.h in 87 line thats the function and in cpp line 95

latent heart
#

Spawning an actor on a client will never, ever, be replicated to the server or other clients

twin juniper
#

then how can i spawn that actor?

latent heart
#

Spawn it on the server.

twin juniper
#

how to do it?

latent heart
#

If you have some sort of building system (I guess?) send a server RPC telling hte server what you're doing.

#

The server will implement the action and the results will be passed down to all clients.

twin juniper
#

ya i have one building manager

#

over there iam just checking what build i have now like wall, ramp , slap etc

#

UFUNCTION(Server, Reliable, WithValidation)
this is the one right to send server rpc?

latent heart
#

Yes.

#

You need to call it on a valid actor, though.

twin juniper
#

ya i did that u can check over there

latent heart
#

Player pawn, player state or player controller

twin juniper
#

so i cant call that in this wall.cpp ?

latent heart
#

You cannot spawn an actor on the client and then send an rpc from that actor to the server.

twin juniper
#

ok let me try that

latent heart
#

You cannot send a server rpc from any random actor. It must be one of the client's authoritative actors.

#

I would suggest something like: UFUNCTION(Server, Reliable, WithValidation) BuildObject(TSubclassOf<AMyBaseBuilding> ObjectClass, FVector Location) On the player controller.

twin juniper
#

how to know its clients authoritative?

latent heart
#

See the 3 classes I listed above

twin juniper
latent heart
#

Yes

twin juniper
#

ok i will try once

latent heart
#

As long as your character is spawned on the server

#

(it probably is)

twin juniper
#

ya

kindred gazelle
#

How do I simulate a bad connection in editor again? I very vividly remember an option to simulate a 300ms connection but I can't remember where this is. Anyone know?

marble gazelle
#

next to the play button there should be a dropdown and something to open some settings for multiplayer, there you should be able to set them

fathom aspen
crisp wraith
#

Hmm, how would you go about doing a lootable item, that has it's own state for each player but is still managed by the server?
Let's say, I have a pickable actor that gives 1 herb and I want each player and any late joiners, to be able to pick it up once, regardless if other player already picked it. If player picks it up, it is destroyed/invisible for that player, but others still have their state.

Thought about two options:

  1. One server instance for each player, player is owner of that instance, instance has only owner can see. Meh, because we have multiple instances on the server for each player, you have to manage them for late joiners
  2. Just add a map to that pickable with data who picked it up and how many he has left, if 0, hide it locally and prevent server and client side interaction requests.
marble gazelle
# crisp wraith Hmm, how would you go about doing a lootable item, that has it's own state for e...

I have such a system in place. My current implementation is to have a "unlock" per such an pickable item and check if the player can unlock it again or not. (To reduce the amount of keys for this, I allow to unlock it based on Flags. so I can use 32 pickable positions perk Unlock)

What I want to do: Have a Max amount per Pickup the player can pickup, then on the server just store per player if an pickup was picked. as soon as the max amount is reached, all other pickups can't be looted by this player until the reset. But here I need to think about some more details.

You also could just delete the object only on the client and still have it in place on the server \o/

weak copper
#

EOS NOT WORKING ON ANDROID.
I enabled the plugin,added my IDs,edited the engine.ini with what is given in website.Should i add more code to engine.ini for support for mobile/Android?!
Iam making a multiplayer game.
USING UE5

blissful saffron
gritty pelican
#

Need help with NetΠ‘ullDistanceSquared. If I use Pawn, NetΠ‘ullDistanceSquared does not work on other pawns. Why?

gritty pelican
#

When the client approaches the distance at which Pawn replication should start, it does not work

#

For example. I control Pawn and approach another Pawn, but NetCullDistanceSquared does not work

#

@solar stirrup

solar stirrup
#

Does it never get culled?

gritty pelican
#

yes

#

Only if Pawn is initially in this distance

#

But if he is beyond this distance, then it does not work

livid mist
#

Quick question... I've been advised that doing custom movement replication via blueprints instead of C++ is not the correct way to do it. Is it gonna be a huge problem to do it in Blueprints though?

ocean geyser
#

question. lets say i have 4 arrays of components that are replicated. to reduce the server load checking to see if theses arrays have changed and replicating them, would it be faster if i threw them all into a single struct and overrode whichever operator (im assuming ==?) that the server uses to compare the data to see if a property has changed? in my head this makes sense assuming it checks structs in the way i think. one comparison to see if a struct has changed and just replicate it if it has changed (its only to the owner, does not change super often, and they are fairly small arrays of just a few elements so its not a big deal to replicate all at once). i assume this would be better than to check each array to see if they have changed and replicate whichever array has changed. any idea how UE handles struct replication? does it replicate each marked member in the struct individually or does it do the entire struct?

ocean geyser
livid mist
#

Oh no 😭

ocean geyser
# livid mist Oh no 😭

idk why the videos are so dark when recording UE5 but its visible. dont worry its a full tutorial series to on how to do it with the movement component so you can follow along and try to atleast get the base of it setup so its easy to add things later.
https://www.youtube.com/watch?v=ixNGvOYkbno&list=PLnHeglBaPYu9YIxrnIEYuiEQArGW3_upu&ab_channel=SneakyKittyGameDev

livid mist
#

Thank you!

#

Is it easy to adapt the code to other types of movement? I will have sprinting, but I'm also going to have flight as well

ocean geyser
livid mist
#

Yea, I'm using the flight movement mode, but it has some custom code that happens when it's on so that it propels you forward

#

Is that enough for it to replicate ok?

#

I'm gonna also need controls like pitching and rolling

ocean geyser
livid mist
#

But to actually edit the movement component, you need do it with C++ right?

#

I have some blueprints that add velocity depending on your pitch and stuff like that

ocean geyser
# livid mist But to actually edit the movement component, you need do it with C++ right?

correct, not with the general movement component though, id checkout his videos and see if its worth it for you
https://www.unrealengine.com/marketplace/en-US/product/general-movement-component

Unreal Engine

Save hundreds of hours of work with this innovative locomotion framework which completely replaces Unreal's built-in character movement with a much more comprehensive and easier-to-use alternative - no C++ required.

livid mist
#

It happens on tick if a flight boolean is turned on, probably not ideal but not sure how else to make it

#

oof that is pricey

ocean geyser
#

si. hopefully in the future epic will overhaul the movement component but who knows if or when but it beats rolling your own system

livid mist
#

I mean I guess I'll try to manage with what I've made, and if it doesn't work well then I'll just make my game singleplayer, I guess πŸ€·β€β™€οΈ

#

When I do client testing it works great, but I also have no ping difference between the two players since they're both me... No idea how it's gonna actually work in practice.

ocean geyser
livid mist
#

ty, I'll try it

#

Uhhhhh

#

That's weird... When I set one of the players to 300 ping, the other player disappears as soon as I tab into their window

ocean geyser
livid mist
#

now when I play it's just a black screen. wtf

ocean geyser
livid mist
#

If I play the game, do netemulation off, then close and restart, it works again

#

yea if I do anything with netemulation the other player just disappears

#

is there anything here that needs to be enabled?

ocean geyser
livid mist
#

Something with Unreal, or something I did?

ocean geyser
livid mist
#

damn

#

I'll try it with a blank template project

#

hmmm. When I do it in the thirdperson template, the players can still see each other, but they can't see each other moving anymore when I set the ping to 300

#

got the black screen issue again

#

omg I was using the wrong command.. πŸ€¦β€β™‚οΈ

#

I was doing packet loss instead of packet lag. lemme go try it again

ocean geyser
#

that would explain alot lol

livid mist
#

hmmmm interesting. When I set the ping high, the player I play as jitters all over the place, but the other player can see them perfectly smooth.

#

What is the cause of this?

#

They both have 150 ping

#

If I try either one, they both jitter super bad but look smooth on each other's screens

ocean geyser
livid mist
#

Aww 😒

#

But even walking is jittering. That has built-in replication doesn't it?

ocean geyser
livid mist
#

They should be

#

There is no sprinting, just default walking. And it's jittering

ocean geyser
livid mist
#

Yeah

#

It's basically a modified third person template character

#

I do have a variable on walking, I guess I can remove it and see if its fixed

#

Nope

grizzled stirrup
#

When calling UGameplayStatics::PlayWorldCameraShake in a PIE listen server session clients also play the camera shake even though it states that it is not replicated

#

Is this to be expected in PIE since it's running on the same instance and wouldn't happen in a standalone game?

#

Hmmm even though the comment says "Not Replicated"

#

Wow yeah looking through the code it does seem to iterate over all players haha

#

And call client RPCs

#

Why the "Not Replicated" comment πŸ˜„ Was wondering where these ghost shakes were coming from

blazing spruce
#

Hi, is there a specific class that I should have my session code in for hosting, updating, joining sessions?

fathom aspen
#

If you want to just be able to call it though, BlueprintCallable is sufficient

obsidian gyro
#

I have this actor that spawns a weapon randomly from an array every 25 seconds. It works a few times, but then it randomly stops spawning them.

#

this is how I do the timer for spawning them every 25 seconds

#

and this is to spawn the weapon.

#

Any Ideas?

#

wait nvm I found the problem

#

sometimes the problem is right in front of your eyes

#

sorry

dusky yoke
#

Hey guys, Im working on setting up RenderTargets for my scopes. They seem to be replicating eachother's RT's (host sees client's RT, and vice versa) - apparently adding this code (see YT picture) to the scope itself should resolve that, but Im not sure how to convert this to BP, and my check seems to return false:

ember dagger
#

Im trying to set up a footstep system and for the most part it functions as necessary, but when i play it on a listen server with 2 people, the distance moved variable increase at a slower rate than when i have it playing with a single player. How would I go about fixing this?

fathom aspen
#

Your cast should be returning null there

fathom aspen
dark edge
dark edge
dusky yoke
dusky yoke
dark edge
#

What are you trying to do, just do a scoped view?

dark edge
#

In the scope
Begin Play or OnAttach -> Check if attach parent actor is locally controlled (You don't wanna render other ppls scope view if you like framerate) -> enable scene capture

#

So on every machine, the only scope that is actually capturing the scene is the one that is held by the local player's pawn

dusky yoke
#

Oh, I was doing it in the gun itself, I guess doing it in the actual scope is better yeah. Struggling to get a true cast on the Local Controlled check though πŸ€”

dark edge
#

Although you should just set owner on the gun on spawn / pickup so the gun can just check if self is locally controlled

#

er yeah is locally controlled is a pawn property so just crawl up the attach heirarchy (or do the setting from the pawn -> gun, my preferred method) setting some variable to let the gun know it's held by a locally controlled pawn

lost inlet
#

necroing this a bit, but why would would Punch() be a BlueprintNative event? where are the BlueprintImplementableEvents called from? why does the BP need to care about client/server through separate function calls?

#

since I imagine the BP will be mostly just playing cosmetic effects, unless that is not the case

#

but I feel that's overexposing a single thing to BP

sand smelt
#

is OnRep sort of slow or is the update to PlayerState kinda slow? I have a OnRep in player state that set a the material for a pawn's skeletal mesh but i noticed a small delay on clients

#

all blueprints if that matters

sand smelt
#

ty

dusky yoke
#

*updated

dark edge
dusky yoke
#

Hmm, I'll rearrange the referencing! πŸ™‚

#

Working on an alternative way of respawning my characters upon death now, so instead of destroying them and their weapon BP's I'll just simulate their physics, spawn a spectator pawn & reset all of the players values as they're teleported to a random playerstart. Can I use Event Posessed for resetting the values? It says its mainly meant to be used for Standalone

primal relic
#

Hey guys, does anywhere know a good place to look for game economists/strategists?

Whether it be discords, forums youtube etc?

chilly nymph
#

im making a multiplayer game and i forgot how to give each player its own health can anyone help?

dark edge
#

But if you're that new, don't start with multiplayer.

chilly nymph
#

no i have decent experience with how it all works i just forgot how to do it (i did this a while ago and im touching up on it)

latent heart
#

Even so, don't start with MP if you don't know how to do that!

chilly nymph
latent heart
#

If you insist.

chilly nymph
#

yes i know i be dumb i forgot how to the basics

candid escarp
#

Hey people! How would I realise a lobby - pick champion system like League of Legends and others when I use different maps for those? Saving the picks in the game instance would be my idea, but how would I know WHO picked WHAT? Thanks!

latent heart
#

Player states continue across map changes, I think. Or you can make them do taht.

#

Link player state to character choice.

candid escarp
latent heart
#

Yeah. I'm sure there was a list of actors you could supply to bring across.

candid escarp
#

so I can look for if player state equals player state of choice or a variable of player state like player state get player name?

#

Thank you very much this helps a lot

latent heart
#

No worries. Good luck.

candid escarp
#

Thanks!

fathom aspen
fierce fiber
#

For some reason, my Switch on Int isnt working, and I think it has something to do with the way Im casting to the bp_player, as Im trying to grab the specific player

fierce fiber
fathom aspen
#

I don't think we understand each other

#

Is this a multiplayer game with different players eg. multiple player controllers?

fierce fiber
#

Yeah

#

4 player local multiplayer, one shared camera

fathom aspen
#

Ah so it's split-screen

fierce fiber
#

Yeah haha, my brain is frizzled so I just completely miss read sentences for a second haha

fathom aspen
#

Local multiplayer = Split-Screen

fierce fiber
#

Yeah its split screen

fathom aspen
#

I haven't done local multiplayer myself, but I guess you can't do GetGameMode on client, you must be on server

#

So that Timer event there if it's firing on client...

#

Also I'm not sure what you mean by it's not working

#

Is it executing?

fierce fiber
#

Alrighty Ill explain what happens

#

So the cast is working, it doesn't fail, it plays the anim montage, but then, when it tries to fire the switch int node, it goes straight for the default output instead of targeting the designated variable that is assigned to each player

fathom aspen
#

Ok what's Class Number value before that?

#

Debug your code and watch the value

#

Or print it out

#

Also where do you call this Timer event from?

fierce fiber
#

So, when the player chooses a class, the class number var is called into the player, and assigns a class number to that specific player, this variable has been tested and it fires perfectly fine for each local controller, but for some reason, when called into this switch int node, it doesnt want to fire to the specific number, also this timer event is in the enemy blueprint

fathom aspen
#

I wouldn't save such a property on the player character class

#

PlayerState is where it should be

#

this timer event is in the enemy blueprint
Where do you call it from though?

fierce fiber
#

Event tick

fathom aspen
#

You are doing this the wrong way

#

If you want a time delay, use the Delay node instead

#

Also event Tick fires for both clients and server for online multiplayer, but I'm not sure how things work in local multiplayer. Anyways I would suggest you to debug and see how things are flowing

fierce fiber
#

Alrighty, cheers man!

urban summit
#

could someone help me with voip? i cant get it so you dont hear yourself while hearing others

blazing spruce
candid escarp
blazing spruce
#

Hi, I'm setting up some filters for finding sessions (using advanced sessions), I've got a filter for LAN, Showing empty servers only and hiding full servers, I need to make it find sessions when the box gets ticked but i also need to make it so that if for example the player ticks the 'Use LAN' box and then also ticks the 'show only empty servers' box that it finds sessions based on both filters, I've got it set up like this at the moment, is their a better way to do this? this ones just on the LAN check but the way ive got it setup now it'll have to be repeated for both the other check boxes too

sinful tree
#

Should only need 1 branch if you do; the first one where the false plugs into the find sessions where everything is unchecked, and on the true path you have find sessions with "LAN" set to true, and the other two boolean parameters have the appropriate booleans plugged in.

sinful tree
#

Much better

blazing spruce
# sinful tree Much better

Thanks! so i would then just need to repeat this for OnCheckStateChanged on both of the other 2 tick boxes? but with the relevant one ticked ofc

crisp wraith
fierce fiber
#

How would I set a variable in the thirdpersoncharacter blueprint to communicate to all controllers?

#

This is for a split screen game

supple vapor
#

hey guys, I'm trying to use the network profiler (dedicated server launched with networkprofiler=true) but I just see the frames and not the server connection

eternal canyon
#

its perfectly fine to get corrections

#

u actually want them

#

tho def depends on the type of game

dusky yoke
#

Does anyone have any tips on how to resolve this? Im making a system to respawn my dead player without destroying him or his gun parts. Instead I'll be spawning the player as a spectator for a couple seconds before the character is relocated and the spectator is returned to possess the character. Here's what I have so far (teleporting & spawning spectator code in pastebin, spectator in picture) - spawning spectator and possessing it works fine, but relocating the actor and reposessing is not working:

https://blueprintue.com/blueprint/2lo2kfa2/

tender acorn
#

hi all!

#

Is there any information topics where i can read about replicating animation blueprint?

#

i`ve noticed that sprint animations executing with a different speed, maybe someone of you has a ideas why this is happening?

vocal quail
#

Good evening. What is the common practice for "replicating" decals? From what I have googled is that it can be done by spawning decal on client side on all players.. Anyone else have any pointers on this?

bitter oriole
bitter oriole
vocal quail
bitter oriole
#

Not just the spawn, the entire thing

#

Though a server-issued multicast would work fine

vocal quail
#

cant get it to replicate from client to server with server issued multicast for some reason.. Though, not the whole thing. Linetracing locally, passed vector to server, server, server call multicast

bitter oriole
#

"from client to server" isn't possible with multicast

#

Like you said, has to be client to server then mutlicast

fathom aspen
#

So just make it a normal event

dusky yoke
#

Oh, so from the Server-run event I can run a completely normal event?

#

@pallid portal (oops, wrong ping, mb)

#

RunOnOwningClient maybe?

fathom aspen
spare wharf
#

Hello everyone, anybody can help me to put my characters in a replicated selection in my EOS Multiplayer game? Is there anything plug in or tutorial video explaining this subject well?

fathom aspen
polar solstice
#

@spare wharf what is eos

pallid mesa
#

epic online services

#

a quick Google will help you understand the features it provides

spare wharf
knotty mason
#

hey everybody, i have replicated variable bDashed that is being set to true in _Implementation function, and non-networked function that sets bDashed to false if it was true --- but they are looking at different points of memory, and even more --- it works for the first time after spawning player, but for the second time it doesn't work (even though addresses remain the same), for the first time function that sets to false checks bDashed and finds out that its true, but after that check doesn't work, it doesn't figure out that bDashed is true;
what is going on, how can i fix it?
i ofc can provide more information about the situation if its needed

deft umbra
#

stupid question, im kinda new to online networking, and i’ve understood most everything i’ve been reading and watching online, but what is the difference between a normal event and one marked reliable?

peak sentinel
#

Reliable sent until engine verifies it reached to other side

#

Other one can be ignored

deft umbra
#

so, i make an event reliable when i want to be certain the information will be sent through?

peak sentinel
#

Yes

deft umbra
#

alright, that makes a lot more sense, thank you!!

peak sentinel
#

There are conditions when engine is unable to send a packet because either frame rate tanked or network bandwith flooded, in those cases reliable RPCs queued in a container and sent when available

deft umbra
graceful flame
#

From what I've read reliable should only be used for special occasions where the game MUST have that RPC work to avoid ending up with a scenario where the gameplay breaks. For example the end of match scoring or assigning a player to a team, that sort of thing.

#

RPCs where players can potentially spam inputs don't need to be reliable imo

peak sentinel
graceful flame
#

But really it depends on your game

peak sentinel
#

Cosmetic things should be unreliable like FX, audio etc.

#

Things called on tick also should be unrealiable

#

For example even movement code calls unreliable RPCs (because it updates location in tick), but then it does some workarounds to cover that dropped packets

#

That's why networking is a big hassle, whole game runs around infos and datas and you always try to send less to the other side

#

There is also a CPU overhead to send/receive RPCs

#

A bigger problem than bandwith

graceful flame
#

I recently discovered bitwise operators. They are totally worth looking into btw.

#

Essentially if you can compress more data into a single packet the "netcode" will perform better.

#

The length of a RPC function name is part of its overhead, right? I'm probably going to make extra custom events that have really short names just to handle the actual server to multicast part.

peak sentinel
#

Ehh no, I dont think RPCs are sent by literal names

graceful flame
#

ahh okay so the blueprint RPC function name gets minified or something?

peak sentinel
#

Not minified, they have their own data structures probably behind the scenes

#

Name completely irrelevant

#

So MyAwesomeCoolFunction() and A() has same overhead

deft umbra
#

okay, another stupid question in the ring, if i wanted to use steam networking, would i have to do anything special to package just for development purposes? like just if i wanted to test steam online systems with friends and whatever?

graceful flame
#

I come from a web dev background, so minified is just a term I like to use πŸ™‚

fathom aspen
fathom aspen
peak sentinel
#

iirc they have a generated mangled name behind the scenes

#

Name only relevant when you want to use FindFunction() thing and its to find UFunctions in a TMap

deft umbra
graceful flame
#

Glad to hear that, I was about to make a spreadsheet with all my function names mapped to single letters LOL

fathom aspen
#

That's the one used for testing

deft umbra
graceful flame
#

The $100 fee lets you publish, its the only way to get a valid app id. You can use the testing one but I think it has some limitations, like maybe games won't appear on the browser list via internet, but will work over LAN that sort of thing.

fathom aspen
fathom aspen
#

You have to contact them, or look into their EULA idk

deft umbra
#

alrighty, and if i don’t connect to steam, i could run through LAN and use port forwarding just for simplicity’s sake?

peak sentinel
#

Another cool info is if you see a non-developer friend playing a game with appid 480 that means they pirating a game πŸ˜›

graceful flame
#

I'm using the testing AppID and the steam subsystem, it get the little steam notification when I run in standalone and I have access to my own steam id while playing.

fathom aspen
spare wharf
deft umbra
fathom aspen
#

As I know port 7777 is what unreal listens to, and you have to make sure that port is open iirc(which it is by default)

deft umbra
graceful flame
#

I wonder if AppID 480 lets you connect to a listen server IP address directly? πŸ€”

fathom aspen
#

I'm pretty sure there is an example game for steamworks that shows what it's capable of doing

deft umbra
#

can i still access steamworks data if im using blueprints? or is it C++ only?

#

all i really need for now is usernames, and possibly access to the marketplace system further down the line when i have my own app id

fathom aspen
deft umbra
#

gotcha, i think im starting to get the hang of all this, is EOS pretty similar to SOS on a programming front?

fathom aspen
#

I haven't looked into EOS before so I can't tell, but I would guess they have similarities

deft umbra
#

my apologies, ill be sure to take note for the future, i think i have enough for now though, i greatly appreciate your wisdom sir

clever needle
#

Some way to repair SAV files?

#

My servers at the time of loadingGame, do not appear in the list for players

fossil veldt
#

and that was only because it was actually required

#

otherwise I feel like it just makes code less maintainable

nova wasp
#

can't you just : 1 bools and they get packed in ue?

#

I forget

near bison
#

guys

#

Can I really not use dictionaries/maps in unreal blueprints for multiplayer? :/

kindred widget
near bison
#

"If you need one, make one out of a struct. It requires very little framework."
Could you elaborate?
How would i have a key in a struct for O(1) lookup?

kindred widget
#
UPROPERTY()
TMap<int32, FMyDataStruct> MyLookupMap;

UPROPERTY(ReplicatedUsing=OnRep_ReplicatedArray)
TArray<FMyReplicatedData> ReplicatedArray;

UFUNCTION()
void OnRep_ReplicatedArray();```
#
{
    MyLookupMap.Empty();
    
    for (const FMyReplicatedData& Elem : ReplicatedArray)
    {
        MyLookupMap.Add(Elem.Key, Elem.EntryData);
    }
}```
twin juniper
#

Hello guys.I am getting a crash when use a replication graph.

The error is as follows

No classinfo for weapon
Where weapon is a custom class

summer tide
#

Hi - Any1 knows how to fix replication issue on client-side when the character slides during movement using curve.

near bison
kindred widget
#

You're worried about lookup time in BP?

near bison
#

No, I'm worried about having to write C++ for a simple replicated map.... @kindred widget

kindred widget
#

You can do everything I just did in BP as well.

near bison
#

struct inside a struct, erm,...

twin juniper
#

Things like FQuickbar that has array of FQuickbarSlot etc etc

near bison
#

there's no problem with that, except this is ultra ocmplicated for a simple replicated map

#

and I still haven't been shown in that example how to access something in O(1) time

kindred widget
#

You replicate the array of structs. You construct a TMap out of that replicated data, and the client can access the map.

near bison
#

and the fact that the reconstruction of the map is going to happen every single time the array changes.
what if I'm checking something inside the map on Tick on my local client?

#

opens up to a 100 problems

dusky yoke
dusky yoke
# dark edge It's usually a good idea to flow references one way when possible. There's no re...

So I tried to setup the code so that it is the gun itself that activates the scope's RT (will add a enable/disable function later to save performance, which triggers when aiming as the RT is pretty expensive :o), but Im getting a FailedCast on my 8X scope actor cast. I feel like I'm missing something very obvious here πŸ˜…
https://blueprintue.com/blueprint/ngwhffs9/

kindred widget
# near bison and the fact that the reconstruction of the map is going to happen every single ...

Not sure why they would need to, but the client checking it on tick doesn't change anything regardless of how you replicate the data. As far as that code is concerned you have a map and it's checking it on tick. The networked TArray has zero implications on that. I've never personally needed a replicated map. By the time you get to an array size that would require Map's fast lookup speed, you're going to run into data size problems with replication or RPCing anyhow which will lead you into FastArray territory. Iterating over an array of structs is fast in C++. Networking code can be very tedious. It is never as straight forward as gameplay code.

clever needle
#

Does anyone know how to increase dedicated server timeout, it's at 15 to 20 seconds by default, in steam season dedicated server

finite bane
#

Would anybody know why a dedicated server would appear in the steam server list but not for clients?

near bison
#

Can someone tell me what's the best class to store player color in for a game? PlayerState I assume?

fathom aspen
near bison
fathom aspen
#

FLinearColor

latent heart
#

FColor stores them as 8bit ints. FLinearColor as floats.

near bison
#

So, FColor is 32*3

#

and FLinearColor is 8*3

near bison
latent heart
#

What

#

FColor is 8*4 (don't forget alpha)

#

FLinearColor is 32*4

solar stirrup
#

Hey! Quick question about replicated UObjects in UE5, I remember hearing about the fact that UE5 handles them by itself now?

#

Don't remember where I saw that so I wanted to make sure I wasn't dreaming hah

near bison
latent heart
#

It really makes little difference.

faint eagle
#

Why can it be that in a component an array of actors is full of nullptrs on its OnRep_ArrayChanged? I fill it only on authority at component's begin play but on clients the array is empty in the RepNotify function

#

actors themselves are replicated (SetReplicates(true) in ctor)

clever needle
#

[2022.04.10-19.40.34:777][ 0]LogBlueprintUserMessages: [BP_SaveSystem_3] Loading Save...
[2022.04.10-19.40.41:180][ 0]LogBlueprintUserMessages: [BP_SaveSystem_3] Saved Loaded
[2022.04.10-19.40.41:186][ 0]LogLoad: Took 45.550594 seconds to LoadMap(/Game/Maps/KAOS)
[2022.04.10-19.40.41:187][ 0]LogPakFile: AllPaks IndexSizes: DirectoryHashSize=1310068, PathHashSize=16, EntriesSize=217088, TotalSize=1527172
[2022.04.10-19.40.41:187][ 0]LogInit: Display: Engine is initialized. Leaving FEngineLoop::Init()
[2022.04.10-19.40.41:187][ 0]LogLoad: (Engine Initialization) Total time: 49.80 seconds
[2022.04.10-19.40.41:227][ 0]LogNet: UNetDriver::TickDispatch: Very long time between ticks. DeltaTime: 0.03, Realtime: 35.72. SteamNetDriver_2147482470
[2022.04.10-19.40.41:828][ 2]LogOnline: Warning: OSS: Async task 'FOnlineAsyncTaskSteamCreateServer bWasSuccessful: 0' failed in 33.877804 seconds Any solution??

faint eagle
# faint eagle Why can it be that in a component an array of actors is full of nullptrs on its ...

ok I guess I have another question now. Is it guaranteed that an actor's property is replicated only at the end of a tick? I mean is it possible that I have default net update frequency == 100 and in some actor at beginplay i'm doing something slow, like spawning N items and putting them to a replicated array, and the array gets replicated in some background thread multiple times while the BeginPlay is still executing in the main thread?

warm sequoia
#

why isnt this replicating?

#

@twin juniper wdym?

gleaming vector
#

thats a bad way to answer that question

#

he's doing an rpc

#

which counts as replication

dark edge
gleaming vector
#

i've run into that before

dark edge
#

assuming that's a good montage to play and your anim BP can play it. start off by going input -> play montage to make sure the montage is not the problem

warm sequoia
#

@gleaming vector yeah it isn't... right now it the action isn't even playing when the inputaction calls to the action server

#

the montage works on the character, other player can't see

gleaming vector
#

oh so it's not calling the server rpc?

warm sequoia
#

It is, it just isn't replicating

dark edge
warm sequoia
#

will see now

gleaming vector
#

also, it's worth noting, multicast RPCs are fragile as hell

warm sequoia
#

only the top line is printing adriel

gleaming vector
#

a better way to replicate this would make a bool variable replicated, and use a rep notify to play the montage

dark edge
shell sorrel
#

In a " Multiplayer login > Be shown a custom-your-character-widget > Play" flow, is there a way to make UE not spawn at all the default pawn until the custom-character-widget is filled/submited by the user ? (at this time you will know his appearance and team that you didnt have at default spawn)

dark edge
#

That's what we do, you don't have a pawn until you pick one.

shell sorrel
#

Cool , any entry points to use I could search for ?

dark edge
#

I don't recall what we used but make a gamemode and look at the functions you can override

#

I think there's an event? you can implement to basically handle all spawning yourself

shell sorrel
#

Any idea what happens on the client's POV ? blackscreen ?

gleaming vector
#

a camera at 0,0,0

#

pointing in the Y+ direction i believe

warm sequoia
#

@gleaming vector wdym with the repnotify? I have a bool variable so what next?

dark edge
#

@warm sequoiaDude show what you have right now, with the print strings. It's really effin weird to not have a simple RPC setup not work.

shell sorrel
#

πŸ‘ thanks @gleaming vector @dark edge

gleaming vector
#

in the options for the variable, there is a drop down box for "Not Replicated, Replicated, RepNotify"

#

the last one will make a function that is called on clients when the variable changes

warm sequoia
#

@dark edge I didn't change anything, the same pic u saw above i just added print strings at the end and only the top line worked

dark edge
#

@shell sorrelWe have a custom PlayerCameraManager and drive it around, that's an option, depending on if camera components make sense for your game. They don't really for ours.

warm sequoia
gleaming vector
#

basically, RPC to server, servers value to true

#

then in the repnotify function, if the value becomes true, play the montage

#

if it becomes false, stop it

dark edge
warm sequoia
#

gotcha... ty

dark edge
#

When in doubt, use repnotify so things are stateful and not dependent on events which you may or may not get clientside

gleaming vector
#

and in PlayerController, virtual bool CanRestartPlayer() override; returns false if the player hasn't selected their pawn

#

once the player has set a valid pawn, I call RestartPlayer

#

which forces spawn flow

#

I have a 'Character Class' setup, and in each class they have a pawn

#

the UI sends an RPC to the server with the intended class

#

if that class is valid, I allow them to restart

dark edge
#

@warm sequoiaThe reason why you wanna use RepNotify instead of a multicast event is so it'll always respond to the state, not just the event. Meaning if you join a game and someone is in the middle of a slide, or if they slide and become relevent, you'll see them sliding instead of not (because you missed the event)

gleaming vector
#

I also do spawn point selection this way too

dark edge
gleaming vector
#

same deal, UI sends an intended spawn point. If that spawn point is valid, I store it in the player controller and use AActor* ChoosePlayerStart_Implementation(AController* Player) in the gamemode to put them there

gleaming vector
#

often, if you go to main menu, you want to leave the server

dark edge
#

But not show it on a join. I think we ended up storing a state variable (bHasACharacter or FMyCharacterStruct) but I can't recall. It felt hacky, that's for sure.

gleaming vector
#

if you want to just display a death UI, just pop it up in their face when they die

#

oh

#

i have a variable on my PC to track if they died

dark edge
#

We're going for absolutely minimal hard loads, I think the only one we can't avoid is at game startup and join/leave server.

gleaming vector
#

because there are a lot of cases in my game where a player can become disconnected from a pawn and not all of them are death

#

I personally use GAS

#

so it's just a gameplay effect

#

the effect holds their previous pawn if they've become disconnected for a gameplay reason

#

or says they've died if they did

#

if they dont have a pawn and dont have a gameplay effect saying why, it's assumed because they just joined and haven't spawned yet for the first time ever

dark edge
#

What's the gameplay reason for the disconnect, mind control?

gleaming vector
#

hopping to other pawns

#

I also wanna do a battlefield style effect where you can see over the whole battlefield

dark edge
#

So do you do ASC on pawn and playerstate?

gleaming vector
#

playerstate

#

Lyra solved so many issues for me

dark edge
#

How does that work with AI then?

gleaming vector
#

i dont have ai

#

or well, i do i just dont put it on the player state for them

tawny nova
#

will you try to keep in sync with Lyra as they develop it?

#

it seems like the best base template to start from anyhow

deft umbra
#

so i have a project with advanced sessions enabled and it's connected to steam, it works in the editor fine, but when i package it and run it, nothing happens and the game doesn't even appear in task manager

#

"LogPluginManager: Error: Unable to load plugin 'SteamShared'. Aborting." i think is the cause

jovial dawn
#

Hello , I have compile a private server, on standalone the client run at 60fps, but in network my character getting very slow

dark edge
#

What framerate is the server running at?

#

Do you mean dedicated server?

jovial dawn
#

on the console log it said that the tick max fps is 30

dark edge
#

Start with profiling the client. Are you running on seperate machines?

jovial dawn
#

but it's slow no, or if we get higher than that it may make other player lagging

#

I tried many case, on a private server or in local same thing

dark edge
#

Profile it

jovial dawn
#

if I run it standalone it's fast

dark edge
#

Is the actual framerate slow or is the character movement just screwed up?

jovial dawn
#

the fps is good, only the player that walk slowy when it suppost to run

dark edge
#

I'm guessing you're trying to sprint by just changing the walk speed?

jovial dawn
#

by defaul the character is always running

dark edge
#

So do you ever change max walk speed on the CMC or no?

jovial dawn
#

no never change the walk speed in cmc, it's always the same

#

so I decide to create a new plain map witout any mesh only the character it did the same thing, I tought it was my scene that doing this

#

but like I said fps is normal.. weird... well I will profiling

#

it's the network or something... else

dark edge
#

Start with making sure it works in listen server

#

Then in a launched server

#

THEN in a compiled standalone server

jovial dawn
#

ok

#

thank guys

#

will check this out

#

I also try to make it work with a WP map.... it don't work at all, streaming in network is not working.

#

it's work.... but with a lot of glitch, and the map is loaded completely...

#

I think I will split my map and put all parts in HLOD

#

and stream it myself

#

or put all part in a datalayers and hide all the map parts

limber gyro
#

Hey guys, im trying to change the HUD color of a client from a level BP, what would be the best way to achieve this in ur opinion?

fathom aspen
#

HUD color? what does that mean?

limber gyro
#

the color of something on a widget that is being used as hud

fathom aspen
#

It's a 2D widget right?

#

Meaning it's not a 3D widget component

limber gyro
#

yes

fathom aspen
#

Ok why are you doing this on the level BP?

#

Or more specifically what are you trying to do?

#

What's the event/thing that makes the color of that widget change?

limber gyro
#

The game has a sudden death when a certain time is reached, the sudden death is diferent per level, so idealy the logic is held by the level blueprint for simplicity sake

fathom aspen
#

That certain time is different for each player? Or is it shared among all players, so all players die when it's reached?

limber gyro
#

its shared, they dont die

#

for now i just want to change the color of the screens

#

the issue is that i cant use a replicated client function because the level is not the owner of the pawn

#

in this case actualy is the controller cause i got the hud in the controlller

#

idealy it would be something generic like a blueprintImplementableEvent

#

so that i can write further sudden death logic on diferent levels

fathom aspen
#

Ok if it's shared then I would have that functionality be implemented in the GameState instead. I would have that TimeLimit variable stored there, and when it's reached I would loop through the PlayerArray(It's an array of PlayerStates) and from each PlayerState I would get the PlayerController(via PlayerState->GetOwner()) and on the PlayerController I would call Client RPC that changes the color of the widget.

limber gyro
#

That is indeed possible but then i would have to write a new function for every diferent sudden death effect

#

because all sudden deaths dont look the same

fathom aspen
#

Nope

#

You would specify that sudden death effect there

#

using a parameter or something

#

What you was trying to do don't solve this either

fathom aspen
#

Now what "die" means, is up you to define and pass

limber gyro
#

i get what ur saying

#

i will probably do something similar

#

im just not 100% happy how im gonna have to do it

fathom aspen
wild patio
#

can anyone think of a simple reason why my server player pawn can't "get owner"?

#

i mean, the reference is invalid

fathom aspen
#

I would guess because the pawn is client owned, so get owner on the server would return null

#

On the other hand if you try to get owner on the client you would get the player controller

wild patio
#

it looks like get owner returns an actor.

fathom aspen
#

Is your pawn possessed by a player controller?

wild patio
#

yeah.

fathom aspen
#

Ok what actor is returning?

wild patio
#

i'm guessing it's null from what you're saying, but let me check

fathom aspen
#

If you're on the doing it on client it shouldn't be null

wild patio
#

huh. it says display name is PlayerController on the client.

wild patio
#

so if a pawn is possessed, it's owner is the controller. if not, the owner is itself?

fathom aspen
#

I'm not sure about what happens if it's not possessed, but clearly it's the not the controller

#

I would guess it would be server owned

#

Considering you would spawn it on the server...

wild patio
#

right. i'm looking at this code and now i'm thinking, how the hell did this work for weeks until another change i made

fathom aspen
#

Or you can try have a pawn that is possessed, then unpossess it and getowner and see what it returns

wild patio
#

i think i was initializing some stuff using the owner before it was possessed and it was working.

#

and then i re-wrote things to initialize things only after the pawn is possessed.

fathom aspen
#

Yes, only when pawn is possessed then is client owned by the controller

#

Looking through the source code, the pawn would have no owner when unpossessed

wild patio
#

got it. i have no idea how this code worked before, but it was getting a reference to a pawn at some point. strange.

#

well anyway, i should probably be doing this, then

fathom aspen
#

Yes

wild patio
#

uh oh

fathom aspen
#

Wait why you're doing this if you're already in pawn

#

This like using self

wild patio
#

child component needs a reference to the pawn

#

er, a non-scene component

fathom aspen
#

I don't think I understand you

wild patio
#

it's an actor component, added to my pawn.

fathom aspen
#

Then GetOwner directly

#

the owner of the actor component is the pawn they are attached to(part of)

wild patio
#

huh. that's what stopped working

fathom aspen
# wild patio

But here you are in a pawn class, not an actor component one

wild patio
#

this code is from inside the actor component, that is attached to the pawn

fathom aspen
wild patio
#

on server and client i check if the pawn has a player controller. when it does, it runs an init, down the line the actor component is told to init.

#

in that actor component init is this code above

stark tree
#

Hi, is it possible to create a dedicated server and have 2 or more Oculus Quest devices connect to it, I want to make a multiplayer VR meeting type thing.

wild patio
#

definitely possible. but much more involved than what could be explained in this chat.

stark tree
fathom aspen
wild patio
fathom aspen
#

It might be failing for the server but not failing for the client

wild patio
#

right

fathom aspen
#

Considering init is run on both

wild patio
#

it's failing for the server

fathom aspen
#

Ok it makes sense

wild patio
#

yeah?

fathom aspen
#

Yes considering the pawn is a client owned actor

wild patio
#

man, sometimes i think i understand something

#

so on server, get controller, get controlled pawn

#

the server creates the pawn. so the server has authority over the pawn. but then the player controller possesses the pawn, and the owner is the player controller, which the client owns.

fathom aspen
#

Correct

wild patio
#

man, this is useful to know

fathom aspen
#

Only GetOwner has this kind of issue

wild patio
#

got it. get owner just can't access the owner from the server when possessed by a client controller

#

would be awesome if that was in the docs or node description haha

fathom aspen
#

True, but Epic has other interests at the moment...

wild patio
#

hah right

#

really appreciate the help. you've definitely helped save my likely hours of life.

#

i think what i'm gonna do is write my own blueprint utility function that has more predictable results

fathom aspen
#

Well I don't see how this can be more predictable, but you can try it out

stark tree
#

The official Unreal documentation says to use a dedicated server my project must be a C++ project. That is ok, but what if I want to do development in blueprints for my game? For example I want to create a gun shooting. I will create a C++ project for server, but then how do I write all the player logic gun logic gameplay logic etc in blueprints? I barely know any C++

fathom aspen
#

If you create a C++ project you can still use BP

stark tree
fathom aspen
#

I haven't used the VR template project in C++ so I can't tell

stark tree
fathom aspen
#

Haha I can't remember what happens there either, but I guess they move controls to C++

#

Simply test it out

#

Takes a few minutes to test

stark tree
#

Thanks a lot

near bison
#

I have a function that does a bunch of stuff and then calls an event
I have a listener for the event wired up in BeginPlay

Breakpoints show it takes me to the call, but the listener is not firing. Any thoughts?

marble gazelle
#

Hm you wired smth up wrong? πŸ˜„

You need to give more details πŸ˜‰ As you ask in Multiplayer, should the event be sent over the network?

near bison
#

yes

#

but only for the owning client

#

let em show you @marble gazelle

near bison
#

Is PlayerController always initialized after PlayerState?

marble gazelle
#

I don't know, might want to look at the code^^

faint eagle
#

can client's RepNotify functions be called before client's BeginPlay? Is any order of replication guaranteed when a new client connects to a session? πŸ€”

chrome bay
#

They are almost always called before begin play

near bison
chrome bay
#

It's why BeginPlay is such a terrible place to initialize things

near bison
#

incidentally solves a lot of my problems too. Makes sense to initialize my UI in player controller (calling the HUD function of course) because I can be sure it's there

thin stratus
#

If you access the PlayerState from the PlayerController after, let's say, post login and not at some early a** time on the client, it's probably valid

#

So no, the PC is not initialized after the PS :P

#

It's just that the PC creates the PS early enough for you to not worry (replication terms and conditions apply)

sinful tree
#

Always something in the fine print.

faint eagle
bitter oriole
#

It's gonna be a mix of BeginPlay, replication events, and waiting for some conditions on tick

faint eagle
#

got it. thanks

chrome bay
#

There are some funcs called before replication stuff is applied like PostInitComponents etc.

#

BeginPlay is more of a gameplay-concept than an object-lifetime thing if that makes sense

worldly pivot
near bison
#

there needs to be some guaranteed order of creation

nova wasp
#

you chose the wrong engine if you wanted guaranteed order

near bison
#

even if order is not guaranteed

#

I want events I can listen to in blueprints

#

so I can actually do something there instead of in BeginPlay

#

this is ridiculous

chrome bay
#

Unfortunately when it comes to BP, you're limited to what the engine decided to expose

shell leaf
#

My multiplayer game allows players to select a class in the lobby. When they select a class it is stored in their game instance. When the game starts the new game mode uses the OnPostLogin event to get the selected class of each player controller (by accessing it from their game instance). This works perfectly on the host but not on the clients. After placing about a million breakpoints I found that on the client, one of my blueprint nodes is being called late.
Because the GetCharacterClass event is being called late, my StartingNewPlayer event is being called with the incorrect character class (this event spawns the player).
As a result, the host spawns the the correct character but all of the clients spawn with the default character. Any help/advice would be greatly appreciated! Thanks πŸ™‚
The first photo is the execution flow on the host(this works). The second photo is execution flow on the client (this does not work).

chrome bay
#

RPC's are latent

#

That's not going to work in MP

#

And more to the point you can't access a clients' game instance on the Server. The Client will need to join, tell the server what they selected, then the server will have to delay spawning them until it receives that call.

marble gazelle
candid escarp
#

Still having weird problems after adding impulse to StaticMeshActor - Did someone else have this? I did the same in UE4 and it worked, currently using UE5 :( I really just call "AddImpulse", which seems to work, but like this. I am running as server

candid escarp
candid escarp
#

As I am quite new myself this could be bad practice, but it works so no guarantees on that XD

dusky yoke
#

Is the Steam App ID 480 (Spacewars) for testing Steam games region-blocked? Friends cant see my hosted server, but if they host (theyre in Netherlands), I can see their servers. Im confused. I've read that it seems buying your own Steam App ID gets you past this issue somewhat, but Im not sure the credibility of those statements

thin stratus
#

Pretty sure all listen servers are a region thing

#

Not sure if locked but it takes the country in the settings of steam into account

#

Your own app Id could help but for other reasons I believe

#

A lot of users use 480 for testing so you get a lot of session results from other games that are filtered locally by UE. So if you search for 10 sessions and all 10 are from another game, the one from your friend might not be visible

#

But that's just theory

#

@dusky yoke

dusky yoke
#

Ah okay, thanks for the response! Yeah, I dont see any other sessions than my own game, but I hope I'll get it fixed soon as I cant host sessions atm :p

hardy crown
#

hello anyone can help plz --- i did built dedicated sever and i can see it on my game and on steam - and i can join the game if i launched it on my pc (that has steam app installed) and also can join it from internet - so it works as indented ---- but when i lunched it on a real dedicated server after adding dlls files -and openning port 7777 and 27015 --- i can see the server session on steam server list and on game server list but as soon i join the server the game quit while loading level -- and i have this errors on the server log -

[2022.04.11-14.29.35:354][355]LogOnline: STEAM: Adding P2P connection information with user 76561199104191641 (Name: UNKNOWN [0x1100001442EEC99])
[2022.04.11-14.29.50:383][804]LogOnline: STEAM: Removing P2P Session Id: UNKNOWN [0x1100001442EEC99], Channel: -1, IdleTime: 15.027
[2022.04.11-14.29.51:905][849]LogOnline: STEAM: Closing all communications with user 76561199104191641
[2022.04.11-14.29.51:912][849]LogOnline: STEAM: 76561199104191641 has been removed.

and got this error on the client

[2022.04.11-15.35.26:251][590]LogNet: Error: UEngine::BroadcastNetworkFailure: FailureType = PendingConnectionFailure, ErrorString = Your connection to the host has been lost., Driver = PendingNetDriver SteamNetDriver_2147482416

full client log on attachments

vocal quail
#

Howcome my attached weaponpart in null on client side running on dedicated server? Spawned weapon and attachment the same way (on server) but the attachment referance is null on client side... Any magic tricks on this? Is a modular weapon setup

#

weapon referance works fine, but attachment doesnt

#

Well... Turns out I forgot to set the referance as replicated. LOL.

wild patio
#

does anyone know how to use Get Local Role and Get Remote Role in blueprints?

dusky yoke
#

So I've got footsteps setup in my game with attenuation, but an issue is that as the player your own footsteps kinda sounds like they're coming from behind you so it's hard to differentiate the sounds. Is it possible to play one sound on the player which is an un-attenuationed sound, whereas all other players (host/client) hear the attenuation-sound?

wild patio
#

it returns an ENetRole Enum. but that Enum doesn't exist anywhere in the editor.

kindred widget
wild patio
#

i tried doing a switch, and nothing

#

ohhh, == works, but switch doesn't. huh. any idea what a switch wouldn't work?

kindred widget
#

I would wager it's something to do with the enum == node. It can probably read non BlueprintType enums if something else exposes them like that function. But they probably aren't recognized by the switch generation code, not being BlueprintType.

wild patio
#

huh. interesting

#

so i have a situation where client1 character that connects to a server that already has a client2 character. because of a system external to the game, clients need to send their character configuration from client to the server using RPC. when client1 connects, client2 doesn't have it's configuration. from the perspective of client1, client2 is a simulated proxy. the configuration values are set to replicate, but they are blank to client1.

#

do simulated proxies, when spawned, not get spawned with the values already set?

kindred widget
#

This doesn't have anything to do with the net role. Not unless you've specified replication conditions. Chances are that where ever you're checking the other client's replicated state is too early before it's actually replicated.

wild patio
#

so my current setup is: server starts -> client1 connects -> client1 possesses character -> client 1 sets color (blue) locally -> client 1 sends color via RPC to server -> client 1 (server) turns blue. -> server multicasts config for client1 to other clients.
client2 connects -> client2 looks at client1, not blue. and i think because the RPC multicast ran before it connected.

#

color variable is set to replicate. on client2 i tried to check on tick until color is set from blank to blue. but it never changes.

thick scroll
#

If I set Pktlag to 500 in a default first person project, but still experience rubber banding when playing two client instances, is there any other setting I need to change for it to work a bit smoother?

low helm
#

I assume you’re using the character movement component

#

Start by seeing if you can turn off extrapolation

hidden plinth
#

I was wondering if anybody had best practices for using datatables with networking. I have a datatable of a deck of cards, and players have a hand of those cards. I was looking to replicate down just the identifier of the card since all clients will have the datatable vs replicating the entire structure. I read FNames generally aren't compressed...so that's not ideal, and I don't see a way to get an int ID of the row from a datatable. Appreciate any suggestions to my approach

fringe dove
#

What's the right way to kill a dedicated server process? Ctrl-C in a linux shell of it seems to segfault or otherwise cause bad exits sometimes

latent heart
#

type exit?

#

I forget if it reponded to console input!

twin juniper
#

if anyone is bored and would like to help me understand what I am doing...
I am using the bp without a loop in singleplayer and it's working
and I'm using the bp with a loop in a listen server and it's working but it feels hacky.
this is for a multiplayer game with a static camera position.

latent heart
#

What are you expecting that second image to do?

fathom aspen
hidden plinth
#

@fathom aspen right, perhaps i phrased that confusing. I'm looking for a way to replicate/inform the client of an identifier to a row in the table the client can look up. RowName is the obvious option, but the lack of compression for FNames made me wonder if there was a better approach (like an int primary key or something). In editor when editing a datatable, there is what appears to be one...but doesn't seem exposed

latent heart
#

You really don't have to worry about compression when it's a few hundred bytes at most.

#

Unless you have hundreds of cards with stupidly long names.