#multiplayer

1 messages Β· Page 418 of 1

open cape
#

seems as if the properties are only getting replicated when they have an owner, and essentially discarded if theres no owner

distant pier
#

they are only replicated when they are changed, and an owner is present

open cape
#

how are you changing owner?

distant pier
#

via possessing

open cape
#

yeah more specifically

distant pier
#

my PlayerController calls Possess with the specific pawn as argument

#

I don't know if 'owner' is the right term here, btw, but since the condition is called 'COND_OwnerOnly'

#

I was referring as the player connection as the 'owner' πŸ˜›

ripe cypress
#

yo how would you update the server character mesh to clients if I set it on begin play of the character to clients that login after ?

open cape
#

@distant pier could you just re set those properties after its possessed

distant pier
#

It's an array of stuff, so I would rather not

#

but I think unreal checks properties for replication by seeing if the value changed, so that probably also would not work?

#

unless I actually change the value

open cape
#

you could change the condition once the owner picks it up

#

using DOREPLIFETIME_ACTIVE_OVERRIDE

high heart
#

okay, this is killing me. Can anyone tell me simply where the best entry point is to handle the moment a client pawn becomes LocallyControlled?

unique thunder
#

@high heart Event Possessed

#

It comes with a Controller output as well

high heart
#

I'm in C++, I've got PossessedBy overridden but it doesn't seem to ever get run on client

unique thunder
#

try BeginPlayingState()

#

It runs after a pawn is possessed so it should work.

high heart
#

hmm, good tip

#

just dug through the code and found this:

    GetPawn()->Controller = this;
    GetPawn()->PawnClientRestart();
    
    if (Role < ROLE_Authority)
    {
        ChangeState( NAME_Playing );
#

meaning PawnClientRestart actually should get called around the same time

unique thunder
#

should work πŸ‘Œ

high heart
#

which... just calls Restart()

unique thunder
#

side note,

high heart
#

huh

unique thunder
#

any idea if this would actually tell me if the owner of an actor is locally controlled?

#

not sure how you'd do it in c++

high heart
#

instigator should be a pawn, so I think so

#

but only if you're actually setting instigator

#

i don't think it gets set automatically when you set owner

unique thunder
#

Ah that might be why I'm getting errors

#

Thanks

high heart
#

if your owner is the pawn though you could just cast it

unique thunder
#

this function runs the controller vibration

#

don't wanna cast at the fire rate of the weapon

#

might as well just run the event on local RPC instead of running this check

#

i cant really test this though, the problem is i don't want other players to feel the vibration

#

if I grab an item and set owner on it, then run a local RPC

#

will it know which client to run it on?

distant pier
#

@open cape Sorry, I am trying to implement the PreReplication function, but I have to set the condition to COND_Custom. Can I use DOREPLIFETIME_ACTIVE_OVERRIDE in combination with OwnerOnly condition?

thanks

high heart
#

@unique thunder what do you mean by local Remote Procedure Call

#

also I could be wrong but i don't think casting on tick is much of an issue. if you're really concerned about it you cast it on SetOwner and save it out somewhere

#

(or just use instigator)

#

actually I'm curious about casting on tick as I do it all the time... I wonder if its the cause of some cpu performance issues

unique thunder
#

yeah casting is expensive, on tick would be a really bad idea

#

only place I cast on tick is in the AnimBP

#

and only cause I have to

#

should only be casting in one-off events, things that aren't constantly triggered. If they are, cast to the player actor, set a local variable and then re-use it.

high heart
#

hmm

#

do you think that applies to c++ as well? I've been thinking of it as a cheap operation because I heard somewhere that C casts are basically free... but I guess Cast<T> isn't actually a C style cast

open cape
#

@distant pier the custom condition should let you write your own closure. so you could just check if it’s possessed, and if so, check if the controller is the owner, then return true

high heart
#

oh, @unique thunder yes if you set an owner pawn/controller that is properly initialized and call a client RPC on the thing it'll run on whoever's machine owns Owner

#

however that might be unnecessary network load if you're doing it a lot

unique thunder
#

not a lot, but its important when it happens

#

whenever a player picks up a weapon, the owner is set

#

and when they fire the weapon, the rumble event triggers locally

#

to vibrate only their controller

distant pier
#

@open cape Does PreReplication provide a way to see which controller is considered for replication? Right now I am checking !IsLocallyControlled(), but I think that this will still replicate to every client in the game

open cape
#

why don’t you check the owner?

high heart
#

@unique thunder according to https://docs.unrealengine.com/en-us/Gameplay/Networking/Actors/RPCs Client RPC's run on a client will run on the invoking client, meaning you'll still have to check your owner because it'll spam everybody. You could call the RPC server-side to get it to run on only the owner, but you'll get a lag which may or may not be acceptable

distant pier
#

sorry, I think I am confused.

DOREPLIFETIME_ACTIVE_OVERRIDE takes in a boolean that indicates replication, but whatever check provides the 'true', the property will still be replicated to ALL clients, since the COND_OwnerOnly is no longer used, right?

unique thunder
#

@high heart how do I still check the owner inside a client RPC?

high heart
#

if you call it on a non-owning client it'll be run the same way it would on the owning client. you'd just have to call it from the server

#

all i's saying is you couldn't exploit it client-side to get around checking that the owner is local

open cape
#

@distant pier because that value can change on runtime, so you’d just have your ownership logic in there. but, i’m reading now that this isn’t supposed to be used on a connection by connection basis (should apply to everyone). worth trying but maybe this isn’t the case it’s designed for

distant pier
#

right, that was what I suspected

#

either way, I have currently fixed my problem by sending an RPC with the updated properties to the client when the owner changes

I want to try and see if I can maybe force a replication on controlle change via my replication graph later but that will take more time

#

thanks for your help

open cape
#

yeah that’s a sure way as well

#

no prob

gusty spire
#

Hello I have an issue with seamless travel. So I create a session with a dedicated server , players join the server and are directed to a lobby , game starts (the players travel to the map using seamless travel) , and they successfully join the map. The issue is that when I'm calling Get Player Controller on a client in the new PC blueprint , the function returns the old PC , not the new one. How do I solve this by calling the new one?
The lobby map has a "LobbyPC" and when I do seamless travel the player opens a map that has "GameplayPC" . Both maps have distinct gamemodes aswell

thin stratus
#

Why do you call GetPlayerController inside a PlayerController

#

Just use self

gusty spire
#

but if i use GetPlayerController inside a widget blueprint for instance , will it reffer to the new PC ?

drifting plank
#

Hello ! I'm searching a way to debug my ue network in real time. We have already tried the network profiller which is a bit helpful.
I've found a class nammed : "AServerStatReplicator". I've spawn it from a manager and display in and out rate in the tick but it displays only 0.0
Is that normal ? Can I use this class for that ?

Thanks in advance πŸ˜‰

proper olive
#

Can anyone help me with a Destroy Actor issue I'm having? When I run the code for a client (using a Server RPC with a reference to the pawn passed through), pretty often, both the pawn AND theserver's pawn get deleted..... any tips on this issue? Cause sometimes I do want the server to delete themselves right, so I don't want to prevent it 100% of the time

calm hound
#

@proper olive RPC is getting called on the server too, just check HasAuthority()

proper olive
#

I tried that, didn't stop it

#

I'm running an RPC on client to get controlled pawn, then sending that pawn to a server RPC to destroy it and various attached actors... (I tried putting switch has authority -> true at the start of the RPCs, tried them one at a time and together, did manage to prevent it from happening all-together, but not making it only happen correctly)

#

when the server pawn gets destroyed tho, the attached actors and other stuff don't get deleted

#

just the pawn itself

#

hmmm I do have a bunch of Fail outputs wired up tho for the Casts, let me just clean it up

calm hound
#

@proper olive ahh. Right, well with Pawn it gets trickier. Because the Pawn is partially owned by the client.

#

But you'll want to make sure you delete all the attached stuff first, otherwise when you delete the Pawn you're probably losing your reference to everything

chrome bay
#

Wait you want to destroy a Pawn on the Client only?

#

Why would you want to do that?

open cape
#

does anyone know if theres a way to change owners of an actor on the server from a different player controller? for instance if theres a persistent actor that a player spawns, then that player disconnects, i want him to be able to come back later and pick it up

#

my assumption is no, and that ill have to respawn this object since i wont be able to call any rpc's

chrome bay
#

You can call SetOwner() on the server at anytime

#

And the once updated the Owner will be able to call RPC's

open cape
#

yeah but who could call the rpc to SetOwner

#

or trigger that in any way

calm hound
#

Well in your scenario above, the GameMode, which only the Server holds has OnPlayerLogout() - which you can extend, and reference who that player is in there, then the GameMode also has PostLogin() function, which you can also use to do SetOwner() when they join agian

proper olive
#

not on the client only

#

the problem is that the server is also playing the game and their character gets deleted too

thin stratus
#

The you probably do a GetPlayerPawn/Character or GetPlayerController somewhere

#

Which would refer to the Server if called on it

proper olive
#

so can you just quickly explain what I have to do to filter out the server's pawn when I'm just trying to get the client's pawn through the server RPC?

#

I mean usually it works, and it's working for the destroy attached actors which is on the same code

#

it's not deleting the server pawn's attached actors

#

altho I did manage to make this stop happening when I log in as clients, which was the original bug

#

I'm still using the destroy as a playtest for my kill function and just wanna make it work πŸ˜„

#

here:

#

client is destroyed correctly

#

but server's pawn is destroyed, but his attached actors aren't

#

client's attached actors do get destroyed

#

there's a lot of code involved which is why I'm looking for good tips like these you guys have provided instead of analyzing everything

#

there's often common dilemmas buried under the complex stuff

#

bc I am analyzing everything myself πŸ˜„

#

but if anyone wants to see screens of my BPs feel free to PM I don't wanna clutter up too much

open cape
#

@calm hound so yea itd have to come from GameMode in that case. but another case might be that another player would be able to pick this actor up

#

thered be some validation to whether or not a player can interact with this actor, but ideally any player could meet that criteria

zinc zealot
#

hey guys

#

if a pawn spawns an actor does that make the pawn the owner ?

open cape
#

yea

proper olive
#

@thin stratus you mean like this GetController node? It's not destroying the server's "hand models" tho

thin stratus
#

No

#

I meant what I wrote :P

proper olive
#

so you mean like if it didn't have a blue wire plugged in

#

or just used the pure "get player controller" to self

#

oh the get index one? I never use that

zinc zealot
#

@open cape so i can call from the actor the owner right ?

open cape
#

depends where you spawn it

#

but wherever its spawned, you can reference the owner yes

zinc zealot
#

cause im spawning a knife right

#

and inside the blueprint i wanna reference the owner

open cape
#

spawning it on the server?

zinc zealot
#

wich is the pawn

open cape
#

spawning on the server or client

zinc zealot
#

ah...

#

im spawning on both πŸ˜ƒ

#

thx

proper olive
#

oooooh does this return the actor as well as the attached actors? since it's returning actors attached to the component??

open cape
#

@zinc zealot you might need to also SetOwner on the client if you're spawning on the server. i usually have to do that

zinc zealot
#

thx @open cape πŸ˜„ rly helped me!

calm hound
#

@open cape - What you want to do, is create the functionality inside the Player Controller. That way you can call an RPC from the client to the server inside that when you need manual control, which would (on the server version) do all that you need to set ownership of the Pawn. From there, you would use GameMode and the PostLogin/Logout stuff to grab the PlayerController, cast to your player controller, and call the same functions

#

@proper olive I would imagine so. Best way to test is to use Print String and list off all the actors it returns

jolly siren
#

What is a good way to attach a character to a moving actor and replicate its movement smoothly? I have a cart that a player can jump into. The cart's movement is replicated and it's moved along a spline on the server within tick. When the player jumps inside of it, I attach the player's character to the cart and disable the CMC via DisableMovement. When I do this and use p.netshowcorrections 1, I get a constant stream of corrections.

open cape
#

@calm hound right, but im saying to have another, random player take ownership of the actor (which wouldnt use PostLogin etc at all, since state wouldnt help you in this case)

calm hound
#

@jolly siren - If AttachTo() isn't doing enough, you'll probably want to use AttachTo() while setting the initial relative location of the Pawn and replicate it across all players, and then just use simulate the movement on the client with the server throwing some updates down if the player can run around freely?

#

@open cape - That's why you put the code inside Player Controller. Player Controller will always be present. Then all you have to do is call the function inside the controller, whenever this Random Player would take over

open cape
#

but random player's Player Controller could set ownership on the actor? even though it cant fire rpcs?

calm hound
#

Player Controller can always call RPC. It's always owned by the player

#

you can't call it from the Pawn until you own it, but you always own the Player Controller.

jolly siren
#

@calm hound I would like to have the player be able to move freely within the cart. But currently, to simplify, I am disabling the character's movement and attaching. But it isn't very smooth and the corrections are rendered non-stop for some reason.

open cape
#

yeah but call it on a separate actor?

calm hound
#

@jolly siren Player Movement has built in simulation on the client, so it only needs updates now and then. Disabling that is disabling your prediction code. So that's why you're now getting flooded with replication updates and corrections. You need some sort of simulation to avoid it

#

@open cape - Like what? And why? I don't know what you're doing, but whether you're trying to interact with an object by looking at it and pressing E, or you're using UMG/UI to "spawn character", you always can get a reference of your own Player Controller. So all you have to do is get a reference to the actor you want, IE: The pawn, and send the request to the server using your PlayerController

open cape
#

yeah, basically having any player be able to walk up and pick it up

so you could sent the request to the server using PlayerController, then let playercontroller set the owner of the actor?

calm hound
#

Once you send the request

#

the server has full access to everything to decide, you can then set each actor up to return a yes/no on the server side

#

but you have to do it on the server side, only way to send info to the server is through an RPC, only way to send an RPC is to have ownership, only way to make sure you have ownership is the PlayerController

open cape
#

oh thats great. i thought only the owner's player controller could call functions on the actor, even if the random player controller was on the server

#

gotcha

#

so as long as its not an rpc, everyone can call anything on the server actor

#

(as long as theyre also on the server)

calm hound
#

The Server is master

#

so the server has the master version of ALL Player Controllers in it

#

That's the version that matters

#

the Client, has 1 Player Controller. Their own. Which they can do whatever they want to it, but in the end the Server's version is the one that dedicates the game

#

dictates*

open cape
#

right, i was just confused as to what the server's version had control over

#

if it was restricted at all

calm hound
#

Nope, everything.

#

The client's version is literally just a fake version

#

There's a lot you can do with this fake client version, IF the server doesn't need to know about it. Like for example, UI stuff

open cape
#

yeah i knew that, i just figured that certain controllers didnt have control over random actors no matter what, even if theyre on the server

#

so thanks, good to know

calm hound
#

no problem!

bleak lily
#

how would I make an actor where I can place multiple of them to use as spawn points

sharp pagoda
#

APlayerStart ?

bleak lily
#

well yeah but can you respawn on one?

sharp pagoda
#

Of course

bleak lily
#

oh

#

wait so

#

when I spawn the actor how would I do that with spawn transform

#

to get the player start

sharp pagoda
#

For respawning, you get a playerstart actor reference by using ChoosePlayerStart() or something custom, then spawn your new pawn, set the transform of it to be the transform of the selected player start, then possess it.

bleak lily
#

I looked up how to override the playerstart thing but I dont see it

#

where to get the choose playerstart

sharp pagoda
#

Declare and define virtual ChoosePlayerStart_Implementation() in your game mode

#

There you can pick out a custom actor to spawn on

bleak lily
#

oh I have to use c++

sharp pagoda
#

Return type is AActor* btw

#

I believe you can override it in blueprint

bleak lily
#

oh I found it

#

is this right?

sharp pagoda
#

Yes

#

You can use the super class call of it to determine a default player start if your custom code doesn't decide on any player start

bleak lily
#

I have no idea what that is

sharp pagoda
#

Do you understand how virtual functions work?

#

Right click -> Add Call to Parent Function is the equivalent of Super::MyMethod()

bleak lily
#

where do I right click

#

also no I dont really know how virtual functions work

#

I am kinda new to this

#

I thought spawns would be simpler than I thought since there arent many tutorials

sharp pagoda
#

Right click on the function node

#

It is simple, I was just asking if you knew what you were doing

bleak lily
#

oh

#

ok it looks brown now

#

its like the two things are combined

sharp pagoda
#

Calling that will return the default implementation for picking a player start

bleak lily
#

oh

sharp pagoda
#

So you can use that as a safety net

#

If you don't find a player start, then you can use that as a backup to ensure you find one

bleak lily
#

cool

#

so is this all I had to do in the gamemode

sharp pagoda
#

For picking a player start yes, you don't even need the parent function.

#

For a whole respawning system you obviously need more

bleak lily
#

I have a respawning thing kinda set up but I was using the playerstart as the location

#

if that makes sense

#

so how would I get the playerstart location now

#

like to put into the transform thing for spawnactor

sharp pagoda
#

@bleak lily Get the transform of the actor returned by ChoosePlayerStart

balmy kindle
#

why do clients play the sound notfiy from the animations twice?

jolly siren
#

They don't

#

Would need to see what you are doing to debug further

balmy kindle
#

i dont know how i could debug that, its just a sound notify. how can i control it besides the settings for the notify itself=

#

?

#

if i play the game with 1 server and 3 clients on a local machine the clients have double sounds

jolly siren
#

How are you playing the animation on the clients? Is it played locally, played on the server, and then multicasted to other clients?

#

There are plenty of things going on besides "just a sound notify"

#

Are you using anim montages?

balmy kindle
#

its a normal running animation and the sounds are the footsteps

#

so i guess its the movement component handling that, and that is replicating by default right?

#

however, if i just have the server and 1 client, there is no double sound

gaunt crown
#

How would I make movement fully client side but make client send the updated location to Server. Im basically trying to make so Client receives no lag

open cape
#

on what kind of actor

gaunt crown
#

Pawn

open cape
#

thats built in

#

MovementComponent

gaunt crown
#

Ive done this

#

I dont want Servers to simulate physics

#

I want only the client to and then send its new location to the Server for other clients to see

#

But it seems a bit glitchy ?

open cape
#

is there anything indicating when the pawn has stopped moving

gaunt crown
#

I have the Client to Send its new Actor Transform on tick

#

thats all I've done ?

open cape
#

can you describe glitchy

#

its jumping?

gaunt crown
#

Yea!

#

Actually I think I just found my issue

#

Yeah 🀦 Multicasting is doing it

#

Because Im ticking to server of my own transform and then doing it on Multicast which is just giving it back to all clients incl me and its interfering

winged badger
#

replicating something as large as FTransform on Tick to server, and then Multicasting it is a terrible idea

open cape
#

also, in this case you might to implement the smoothing yourself

#

could use something like AddImpulse

winged badger
#

reliable RPC to Server also doesn't help any, in this case

gaunt crown
#

@winged badger Yeah but what I am doing is only a small mini game that just replicates other peoples movement so everyone can see eachother.

open cape
#

you can ignore the owner when you multicast too, if you wanna go that route

gaunt crown
#

But yeah it is a bad idea

winged badger
#

CMC does networked movement simulation out of the box

gaunt crown
#

nevermind

#

I think I got it

#

@winged badger @open cape Thankyou guys for the answers πŸ˜ƒ

#

Solved many of my problems so far.

#

Keep up the good work πŸ‘

gusty spire
#

hello I have an issue with players connecting to a server that has already servertraveled to a map. If a server executes the command servertravel and seamlessly travels to a map , how can I make a client join the server and be brought to that map as it should in nonseamless travel?

gaunt crown
#

@winged badger @open cape Though not doing a tick and just doing linear velocity physics which is much better for stability, it has an easy chance of having the ball desync and the client will be in another location to where the server sees them.

#

As seen here

open cape
#

if you're going that route you need to constantly be updating the velocity to the new position

#

interpolate between your old velocity and the new one coming in

gaunt crown
#

Waht do you mean by that ?

#

So not use a tick ?

#

Everytime I launch I set my location again or something?

open cape
#

oh this is on sending, not receiving

#

i was saying, you could generate velocity based on previous positions

gaunt crown
#

Thats just on client

#

And it sends that

#

but yeah outcomes are different

open cape
#

yeah so instead of that, you could send position, then generate velocity from the last 2 positions when you get a new one

#

and keep moving in that direction until you get an update

#

thats pretty basic prediction modeling

gaunt crown
#

Sounds a bit confusing πŸ€”

open cape
#

could improve it a lot

gaunt crown
#

I dont know how to do that as that sounds a bit complicated?

open cape
#

client A -> send position
client B -> receive position, get velocity from subtracting position from last seen position

#

client B will then move with this velocity on every tick, until client B receives a new position, and update the velocity again

gaunt crown
#

Ah so I found out what caused the desync

#

When running into other physic simulated objects, pushing them and then you moving away is where it all starts.

#

But if none ever make contact, all is fine and in sync.

worthy wasp
#

Having a desync with Lag Compensation for variables..... When i'm in a laggy test environment - and i am running AnimStateMachine based on replicated variables from the character class - my local client is actually running animations 2x over due to server RPC's being behind.

I need my client responsiveness to have priority - because i'm favoring the client - and pre-calculating based on client input which should almost always be right (unless of course hacking - which is why the server RPC is there in the first place...)

How can i pull this off so i can have the responsiveness favoring the client and not have a 2nd animation run again?

grand kestrel
#

Animation instances shouldn't need any replication, all the information you should need is already replicated in ACharacter and UCharacterMovementComponent

#

Animation is a representation of the current state, nothing more

worthy wasp
#

so lets pretend that i got the whole animation incstance replication thing down - it aint the first time :)

Variables are replicated in the character class (as clearly stated above) and are retrieved in the animbp to set local variables to the animbp.... this is the way animation replication is handled.

#

my problem (again) is with the lagged otu RPC event of the server RPC's to run the code needed to replicate to networked clients - not to self.

grand kestrel
#

Same diff, anything affecting the movement needs to be built into the prediction

worthy wasp
#

i've tried SKIP SELF on the replicated variables - no difference

grand kestrel
#

You're not sending or replicating input are you

#

That's a big no no and so many (wrong) YouTube tutorials do it

#

It's already replicated and built into the prediction

#

Under GetCurrentAcceleration

worthy wasp
#

forget character movmemtn componnent for this plz

#

as were not talking about character movement

#

these are custom animations in an animation state machine

#

not based on movemnt.

#

IE: Aiming, or custom AnimMontages

#

so

#

InputAction::Aim() is fired

winged badger
#

RepNotify?

worthy wasp
#

^^^

#

tried it

winged badger
#

i mean, are you using it right now

worthy wasp
#

its currently at REplicated - becasue that works. but yes i've tried RepNotify

winged badger
#

because it has that funny thing where you can set the variable on client locally and then watch it trigger its own OnRep function

#

blueprints only

worthy wasp
#

either way i've tried RepNotify

winged badger
#

in code or BP?

worthy wasp
#

the problem is the server is running code on an RPC that is delayed due to the simulated lag

#

BP

winged badger
#

there is a big difference between the two

grand kestrel
#

It's running on the owning client that's already run it locally?

worthy wasp
#

yes vaei

#

exactly

#

i need to stop this - and i've tried bool locking i tout

#

with IsLocallyControlled

grand kestrel
#

Eh you've done something strange then

worthy wasp
#

not me

#

i' mthe guy cleaning up after people

#

"here debug this" k thanks! lol

winged badger
#

the only times i've seen that is

#

1 - animation runs locally, also fires a server RPC that runs a multicast without a filter

#

2 - BP RepNotify

grand kestrel
#

I've received inconceivably broken projects too

#

Haha

winged badger
#

(one state replicated implies a change in another state, which is also replicated with Notify, causing the OnRep to fire twice)

#

the c++ ReplicatedUsing will not trigger OnRep on the machine setting the variable locally tho

worthy wasp
#

ReplciatedUsing wont fire unless you tell it to run - its not automatic like BP's is simulated....

#

server doesnt partake in replication.

#

this is UE4 documentation quote lol

#

so when you set a variable as server - you have to manually call OnRep funct (in c++)

winged badger
#

you do not

#

well, you do on server

worthy wasp
#

you do too - i'll be tall my money on it

#

thank you

winged badger
#

which is a good thing

worthy wasp
#

i agree

winged badger
#

that is what the Setter functions are for

worthy wasp
#

its just ass backwards to BP's

#

as BP's are automatic

#

anyhow

#

thats here nor there....

#

😦

winged badger
#

you can try a local backup of all replicated variables driving the anim states

#

saving the value in a backup at the end of OnRep

#

and not letting it run at all if the current value == backup value

worthy wasp
#

i dont know how thats possible in BP's

#

trust me if i could

#

i'd have this project have been C++ from the beginning

#

unfortunatly - thi sisnt my baby... . i'm just working on it now

winged badger
#

all OnReps have this

#

if (CurrentValue == BackupValue) { return; }

#

and on the very end BackupValue = CurrentValue;

#

you can gimmick the Multicasts to do something similar

worthy wasp
#

no return value available on a RepNotify variable?

winged badger
#

you don't need return value, just Return node

cloud ledge
#

What would you return?

winged badger
#

get out of the function

#

without executing its code

#

well, its BP or just run it if Backup is different

#

and do nothing if its not, sorry, i tend to think c++

worthy wasp
#

yah i'm not following you

winged badger
#

and that was so coherent its obvious i need sleep

worthy wasp
#

are you thinking of RPC in C++ - _Validate() ?

winged badger
#

no, im thinking unless your BackupValue is DIfferent from CurrentValue

#

you do not execute the rest of OnRep

#

or Multicast

worthy wasp
#

i'm not doing anythign in OnRep at all....

winged badger
#

downside is having the backups, ofc

worthy wasp
#

not for this function

#

and backups - is this a 2nd version of the same variable (local only? )

#

is that whaa tyour referring to as backups?

winged badger
#

yes

worthy wasp
#

ok i can understand that

winged badger
#

i use that approach when OnRep code is heavy, like say creating an ActorComponent

#

i'd rather have an extra variable then run the code when there is no point to run it

#

i'm off, gn and gl

worthy wasp
#

thnaks man - its stressfull doing client prediction ❀

#

appreciate the feedbkac & help!

cloud ledge
#

Oh

#

@worthy wasp you are doing client prediction stuff? I think I might have been solving same issue as you did MAYBE

#

It sounds remotely like it

#

What's the issue?\

worthy wasp
#

well

#

i think i just fixed it to be honest

cloud ledge
#

I was doing clientside extrapolation for switches, buttons and other animated controls in our game

worthy wasp
#

this kid that programmed this funct.....

#

was setting a bolean to false after setting it to true

cloud ledge
#

And I had to figure out how to make replication system play along with the fact that I have to selectively accept or deny some updates from server while extrapolation is happening

worthy wasp
#

i took that out - and put the false part of it on the RELEASED portion of the input

#

and it seems to behave appropriately now....

#

i have the same setting on ALL MY OTHER INPUTS

#

and they all behave the same

#

in a LAGGED environment....

#

the damn shit is run 2x

#

because of hte server desync

cloud ledge
#

Yeah

worthy wasp
#

but taking this out.... and putting it on the RELEASED portion toggle of the input....

#

seems to fix this

#

i retract all above statements.... lol

#

still problem 😦

unique thunder
#

I'm running a client RPC in 2 different ways but only one works for some reason.

  1. On BeginPlay > Delay > Client RPC
  2. On AnyDamage > Client RPC

Only the first works. Any idea why?

glad sedge
#

Isn't AnyDamage Server side?

#

Authority Only. This event only fires on the server.

worthy wasp
#

that it is - but the TARGET of AnyDamage - is a delegate..... there is no owner - so an RPC wont be able to be ran from it - right?

#

in order for an RPC to run - proper ownership of the object needs to be established.... the object needs to be owned by the caller of the RPC in order to run it.

#

@unique thunder what do you need to do locally on event AnyDamage() ?

unique thunder
#

my bad guys - I fixed it πŸ‘Œ

worthy wasp
#

well - what was it?

unique thunder
#

I had a couple objects that I had pick-up logic happen on client since they're client-auth but when I tried to drop them on death (via AnyDamage), the server wouldn't see the drops no matter how I called them. I had to server RPC > multicast these few special grip situations and multicast the drop as well.

worthy wasp
#

so you were pickign up these objects as client?

#

and not replicating your ivnentory (it sounds like) ?

rocky badger
#

does anyone know if i can reset the server time?

unique thunder
#

why can all players hear the sound played in this function?

cloud ledge
#

Is the actor owned by client or server

unique thunder
#

@cloud ledge This actor is owned by the client & the projectile is owned by whatever client fired it

#

ah I see the issue

#

πŸ˜‚

#

I guess if I own the projectile and you own your character and the projectile executes a local RPC, we both hear it?

cloud ledge
#

Character is owned by server and so everyone hears it I think

#

Even though you own the projectile on client

unique thunder
#

@cloud ledge how do I trigger a sound effect only for a single player but from the projectile BP (with owner set to player who shot it)?

cloud ledge
#

Not actually sure right now

unique thunder
#

figured it out

#

thanks anyway tho !

red ledge
#

multiplayer ownership gives me a headache tbh

#

sometimes it's hard to keep tract of who does what

slim holly
#

well it's not that hard

thin stratus
#

Ownership is really just that: Who owns the Actors.
It's like you owning your PC, or the TV owning the Remote.
The owner is allowed to send RPCs to the Server.
The owner can receive RPCs from the Server (multicast obviously always works).
When spawning an Actor from the Server (replicated Actor), you can specify an owner.
You can also do this after spawning later to adjust the owner.
Typically ownership starts at the PlayerController, as this is the class that represents the physical player.
Ownership is always recursively checked, so if a Class is Owned by the PlayerController, you can use it to own another Actor. (e.g. use your Character to own your Weapon).
But you do good using the PC in most cases.
Not specifying an owner or placing an Actor upfront into the Level makes it basically owned by no-one or the server, however you want to see it.

gusty spire
#

hello I have an issue with players connecting to a server that has already servertraveled to a map. If a server executes the command servertravel and seamlessly travels to a map , how can I make a client join the server and be brought to that map as it should in nonseamless travel?

red ledge
#

@thin stratus got it thank you!

chrome bay
#

@gusty spire Assuming you are using the Session system, this should be handled automatically for you

#

You parse the URL when you join the server, and use that to join the map. Check out the Multiplayer Shootout example from Epic which uses sessions.

gusty spire
#

is it a command I'm supposed to execute as a client when joining the session? In nonseamless travel all I need to do to be brought to the map and play is just join the session

chrome bay
#

Strange. Everyone should first travel to the transition map, then the server should tell everyone to travel to the play map

thin stratus
#

SeamlessTravel should also work without Sessions

#
  • the map the Server is on should be parsed like TheJamsh said
#

Check your logs and see what the Browsing line shows

cobalt steeple
#

Hey folks, I've been having a hard time trying to figure out how to setup a simple two-way voice chat between an host and a client.
I changed the config files, trying both Null and Steam subsystems, with pushtotalk on and off. I tried connecting with normal sessions, advanced sessions, calling the advanced sessions node "Start Networked Voice", nothing worked.
I looked into the ShooterGame sample to figure out was I was doing wrong, but I couldn't.
Am I missing something obvious?

ruby wraith
#

okay i need help to understand what i am doing wrong here and why i am getting this error, I've tried to search the internet to help me find the answer but nothing .. So im trying to save a info for players plus there steam ID. this info would then be added to the online players where through the lobby UI you could invite them to your lobby. the blueprints would use the advanced sessions plugin to get the users steam ID and then also see that player a invite via their steam ID . my problem is that on the server side of player saves it gets and error with not being able to read the loaded Net ID. as seen in the image.

zinc zealot
#

hey guys

#

if i open a session

#

play with 2 players on a map

#

and change maps

#

do the changes in the first map like picking up weapons continue for example if i went back to that map ?

sharp pagoda
#

@zinc zealot Only if you make the actors that manage the inventory persistent

zinc zealot
#

i dint mean inventory wise

#

i meant in the map

#

for example if you break something

#

or pick an item

#

when you re enter the map

#

is the thing still broken

#

or the item not on the floor anymore

sharp pagoda
#

It will reset the map, so any changes you did will not persist

zinc zealot
#

thx ^^

#

hmm something weird is happening

#

im very new with networking anyone on to help ?

cobalt steeple
#

what's the matter ?

zinc zealot
#

well im gonna try to show some code and explain

#

ntw thx @cobalt steeple

#

πŸ˜„

#

So this is whats happening

#

I host a session

#

players can connect

#

when i destroy session and open a different level

#

and try to host again

#

it fails to create a session

#

want me to show some code ?

cobalt steeple
#

Are you sure that destroying the session was successful

zinc zealot
#

no

#

i might have been doing something very very stupid

#

i have to destroy session on the server xD

cobalt steeple
#

lol

zinc zealot
#

but i dont think thats the only thing

#

well its kinda working

#

now i can open the session again

#

but now it fails joining xD πŸ‘Œ

cobalt steeple
#

maybe you have to destroy the precedent session you joined

zinc zealot
#

in the widget theres no switch has authority

cobalt steeple
#

just check the output of "IsServer"

zinc zealot
#

where is that ?

#

ah kay XD

steady briar
#

so i have a bp that swaps foliage instances with actors, then the actor swaps itself with an instance again. i made a simple bp to count instances and actors in an area. server always says the same amount of instances, no actors. client instance count keeps rising, also no actors. is the server even aware of instances?

#

and i guess overall i dont need/want it to replicate, id rather it be client based as long as the client can be aware of the swapper blueprint in others. doesnt need to be perfect its just for environment, not gameplay critical

zinc zealot
#

if you want some help (i probably wont be able to) you should show some BP's

#

Btw it still fails to join

#

i did this

#

it successfully destroys the session

#

the picture i sent was from the in game menu like when your playing

#

not the main menu

#

it finds a session

#

when i try to join

#

Fails to join session

sharp pagoda
#

@steady briar Can you show us how you're swapping the instances with the actors? It sounds like the issue is in there

zinc zealot
#

sry go for it vyktori

steady briar
#

well ive done it like a hundred ways i get the same result. the most recent version looks a bit weird but ill post what i got, its in 2 parts

sharp pagoda
#

Can I ask what you're swapping for? To get foliage interaction or something?

steady briar
#

its a multisphere trace that gets the array

#

yep

#

i have a crap ton of garbage in the middle let me break up the actor part

sharp pagoda
#

Yea I don't think swapping would be the way to go for that, there's an interactive foliage actor somewhere that seemingly nobody knows how to use, I would imagine you use that.

steady briar
#

basically store its into in variables, destroy it...

#

this versions cluttered because i keep chopping things to try to get it to work. because duplicate instances = more actors spawned next time

#

100 instances turns into 1000 actors fairly quickly

#

i figure it can only be destroyed once, so it cant make more instances than it destroyed (1) so i dunno

#

and as for interactive foliage actor, no idea... havent seen it o.O

zinc zealot
#

i think the first thing you should do is organize your BP so its easier to read XD

steady briar
#

i think really its a matter of the server and client seeing instances differently. i dont really want the server to know. i just need the client to know about the 1st bp in other people and do the swapping on the client

sharp pagoda
#

If you pooled the foliage actors it might be a reasonable approach

steady briar
#

yes i know my bp is ugly i just woke up and ive been changing this bp for a while, its ugly

#

pooled?

#

the reason i wanted the swapper to spawn the actor and then never care about it is incase the swapper gets destroyed/player dies etc

sharp pagoda
#

Create the actors once and store them in a pool, then when you're ready to swap you get one of those preregistered actors from the pool, set it up for this specific instance, and render it

steady briar
#

i used to add the instance in the swapper, but destroying swapper meant the instance never came back

#

this works fine in most cases, its really just on very small ones im testing how to break my bp

#

but im sure it means theres a flaw that will break on larger foliage eventually and build up to be a problem

#

im just curious how i can destroy 1 instance and replace 1 instance and have a different amount.

cobalt steeple
#

Concerning my issue mentioned above, I checked if the engine code was executed successfully.
Nothing seems out-of-the ordinary, I got this far:

#

The bot is blocking my screenshot

#

Well here's the stack trace, the bot thinks the code image is sexual

zinc zealot
#

Vyktori

cobalt steeple
#

So everything seems fine, correctly initialized. But I can't hear the sound from the other computer

zinc zealot
#

do you mean that you are destroying one instance and when you replace spawns like 2 or more ?

#

@steady briar

cobalt steeple
#

Same setup works well with the ShooterGame

steady briar
#

its not always a consistent number, but it seems like when the actor spawns an instance, it spawns more than 1

zinc zealot
#

if you're doing it multiplayer

#

its most likely the replication

steady briar
#

its a difference between server and client

zinc zealot
#

cause that happened to me hundreds of times

steady briar
#

ya thats what im trying to figure out, in this channel not bp

zinc zealot
#

yeh

#

cause

#

i dint see your code much

steady briar
zinc zealot
#

but what i understand

steady briar
#

this is it working on larger foliage tests

zinc zealot
#

is when you spawn

#

depending on like who you are telling to spawn on server may be missing so you get null ptr or something

#

what im telling is its probably the way youre replicating

steady briar
#

i know it is, thats why im here

#

i dont really want it replicated at all

#

i just need Client1 to know Client2 has the swapper attached to it, run all that stuff per client

zinc zealot
#

you're trying to make so that when you hit the plant

#

it moves ?

steady briar
#

im trying to make it so when i hit an instanced static mesh, it swaps it with the equal skeletal mesh to it has physics, then swaps it back for an instance

zinc zealot
#

this might be stupid

#

but why not just have them all have physics ?

steady briar
#

because my pc would burst into flames

zinc zealot
#

or skeletal meshes

#

xD

#

ok

steady briar
#

skeletal meshes costs like a bajillion times more than an instance, especially in a dense area

zinc zealot
#

where are you running the BP ?

steady briar
#

the swapper itself is an actor spawned and attached to each character

#

the swapper spawns the skeletal actors, skeletal actor swaps itself back to an instance

zinc zealot
#

did you set the swapper to be owner by the character ?

steady briar
#

in that vid u can watch the actor count go up and down

#

yes, seems to have no effect

#

what bugs me a lot of the time is things i want replicated dont replicate, but things i dont want replicated... do <_<

zinc zealot
#

xD

#

ik that feeling

steady briar
#

i really dont need the server to know about hundreds of foliages being swapped, that seems bad

zinc zealot
#

ye..

#

one thing

#

why not run the "scan"

#

in the character BP ?

steady briar
#

i wanted to be able to attach the foliage swapper to things that might not have a bp

#

like a rock static mesh, stick that swapper bp to it and bam, foliage smashing rock

zinc zealot
#

but

#

in that case it would have to be replicated

#

maybe this is the problem ?

steady briar
#

i would only need to know that it is attached to the object

zinc zealot
#

ye but

#

if the swapper isnt replicating

#

and is attached to a rock

#

it means it would only show to the server right ?

steady briar
#

depends how u build it

zinc zealot
#

thats what i mean

#

what you have now

#

would it work on the rock ?

steady briar
#

if i attach the swapper to 2 characters, the server only needs to tell me that its attached to the characters

zinc zealot
#

why ?

steady briar
#

Client1 should be the one who knows about Client1 and Client2s foliage. Client2 should know about Client2 and Client1

zinc zealot
#

oh

#

so other clients see the foliage move ?

steady briar
#

because if someones half a mile away, i dont need the server telling me whats going on

#

yes, as it is currently.

zinc zealot
#

but...

winged badger
#

you don't care about what you can't see?

zinc zealot
#

im pretty sure that makes it impossible to do it with out replicating to the server

#

cause

steady briar
#

@winged badger i care about it, just not enough to kill a server

winged badger
#

i mean, is the solution where you have foliage swapped only on screen acceptable?

#

or is that too large a radius?

steady briar
#

its like... if Client1 has the swapper and it doesnt replicate, only client1 sees the swapping. ok... spawn a duplicate on Client2 so that Client1 sees both as if theyre his. Server need not know

zinc zealot
#

ahh

#

i understand

steady briar
#

i was hoping to have it not swap small foliage based on distance. i dont care about a tiny shrub at 200yds, but a small tree or bush prolly should.

winged badger
#

if you put a foliage swapper as an actor in the level

steady briar
#

having functionality in someone elses bp doesnt really work

winged badger
#

you can teleport it around where you need it

zinc zealot
#

what is it thats not working after all

winged badger
#

and you can even reference if over network without it being replicated

steady briar
#

the instance count is different between client and server, thats my #1 problem right now

winged badger
#

if its just the characters the "physics foliage" needs to react to

#

each character can spawn one on BeginPlay

#

have it teleport after him in 0,5 sec interval

#

it executes everywhere so every machine would have a swapper for each character

steady briar
#

well i made it a separate bp so that i could attach it to anything

zinc zealot
#

i would just make it on the player and replicate XD

winged badger
#

ofc you would

#

πŸ˜›

zinc zealot
#

but if that works thats much better

#

ye im lazy

steady briar
#

but its like.... ok imagine a particle. the server tells you where it is, but doesnt tell you where each particle goes

winged badger
#

there is no need for networking here at all

steady briar
#

well ya all i was saying is i need to know that they have the swapper. i dont need to know everything it swaps through the server

zinc zealot
#

well im gonna proceed with my work good luck xD

steady briar
#

but i was also wondering, where actually are instances?

#

@zinc zealot good luck

zinc zealot
#

thx πŸ˜ƒ

winged badger
#

are the conditions of something having a swapper entirely predictable?

steady briar
#

not sure about entirely

winged badger
#

how many swappers are we talking about 2? 10? 500?

steady briar
#

characters probably yes, except maybe random people in a town i know they wont be running through the woods

#

i would say in the hundreds

#

which is why replicating what the swapper does is not only too difficult, its not what i want

winged badger
#

the way to replicate it

#

is replicated swapper actor that doesn't replicate movement, does its work only locally and replicates only the reference to its attached owner

#

still far from ideal

#

best way if you can manage it, is to figure out which actor classes need the swapper

#

then have them spawn their own, and let the thing teleport after them and do its stuff

zinc zealot
#

can i get some help next ? XD

steady briar
#

well currently the character spawns it and attaches it to themselves. the swapper itself has just an invisible cube that i use as an origin for a multispheretrace

winged badger
#

it can do the swapping only if its close enough for effects to be seen on camera

#

that is easy an filter to do

steady briar
#

the frequency of the trace is based on the speed of the swapper, so it slows down when stationary, faster when moving fast

#

@winged badger well thats the goal i think. but for that to work it would have to be not replicating its function right?

#

also isnt that a hell of a lot for the server to replicate in general?

winged badger
#

even if it was a replicated actor it would not need to replicate its function

#

Tick executes everywhere, in case its replicated - that would be fine

#

in case its not - also fine

steady briar
#

so far i dont have anything on tick

winged badger
#

well, you don't want it doing swapping every frame

steady briar
#

no i have delays

winged badger
#

but tick can accumulate DeltaTime until its time for a trace, then call a function to do it

steady briar
#

i adjust the delay based on speed

winged badger
#

and that would run separately on each machine

#

replicated or not

steady briar
#

when stationary it swaps every .4seconds (swap also tells skeletals to stay skeletal), when moving normal speed ~.2 seconds, fast moving caps at .125

winged badger
#

(each machine that has it)

zinc zealot
#

can someone help ? i think my problem's simple

winged badger
#

still avoiding the Compendium?

zinc zealot
#

.....hummmmmes

#

but

#

:-:

winged badger
#

yeah, if you read it right away, you'd know how to fix basic problems by now

zinc zealot
#

ive read a bit

steady briar
#

i get tripped up by that thing too <_<

zinc zealot
#

what is this ?

steady briar
#

mainly because i dont know whats already done in the background

zinc zealot
#

this is the only thing that covers my problem

#

so basically the server is rejecting my connection ?

#

likely ?

#

cmon @winged badger 😦

#

rip

winged badger
#

for connectivity issues, read your logs

zinc zealot
#

can i ask where is that ?

#

the output right ?

winged badger
#

yes

#

and it saves in saved/logs

zinc zealot
#

this came out

#

LogOnline: Warning: OSS: Session (GameSession) already exists, can't join twice
LogBlueprintUserMessages: [MainGl_C_36] Failed to Join Session

#

anyone ?

#

ok its probably because im using the same pc

#

lol

#

what is this ?

#

LogNet: Warning: UIpNetDriver::ProcessRemoteFunction: No owning connection for actor ThirdPersonCharacter_167

unique thunder
#

@zinc zealot I had the same warnings last night

#

I think it's because you unpossessed your character and some logic ran afterwards

#

It's generally fine, you just won't be able to run any logic that depends on a playercontroller being present.

#

The characterBP will continue to tick & run events

zinc zealot
#

thx ``

#

btw @unique thunder but do you know why does it happen

#

cause im actually having problems because of that

unique thunder
#

@zinc zealot Are you running the 'Unpossess' node in your character at any time?

zinc zealot
#

nop

unique thunder
#

@zinc zealot I see it says ThirdPersonCharacter_167, are there a lot of other character blueprints of that type in your level when you test?

#

These warnings (and the ones you mentioned earlier) are typically okay to ignore when you're testing locally on a single PC. At least from my experience, they're common but I don't fully understand them and I have no issues in real multiplayer scenarios.

twin juniper
#

Does anyone have an issue with walking up hills and a jitter?

unique thunder
#

@twin juniper It's a common issue and likely not multiplayer-related, do you have the same stutters walking up-hill testing solo local?

zinc zealot
#

Sinn is just that i tought this might be related to one of the errors i was having

#

like

#

i have a pistol

#

the bullet is spawning from the character BP

#

but sometimes it doesnt get to the server well

#

something like that

unique thunder
#

depends on how you're replicating the firing action (also make sure that the bullet can't collide with the gun on spawn. change the collision logic in the spawn node to always spawn and ignore collisions - could also go as far as to disable collisions between the bullet and the gun completely).

zinc zealot
#

ye i did that

unique thunder
#

you always have to spawn actors on server, it'll replicate this way - are you doing that already?

zinc zealot
#

something like this right ?

unique thunder
#

I'll show you how I'm firing my projectiles, but on a side note - one cool thing to know:

#

Saves you lots of space and both must be true to pass

zinc zealot
#

thx πŸ˜„

unique thunder
#

Click Open Original to zoom in

#

Ignore the 'Trigger Firing Server' event

zinc zealot
#

how does it go to the others ?

unique thunder
#

Event on Used > FireGun

#

(didn't show in that pic, my bad)

#

No way

#

Wait*

zinc zealot
#

you arent spawning a projectile

unique thunder
#

Event on Used > FireGun + Fire Gun Local (both of those get executed). That "FireBullet" event leads to a projectile spawn

#

The one set on a looping timer event

zinc zealot
#

and that works fine for multiplayer ?

unique thunder
#

So: Event On Used > FireGun + FireGunLocal. FireGun triggers the FireGunServer multicast and the FireGunLocal triggers the projectile spawn

#

Yeah it works every time πŸ‘Œ

zinc zealot
#

nice πŸ˜ƒ

#

what is set timer by event ?

unique thunder
#

That's because it's an automatic gun, the FireRate will determine how quickly the event re-triggers and it'll keep looping and firing off the FireBullet event until I stop firing (which uses the 'invalidate timer by handle' node to stop the timer from ticking and firing the event)

zinc zealot
#

xd

#

when i did an automatic weapon

#

i did a custom event

#

a branch if i was clicking

#

a delay

twin juniper
#

@unique thunder I think so yes

zinc zealot
#

and the custom event

#

xD

#

to trigger you know

#

it was a loop

twin juniper
#

I haven't tested though. How do I fix this issue?

zinc zealot
#

thx ^^

#

can you send the rest of the bp btw ?

#

it doesnt show where you spawn the projectile

unique thunder
#

@zinc zealot The timer I'm using is exactly the same as a Delay but I heard that it's more efficient than just a regular delay. Apparently regular delays will continue running other logic and then return back to itself on complete to resume. It might present some rare replication bugs, not sure.

#

Yeah sure

#

I'll PM it to you, will take a few screenshots

zinc zealot
#

thx πŸ˜„

#

ahh finnally will complete this tiny game XD

#

well that and the knife still have to finish that

unique thunder
#

@twin juniper If it also happens offline when you play on your own then it's probably a collision problem with the mesh you're trying to climb. Think of the hill as a staircase with very small steps and your character is sometimes running into steps instead of climbing them. If that is the issue then smoothing out the landscape you're climbing might do it if it's too rigid

twin juniper
#

It's a landscape

#

It doesn't seem too rigid to be honest though.

#

Is there a way to do some sort of "smoothing?"

#

@unique thunder

zinc zealot
#

he's sending me the screen shots xd

unique thunder
#

@twin juniper Yeah, open up the landscape tool - it has a smoothing tool you could use, just make sure the strength or whatever it was called is set to something very low so that it doesn't over-do it πŸ‘Œ

twin juniper
#

The landscape is too big

unique thunder
twin juniper
#

That's not a very viable solution

#

It's over 50 km

unique thunder
#

No, the smoothing tool lets you paint over the landscape so you only smooth out a very small area. (you'll need to rebuild lighting though, this is similar to moving a static object)

twin juniper
#

Im going to make sure

#

its not happening in single player first

#

i mean make sure it is

#

yeah it's only in multiplayer

steady briar
#

who would ur landscape need to be 50km?

zinc zealot
#

so

#

this happened

#

LogNet: Warning: UIpNetDriver::ProcessRemoteFunction: No owning connection for actor ThirdPersonCharacter_167. Function Tick will not be processed.

#

hmmm

#

ok i think i understand

#

its the unposess thing again

steady briar
#

at least ur getting somewhere. ive made negative progress <_<

zinc zealot
#

oof

#

sry

#

anyone know this

#

LogNet: Warning: UIpNetDriver::ProcessRemoteFunction: No owning connection for actor ThirdPersonCharacter_167. Function Tick will not be processed.
LogNet: Warning: UIpNetDriver::ProcessRemoteFunction: No owning connection for actor ThirdPersonCharacter_167. Function DeadServer will not be processed.

#

Is there a chance

#

its because im running on the same machine ?

winged badger
#

no

#

its because you are running a Server RPC on Tick without any filters

#

which would be pretty terrible even if it did work that way, RPC on Tick = bad

zinc zealot
#

what do you mean filters ?

#

do branches count as filters ?

zinc zealot
#

._.

#

oof

#

i guess the problem wasnt rly ticks

#

were they

#

xD

#

f****** no connection :-:

winged badger
#

which is UIpNetDriver for you ran a Server RPC from an object not owned by your PlayerController

zinc zealot
#

?

#

hmm

#

but

#

so the problem is im running an RPC on an item i dont own ?

#

theres only one thing i dont own

#

i think im running a RPC

#

this should do the job right ?

open cape
#

post where your PickPistol function is called

winged badger
#

its not about the Pistol

#

Compeeeeeeeeeendium...

zinc zealot
#

@winged badger can i ask which part ?

winged badger
#

the "No owning connection" part

zinc zealot
#

you mean this chapter

#

Ownership.................................................................66
Actors and their Owning Connections.

winged badger
#

that is just part of your problem, but i am sure the answer is in there somewhere πŸ˜›

zinc zealot
#

a Server RPC
will be dropped if a Client calls it on an Actor that he does NOT own.

#

right?

#

dont i own it though ?

open cape
#

did you set the owner on the server or the client?

zinc zealot
#

both i think

#

i sent you the wrong BP

#

its a multicast

open cape
#

you should spawn just on the server

#

and itll replicate to clients

#

as long as it is set to replicate

zinc zealot
#

fffffff

#

no, it replicates on clients

#

but looks kinda glitchy

#

need to replicate in the owner too

open cape
#

yeah itll still replicating, but its also spawning on the clients

#

which you shouldnt do

zinc zealot
#

?

open cape
#

just spawn it on the server

#

instead of both

zinc zealot
#

it looks glitched

#

you barely can see the bullet for some reason

open cape
#

after you changed something? or as it is in your screen shot?

zinc zealot
#

if i change from multicast to run on server

#

@winged badger

#

it comes down to this right ?

#

i hope i havent broken this beyond repair xd

open cape
#

you probably need to also then SetOwner on the client

zinc zealot
#

thx

#

im gonna try tomorow im kinda tired now xD

open cape
#

since right now its just setting it on the server

#

ok

zinc zealot
#

cya

#

good luck with your project o/

open cape
#

thx u too

unique thunder
#

This function plays a sound at location but through a client RPC, why can everyone hear the sound?

sharp pagoda
#

@unique thunder Unless SoundBulletWhiz() does something I can't see, other players can't hear it. Are you just testing this in editor?

unique thunder
#

@sharp pagoda

#

This is all it's doing

sharp pagoda
#

"Are you just testing this in editor?"

unique thunder
#

Oh,

#

Yes

#

But I tested it on the servers as well

sharp pagoda
#

That's why

unique thunder
#

All nearby clients can hear it on server as well

sharp pagoda
#

Then you must be sending that RPC to other players

#

Try printing debug info

unique thunder
#

Not sure how that's possible if I'm running it on client RPC ;/

sharp pagoda
#

You're probably sending that rpc to other players

unique thunder
#

It happens when a projectile overlaps a player's collision sphere around their head. Overlap triggers this client RPC and plays sound

#

I know the overlap happens on server but I don't see why the sound plays on all clients if it's executed inside the player it overlapped through a client RPC

winged badger
#

@unique thunder both projectiles and players exist on both client and server?

rose egret
#

when we spawn a new replicated actor on server all its replicated properties will be send for the first time am I right?
I saw AActor::GetLifetimeReplicatedProps ant it has lots of properties which I need just owner :)
my actor is actually a bullet which I generate a lot of them :)
so my question is how do I improve my net bandwidth here ?

manic pine
#

look into conditions

ember jasper
#

My collegue Chimyx and I made a lot of researches on the web and even deep inside the Unreal Engine core without success with our issue :
We're attempting to setup a simple voice communication between two computers using the sessions system to connect each others.

We even digged into the Shooter example's code from Epic.
It works as intended with this project, but not with our nearly empty project.

We added the following to our ini files :
DefaultEngine.ini
[Voice]
bEnabled=true
[OnlineSubsystem]
bHasVoiceEnabled=true

DefaultGame.ini
[/Script/Engine.GameSession]
bRequiresPushToTalk=false

Also we're working with cpp so we do not need to use "Advanced sessions plugin".

If anyone who ever succeeded to make this work was willing to spend some time with us it would really be appreciable πŸ˜ƒ

zinc zealot
#

that would be so cool

#

idk much so i doubt i could be of help xd

zinc zealot
#

Guys

#

if theres an actor in the world

#

its owned by the serve

#

server

cobalt steeple
#

Depends on who spawned it

#

If it's not specified on spawn (default behavior) it's the server

thin stratus
#

@ember jasper Are you ever calling StartTalking or whatever the PlayerController function is?

cobalt steeple
#

@thin stratus Do you mean StartNetworkedVoice ?

thin stratus
#

Idk if they renamed it

#

But the function to enable talking was "StartTalking" on the PlayerController

#

Has to be called once at the start if not using ptt

#

Or when the player presses the talk button

cobalt steeple
#

Yeah, that's what we call

#

(code from APlayerController in the engine)

#

StartTalking calls ToggleSpeaking which calls StartNetworkedVoice

#

We tried both

#

We checked that the code was actually called

manic pine
#

youre on different comps when testing it? seem to recall it not working on same comp

cobalt steeple
#

Going step by step in debug mode we found that everything was working fine

#

yes differents comps

#

ShooterGame voice chat works well on the same setup

ember jasper
#

Thanks @thin stratus @manic pine !
It must in fact be something obvious we are missing here, but it's neither the "StartTalking" function call nor the amount of computers we are using (currently two) unfortunately.

rose egret
#

what happens to PlayerState when a player controller leave the game?
what happen at all when player leave ?

thin stratus
#

I only have this in addition to bHasVoiceEnabled VoiceNotificationDelta=0.2

#

Everything else seems the same

#

Idk about your other Settings for OnlineSubsystems

#

@ember jasper

#

Well and LogVoice vebose to see what's going on

#

And then all I do is call "StartTalking"

cobalt steeple
#

How do you turn LogVoice verbose ?

thin stratus
#

[Core.Log]
LogVoice=VeryVerbose

#

Something like that

#

Don't have it at hand right now

cobalt steeple
#

all right thanks for that !

#

We'll try that and try VoiceNotificationDelta

twin juniper
#

Is it safe to increase NetServerMaxTickRate= to 40. Will my computer crash?

#

My computer overheated a while ago.

#

Almost caught fire

zinc zealot
#

my pc is dying

#

every action i do takes 20 seconds to do

#

rip unreal

twin juniper
#

@zinc zealot please be safe, my friend lost his computer to unreal

#

it overheated and caught fire, the same almost happened to me!

zinc zealot
#

holy

#

i tought that was a joke

#

fuk

#

guys

#

LogNet: Warning: UIpNetDriver::ProcessRemoteFunction: No owning connection for actor Bullet_C_1. Function ShotServer will not be processed.

#

shouldnt this be working ?

#

is the rpc shot server

#

being invoked by the client or server ?

twin juniper
#

@zinc zealot did your machine overheat?

#

bsod?

zinc zealot
#

idk

#

gonna put my fan 100% XD

twin juniper
#

liquid cooling can help when running unreal

zinc zealot
#

oofXD

twin juniper
#

i recommend getting it

zinc zealot
#

like i had money for that

twin juniper
#

liquid cooling will help a lot!

zinc zealot
#

ye but

#

my dad wouldnt let me xd

#

my old graphics card can handle it πŸ‘Œ

zinc zealot
#

ok i kinda fixed part of it

#

and i mean my game xd

meager spade
#

new computers don't catch fire when they overheat, the cpu has thermal cutout which will cut power to it when it gets too warm

zinc zealot
#

ye

#

but who knows xD

#

thats why you dont use a vodka cooling system

#

damn russians

meager spade
#

well modern cpus, and gpus all have thermal cutout

#

unless your using a crap powersupply which shorts or you spill something, it ain't gonna catch fire.

zinc zealot
#

you dont know what to say about what i just said do you XD

meager spade
#

glanced at the vodka and made a drink, nope nothing

zinc zealot
#

xD

#

wuu wuu i think i fixed all the replication errors i had XDD

#

Yeet

#

sry

#

its workiiing

zinc zealot
#

hmm

#

LogScript: Warning: UGameplayStatics::BeginSpawningActorFromClass: can not spawn an actor from a NULL class

#

what does this mean

winged badger
#

it could not be more clear

#

where you have an input pin for the actor class, you have a null pointer

zinc zealot
#

ahhh

#

ok thx

#

xd

winged badger
#

gg on reading the output log tho

zinc zealot
#

its rly helpful im doing all the time now XD

#

fixed all my other problems btw πŸ˜ƒ

#

almost alll of them XD

#

at least the ones who were game breaking

#

so thx @winged badger

winged badger
#

so, did you figure out why you had "No owning connection" ?

zinc zealot
#

ye

#

went to the RPC part

#

of the compendium

#

fixed all my problems

#

xd