#multiplayer

1 messages ยท Page 311 of 1

verbal slate
#

This has 2 issues:

#
  1. It does not work for client, when I try to restart with client it just crashes engine (probably because only server has access to GameMode)
#

2. When I spam respawn button while turning camera around, FPS goes down significantly even to single digits EDIT: found out that this has to do with player 2 spawning incorrectly

worthy wasp
verbal slate
#

Thank you, I'll check it out

worthy wasp
#

this obviously uses PLAYER STARTS array that is setup at PostLogin event inside of gamemode of the SERVER client.....

#

you'll definitely want an AUTH branch - because this fires for any connected client

#

actually to more correctly put it - this fires for every client that connects to a NON-SEAMLESS travel

#

QUESTION - through docs reading, various tutorials & examples... they claim that GameState class is known to all connected clients.....

Well why do i have a replicated variable that never is replicated to client - but server sees it just fine in GameState class? Gamemode is setup to use this gamestate, the replication fo teh variable is set to REPLICATED. But this timer function i'm doing to pump the variable just to test, is sitting at 0 on clients, but increments on server.....

Is there a better way to do a TIMECLOCK function ?

#

either one displays 0 (default) on clients

#

Instead of trying to access this variable from each client - should i push this variable TO the client from the game mode? I can easily do that.... i guess it woul dbe 0 difference in bandwidth no?

thin stratus
#

So it doesn't get replicated?

#

I mean, the GameMode itself does not exist on the Clients

#

So having a replicated Variable in him makes no sense

#

The GameState on the other side should work

#

Can you should me how and where you are actually setting the variable?

#

@worthy wasp

chrome fable
#

Hi all! Just looking for some guidance on getting RPCs working properly. Building a multiplayer proejct in which two pawns play their own version of game side by side. I have one of the players set as a listen server at the moment, and for that player, all of my RPCs seem to be working properly and replicating to the other client. I'm having issues however running any RPCs on my client. Just getting the no owning connection for this actor warning. I tried setting the owner of any blueprint with this issue to the playerController of the client's pawn but still no dice. Am I missing something with how that needs to be setup? Thanks so much ๐Ÿ˜ƒ

brittle sinew
#

I'm guessing you're trying to call a server RPC on another actor from your client?

#

You unfortunately can't do that. It's basically a way to prevent clients from calling their own authoritative calls onto an actor that they don't own, which means you have to work around it

#

Setting the owner of an object to allow it to call server RPCs on is a solution that really won't work if it's a replicated actor to everyone, as you will only enable one client to call onto it

chrome fable
#

@brittle sinew Thanks for that clarification, much easier to understand than some of the documentation! What is the best approach then for calling server RPCs from a client, or rather asking the server to call them itself? Sounds like Set Owner is definitely not helpful >.<

brittle sinew
#

The only real way to do that is routing the RPC call through something your client owns, like its PlayerController. It is a bit of an inconvenience, though it makes for a much more robust set of things the client can and can't do

chrome fable
#

Okay I will try that instead. By routing the RPC you mean having each actor receive an event / function call from the client's PlayerController, rather than calling those RPC's within the actors themselves correct? The events within those actors wouldn't need to replicate then, right? Thanks again for the help by the way, it is much appreciated!

wary willow
#

@chrome fable Are you trying to do something like OriginalSin?

#

Also

#

You don't have to use PlayerController to do RPC calls to the server or receive them

#

If you wanted specific stuff to happen to specific players, use their playerstate

#

Or to keep track of stuff for each player

#

But you can make Server RPC calls anywhere you want, as long as you know why you are doing it

#

I think what you are looking for is Is Locally Controlled

#

For the other stuff

brittle sinew
#

I don't believe you can just make server RPC calls on unowned objects? Or at least I haven't as long as I've been doing MP, and the docs say that as well

#

Not to receive, obviously

wary willow
#

What do you mean by "unowned objects" ?

brittle sinew
#

An actor that a client doesn't own

wary willow
#

I still don't have all the MP lingo down

#

Do you mean the client's version of the server object?

#

Or like some actor in the world, that is just hanging free?

brittle sinew
#

I mean some random replicated actor, owned by the server or another player, you can't call server RPCs onto

#

By design

wary willow
#

So, you're saying that I can't call a Server RPC from a player or whatever event caused the Server RPC call, to that random replicated actor?

brittle sinew
#

Yes.

wary willow
#

Are you sure about that?

brittle sinew
#

You own your PlayerController and consequently your pawn, so you can call events on them

#

There's a table midway down, that shows what occurs

#

If you're the server you can do whatever, just because you're the server, so I'm guessing that's why their server worked but not client

wary willow
#

Ah, so you mean that the client version of the server object will not do anything

brittle sinew
#

Well, not really, the RPC call will not occur at all

wary willow
#

Hmm

#

Why not? It should

#

If there's a replicated actor in the world

#

That means the server created one

#

And if the clients can see it, that means they have one as well

brittle sinew
#

Yes, but they don't own that actor unless you manually set them to

wary willow
#

The RPC call should still occur, but it wouldn't be translated to the clients

#

Yeah, looking at the chart now

brittle sinew
#

That says the call is dropped...?

#

๐Ÿ˜›

wary willow
#

Well, that's from client but yeah lol

#

So yeah

#

It still runs on server though

brittle sinew
#

?

brittle sinew
#

If you call a server RPC from a non-owning client, the call doesn't occur

wary willow
#

I am looking at this

brittle sinew
#

Yes, from the server being the keyword

wary willow
#

Ah you mean calling it from

#

I thought I asked that earlier though

#

And you said calling it to

brittle sinew
#

Yes, I meant to earlier

wary willow
#

Ah

brittle sinew
#

Main rule of thumb is if you're the server you can do pretty much anything, if you're on a client you have to follow the owning rules

wary willow
#

yeah, server is king

#

"everything" routed through server = ggwp

keen gale
#

shameless repost from general thread:

#

Is it okay to call unreliable RPC in a game loop? How does it affect what is sent? Will it pack all the calls into 1 big compressed packet to send? Thanks for any info. I wish I had more time to closely study sources. ๐Ÿ˜ฆ

night jay
#

for server calls, pretty sure you can't call them from clients if they're not part of the same class

#

So if the client actor is unowned, and say that actor calls another actor to perform a certain action on the server, it won't fire

#

Was wrestling with this in BPs

keen gale
#

yeah I see what you mean, but it's not a problem here, because I do it from a possesed character

night jay
#

In my case I have to manually spawn anything anyway since I want everything to respawn once in a while

keen gale
#

question is it a good/okay practice to call unreliable rpc every loop tick

#

and what does it do

#

in the end

night jay
#

Not good IMO

#

Even if unreliable, it will take up bandwith

keen gale
#

why do you think so, it could pack it into big packet and compress it

#

or drop it entirely

#

due to being unreliable

night jay
#

What are you trying to call anyway

keen gale
#

I want to send float every loop cycle via server rpc call

night jay
#

if it's on server, pretty sure UE4 optimizes it that only if the float has been changed it will replicate to clients

keen gale
#

client sends it

#

UFUNCTION(Server, Unreliable, WithValidation)
void ServerSetVar(float Var);

#

to be precise

#

even if you make it send only on change

#

float changes pretty fast due to fractions

night jay
#

What is the float exactly

keen gale
#

floating point variable

night jay
#

Yes, but what does it do in your game logic requiring it to be sent to the server constantly

keen gale
#

sorry I don't see how its helping right now

#

even if I said that I have custom input that changes constantly it won't make a difference

night jay
#

Your input would drive your character to do something and that replicates

#

Pretty sure it's not the input itself that would replicate

keen gale
#

yeah but it does not move it, it just affects it in a way its harder for player to control him in real life

#

anyway, if u want even more details

#

its an elliptical trainer connected via aruduino to pc from which we gather input and want to affect gameplay by making it harder to run on the trainer. The variable that affects current level of difficulty to "run" is on the server

#

you could argue to move everything to client

#

but thats besides the point

night jay
#

Hhmm

#

And this is happening on network?

#

Like how many people should thattrainer support at the same time

keen gale
#

we could always change approach, but what I'm interested to know is how UE4 operates under the hood without taking much time to stroll the sources

#

yeah, currently up to 4, but more ofc is possible

night jay
#

If it's not many you can probably just stick with what you have in mind

#

And the difficulty is shared?

keen gale
#

no, everyone has its own

#

when you bump into enemy or something

night jay
#

Can you see eachother's difficulty

keen gale
#

no

night jay
#

So I'm assuming you're having an array of float variables for each player's progress

keen gale
#

the only reason it is on the server is that server can control it and act on it by spawning mobs or anything else

#

not really

#

well, it will take a long time to describe everything

night jay
#

Well whatever you have that tracks the player's progress, that doesn't have to replicate

#

Only the server needs to know that information

keen gale
#

the point is trainers are not connected to server

#

they act as input device

#

you need to know their input on the server

#

but thanks I got to the idea

#

that I could just get movement speed of the character that is already "replicated" from client

night jay
#

Hhmm alright

keen gale
#

it wont help for every situation, so the question remains, but it works for now

#

ah no I can't

#

lol

#

player stands still at this moment, anyway, I'll figure it out I guess

night jay
#

Pretty sure character position is replicated automatically too

#

If that helps

keen gale
#

yeah, and some rotations

#

its by default for every actor I believe

thin stratus
#

Aaand it's back online

meager kestrel
#

wow) nice) always good to learn something new

#

re-routed my point of attention to Romero Blueprints Tutroial cause Network Compendum recommended me to do that

native axle
#

I need to spawn a replicated action (so server-side) then pass it back to client since InputActionHandler is not replicated.

thin stratus
#

Eeeehm

#

ActionSkill needs to be replicated?

native axle
#

Yes

#

Basically can I do something when the Actor (ActionSkill) is finished replicating

#

without doing a repnotify?

#

cause I will need to spawn multiple ActionSkills in a sequence

thin stratus
#

Well, the BeginPlay of that Actor calls when it's spawned

#

If you limit that to the owning client

#

Then you have a call for when it's ready

native axle
#

Aha

thin stratus
#

You then only need to handle that enum differently

#

I mean

#

You would remove the delay and rpc call

#

And then you would use the BeginPlay of the Skill

#

Do something like "SwitchHasAuthority->REMOTE->Branch(IsLocallyControlled)"

#

And after that you get the owner (or just PlayerController0) and call the "AddAction"

#

Which then would be just a normal event

#

Idk what the enum does though

native axle
#

Yes I gotcha

#

and I will need to pass the enum into the SpawnActor

thin stratus
#

Yes, though would work I guess

native axle
#

Mmm just imagine enum is a hotkey

#

so Skill1 is bound to 1

thin stratus
#

Yeah got that, was more like how you actually set it

#

cause in the image you hardcoded passed it

#

But yeah, you might be able to just pass it as a "ExposeOnSpawn" variable

native axle
#

Ok thx I'll give it a shot

thin stratus
#

No biggie

native axle
#

Sounds like it should work ๐Ÿ˜ƒ

native axle
#

@thin stratus Worked perfectly ๐Ÿ‘Œ

thin stratus
#

awesome

worthy wasp
#

I'm trying to access other players PlayerState variables in a UI.... so i can have PARTY HP bars.... unfortunately the variables are coming up default values.... which is weird because i can go to the PlayerState, print string the variables on tick and watch them go down as I take damage.... but this is all on the server thats printing it...

How do i access other's playerstates so that I have access to their variables inside? My current attempt was to GetGameState()->GetPlayerArray->ForEach(CastToPlayerstate()->GetVariables())

http://puu.sh/u3eWT/bee48bfa45.jpg

#

even as the SERVER - this is coming up as default variable values (currently 0).... but like i said - as i print string INSIDE the playerstate class, the SERVER prints out the variables appropriately

chrome fable
#

For RPCs, is it the event or the call to the event that needs to take place on an owned actor?

worthy wasp
#

@chrome fable - i'm a bit novice (at best) for networking - but all my functionality happens within the same class - therefore all calls AND events happen in the same actor for me....

#

could you give an example where it would be different?

chrome fable
#

Sure, if you could imagine a set of two playerCharacters in a scene with an actor Blueprint containing a cube. Player one calls an event on that blueprint that changes it to the color blue. That event could be set to replicate, allowing player two to potentially see the change as well. Hope that makes sense ๐Ÿ˜ƒ

brittle sinew
#

Server RPCs can only be called from a client on an actor it owns, client or multicast RPCs from the server work fine on a client that doesn't own the object

#

And it must be called onto an object it owns, I don't think I answered that part

#

But, once you're on the server, you can do anything you want to any object that the server has access to

chrome fable
#

oh hey again @brittle sinew thanks again for the help yesterday! So you're saying that the call to the server RPC must happen on an owned actor, but additionally, the event itself must also exist on an owned actor?

brittle sinew
#

Yes, the rule wouldn't have much use otherwise, as the client always has an owned actor in their PlayerController anyways ๐Ÿ˜›

chrome fable
#

I think I may be doubling my server RPCs out of confusion. I was trying to route them through a playerController or SetOwner on relevant BP Actors but still experiencing that ownership warning

brittle sinew
#

Basically, you need to run the server RPC from your client PlayerController onto your server PlayerController, and set things from there

chrome fable
#

And this could also be done from the player's character since it is by proxy also owned by the client?

brittle sinew
#

I believe the player's pawn is owned by the player, yes

dawn glen
#

so if i have logic that i want to run on the server and other code i want to run on the client i use the auth switch, when the server is in listen mode remote doesnt fire. So should i instead of checking for auth be checking for dedicated server so that a listen server can do both remote and server stuff?

chrome fable
#

@brittle sinew Structurally, would you recommend avoiding setting ownership on actors then?

#

and simply always route RPCs through a client PlayerController?

brittle sinew
#

If a single client shouldn't have ownership over something, just in a "looking at the purpose of the actor" way, then no, you shouldn't set ownership on it

#

If you have an actor that corresponds to each player and needs to be used by that player solely, that might be a different situation

chrome fable
#

If I have a replicated actor that I run a server RPC on to change say its color, won't that replicate to clients? I guess I'm starting to get confused about the purpose of multicasting

brittle sinew
#

If the component is replicated, then setting a variable on it probably won't have to be multicasted, no

#

But take a situation where you want a sound effect or explosion or something else that isn't a variable change, that might be better with a multicast

chrome fable
#

Ahh I see

somber lava
#

any experienced multiplayer devs here? got some basic questions on the concept of a dedicated server in unreal. answering those wont take long i think ๐Ÿ˜ƒ

#

a PM would be appreciated ๐Ÿ˜ƒ

wary willow
#

@somber lava Perception Neuron?

#

@BogiBoy you can also read the official docs

somber lava
#

i did, doesnt really help me with understanding where which parts of the code go

wary willow
#

@somber lava what code are you interested in exactly?

wooden minnow
#

thank you so much for having Network Compendium link handy ๐Ÿ˜„

somber lava
#

seems to be down, any mirror?

wary willow
#

Pinned

chrome fable
#

Does actor ownership replicate if set on the server? For example if I set owner on a player's character, does that need to be multicast, or can it be run on the server alone?

wary willow
#

@chrome fable read last night's msgs

#

Between me and lethal

#

There is a cheat sheet you can use

chrome fable
#

hey @wary willow, I did read those, thank you! I guess I was curious about ownership specifically, if that was something that needed to be set on a multicast or if setting on server is okay? It seems like the owner of my of characters doesn't get set properly on client but does get set on server.

wary willow
#

Server is God

#

If you read that cheat sheet it will answer your question though

#

We were specifically talking about this last night and pulled docs

chrome fable
#

When a pawn is possessed, does its owner change to the playerController possessing it?

fossil spoke
#

Yes.

chrome fable
#

@fossil spoke Thank you!

orchid cairn
#

For something like health regen for a multiplayer title, obviously on the server i have a variable which is the regeneration rate, normally for a single player title there's no issue doing this on tick (multiplied by delta time obviously). however for a multiplayer title this would be sending replicated data every tick to the client(s). would i be better off say implementing a timer on the server and doing regen every 0.1s? or a longer timer?

#

as a follow up to that, if i'm going to do it on say a 1 second timer, am i better off syncing this for all players, so the game state will call a "regenHealth" function, that will tell every actor that needs to do so to do it on the same tick, therefore the replication will be a single packet per second (although with alot more data)

#

or am i overthinking things here? considering position data is already being sent every network tick anyway?

fossil spoke
#

If an optimisation to the network is easy to implement, then why not just implement it, every packet that you dont have to send can be used for something else more important.

#

I would implement the regen as an Timer that loops with a RegenRate on the Server, the client would only be asking for the updated value of their Health variable via variable replication. The engine does low level optimisations for variables as well, so if the Health isnt changing the Engine wont needlessly continue to send the same data.

#

Variable replication is only ever made when the value of that variable changes, so if your Timer is running from RegenRate every 1 second for example, your only updating that variable once a second and its only sending packets for that variable when it is updated.

orchid cairn
#

@fossil spoke - done, thanks for the advice ๐Ÿ˜ƒ

raven holly
#

Why would I have to delay after spawning an actor before attaching it to a component

#

๐Ÿค”

raven holly
#

Like a delay of 2 seconds it attaches correctly

#

No delay is spawns in africa

#

ยฏ_(ใƒ„)_/ยฏ

slim holly
#

Question: why doesn't my rocket do any radial damage unless it hits an actor?

#

@orchid cairn I actually just did health and shield regen, figured it's best done in character

orchid cairn
#

@slim holly - correct, or create an actor component for it. when i say it's on the server, i should have specified i have a variable stored on the server authorative version of my pawn where the logic is performed, with the result being replicated to the clients

slim holly
#

I mean, you could set up a custom tick chain to update the values on desired intervals

#

like gameplay every tick, stats every 5th tick

#

but I'd rather rely on default replication and network priority when it comes to health, since it's kinda important value AND it's part of the hud

orchid cairn
#

@raven holly - sounds like replication "lag" - are you spawning both the actor and components on the server?

raven holly
#

Indeed I am

#

AI spawns, then begin play initates the spawn gun

#

All happens on server

orchid cairn
#

spawn the gun, put a delay of 0 (basically it's a 1 tick delay) then try the attach?

raven holly
#

Delays arent really reliable for this sort of thing tbh

slim holly
#

hmm ๐Ÿค”

raven holly
#

nope

slim holly
#

@raven holly try checking is the component valid before attaching

raven holly
#

But that wont fix it lol

#

It'll just throw invalid and never attach if it's not valid

#

The component is valid

slim holly
#

yea but if it's invalid, you can set a delay of 1 frame and try again

raven holly
#

Infinate loop?

#

Nope

#

:p

slim holly
#

in theory, it generates infinite loop, but it works

#

lemme show you

orchid cairn
#

there's nothing in the construction script of the component that might be messing you up?

raven holly
#

Will crash the engine

#

nope

slim holly
#

it looks like an infinite loop

raven holly
#

delay frames?

slim holly
#

wwell technically dalay of delta world time

#

but I have function library addon for that

raven holly
#

Oh

#

I dont have that.

slim holly
#

it's free on marketplace

#

has some neat stuff

orchid cairn
#

check out the LowEntry plugin for stuff like that also

slim holly
#

yea that one

orchid cairn
#

and with that code, you dont need a reference to the PC in the PS... or vice versa

#

you already have them

slim holly
#

but back to the topic, it can't loop indefinetly because the component is generated on build(I assume) and it will be eventually valid unless the pawn build fails -> no loop

#

but if you're really worried about that, use Do-N gate

#

and set it to 1000 or something, so it wont try more than 1000 times before giving up

raven holly
#

May have fixed it by letting the gun tick before begin play

#

Nope.

slim holly
#

oh and if you do add >1frame delay, it can't crash the engine

#

it no longer considers it as infinite loop

raven holly
#

I just did delay of 2 seconds

#

ยฏ_(ใƒ„)_/ยฏ

#

Hopefully it doesnt fuck anything

slim holly
#

arbitrary time delays are bad mmkay

raven holly
#

I know.

slim holly
#

the loop I showed you can be debugged tho

raven holly
#

debugged?

#

in what way

slim holly
#

BP debugging, the execution pins light up

raven holly
#

This works and doesn't throw infinate shit

slim holly
#

yeap

#

0.1 works fine

raven holly
#

Cool.

#

Now I need to do this for my player ๐Ÿ˜„

#

Multiplayer is fucking hard sometimes.

#

SPAGGETI MONSTER

#

Time to tidy this up.

#

Structs always get messy ๐Ÿ˜

slim holly
#

you should see my level editor, that's a god damn spaghetti kraken

#

right, I need to figure out why the radial damage isn't working outside spawn room

raven holly
#

o.o

slim holly
#

or more like, it isn't triggering unless the rocket hits an actor

raven holly
#

๐Ÿ˜ฎ

#

CLEAN

slim holly
raven holly
#

nice

#

We need a blueprint porn blog kappaross

slim holly
#

all that just to update one structure in struct array

#

because you can't directly set single values inside struct variable array

#

it did occur to me

#

this applydamage is suppose to happen in the damaged actor

#

which makes no sense

#

huh, it works on static mesh tho

#

but not on bsp brush

raven holly
#

BSPs dont take damage i dont think

slim holly
#

yea but neither do staticmeshes

raven holly
#

hmm

slim holly
#

so it has something to do with collision channels

raven holly
#

You sure?

#

Thats static mesh

slim holly
#

I disabled that for the spawn room, still worked

#

hold on

raven holly
#

ยฏ_(ใƒ„)_/ยฏ

slim holly
#

nope, mesh damage is off by default

#

actually

#

ahh I see

#

so the radial damage was set to trigger at impact point, setting it to trace hit location fixed it

#

so it was indeed a collision issue

somber lava
#

reading through the network compendium atm. just wondering, do i need to include checks for authority in the gamemode? since it is only executed on the server i shouldnt need that, do i?

low elm
#

GameMode not exists in the clients, so you cannot call any function from clients. If you try to access GameMode in client, you will just get NULL.

slim holly
#

well you rarely need to check authority anyway

somber lava
#

how so? i thought this prevents cheating?

slim holly
#

mostly, gamemode usually contains rules for the match

#

it's not impossible to exchange data with gamemode as client, but it takes the extra step always

#

you need to do event on client side, send it to server side which then looks up the game mode

rare cloud
#

or use GameState to exchange data @somber lava

slim holly
#

only time I actually work with gamemode is when player requests a new character

thin stratus
#

You'll work more with it when you have different game modes and/or use the OptionsString a bit more

#

Other than that you can technically do a lot in all other classes.

slim holly
#

hmm, my weapon child actor doesn't appear to replicate always

thin stratus
#

Reading through the shootergame mostly showed that a lot of stuff just gets rerooted to the gamemode which could also been done on the gamestate /shrug

#

That's probably why they split it into gamemodebase and gamemode

slim holly
#

yo cedric, you know does radial damage ignore damage source intentionally?

thin stratus
#

Not using it often enough, sorry no idea

slim holly
#

as in can't shoot myself with it

thin stratus
#

I doubt that

#

Radial dmg is also explosion

#

And that depending on the game can hurt you

#

So i guess you would need to filter that in the players Damage event

#

(DamageCauser ! = self) or so

slim holly
#

I mean, by default it doesn't damage my own pawn

#

so I had to unplug the DamageCauser

thin stratus
#

Oh

#

Lemme check

#

Will tag you when i found something

slim holly
#

mkay

rare cloud
#

@slim holly, you can override the receive damage function and add your own logic for your Damage source

slim holly
#

yea but I had plans to use destructive enviroment

thin stratus
#

C++ or BP?

slim holly
#

bp

thin stratus
#

Doesn't seem like there is anything in place

#

The calls are mostly empty

#

They are passing the DamageCauser on

#

but I don't see anything using it

#

Only thing I see is that it's not broadcasting the events if the Damage is 0

#

Seems like there is an event in BPs for "ReceiveRadialDamage"

#

But "ReceiveAnyDamage" or "TakeAnyDamage" what ever it's called in BPs is called anyway

#

as long as the dmg is != 0

slim holly
#

log only prints client taking damage when server fired

#

but when I plug out the causer...

thin stratus
#

Hm

#

I don't see why

#

The code is never using the DamageCauser

slim holly
#

weird

#

well, I can manage without it

thin stratus
#

Oh yeah

#

So

#

the Documentation says your stuff is correct

#

DamageCauser: Actor that actually caused the damage (e.g. the grenade that exploded). This actor will not be damaged and it will not block damage.

slim holly
#

huh

thin stratus
#

You can still get who caused the damage by using the Instigator though

#

So no worry

#

It's even a better way to do that

#

The DamageCauser is normally the Grenade

#

and not the Player

#

Or the bullet/gun

slim holly
#

I actually pass the pawn along with the bullet

thin stratus
#

Yeah you would use the actual thing that deals damage

#

not the player

#

the player should be passed as the PlayerController in Instigator

slim holly
#

ye I should probably use that more

twin juniper
#

hi everyone. I'm currently not quite sure, but the client who started the session with a map including the option "listen" becomes the server and therefore has the authority right?

slim holly
#

yes

twin juniper
#

okay thanks

slim holly
#

ookies, time to learn some hashing

#

need to build cheat prevention

fierce birch
#

@thin stratus deleted the discord share now that you have site up again, just making sure that people don't use outdated guide if that's what they find on discord search etc

somber lava
#

are these variables public?

#

i want to recreate them, but cant access them when they are private. do i miss something or do they belong public?

thin stratus
#

They are public afaik

#

But you can't set them

#

Only get

#

at least some of them

#

PlayerName for example can be set by using "ChangeName" function of the GameMode and passing it hte PlayerController of the player

#

Spectator and AIBot is probably somewhat set by outside events

#

Haven't found a way to set Score yet, though haven't really searched for it either

somber lava
#

so when recreating them i have to make them public too?

thin stratus
#

You can't recreate all of them

somber lava
#

awesome script btw, well done.

thin stratus
#

Ping is set somewhere in C++

#

Spectator and AI is probably also used in C++ and I would not recreate them

#

only ones you could recreate are PlayerName or Score

#

And I would make them public or at least private+getter otherwise you can't really use them outside of the class

#

And thanks :P

somber lava
#

" or at least private+getter"

#

sadly i am a BP noob. i wanted to code c++ until i realized how different it is to java ๐Ÿ˜„

thin stratus
#

Well then I can only advise you to learn about C++ a bit more

somber lava
#

regarding the script, the only thing that you might want to change is the backgroudcolor of the code snippets. i always have the feeling that i marked it ๐Ÿ˜„

thin stratus
#

private: only the class itself can access the variable/function
protected (no idea if exists in BPs): only the class and its children can access the variable/function
public: every can access the variable/function

somber lava
#

yes i definitly want to. but i think its smarter to learn the basics of ue4 + game dev first

thin stratus
#

And getter: A const public function that returns a private variable

#

Also used to have some more control about how the variable is returned

somber lava
#

i am familiar with java so i know the concepts, i just wanted to point out that i cant use accessors with BP. at least to my knowledge

thin stratus
#

The variables have settings for that

#

working more or less like you expect them to do

twin juniper
#

VictorBurgos told me about some Replication Bug(s) according to VR HMD and/od Motion Controllers. Are those still a thing?

#

And if a client is connected to a server, does the server always move the client after the client made it's input?

#

Or is this more like a paradigm for multiplayer?

native axle
#

@twin juniper By default the client moves as soon as he gets input (on client-side)

#

There's no way for the server to move the client as soon as the client makes it's input

#

Since it needs to recieve the inputs

cloud ledge
#

I mean, you sorta can, but it will not be concurrent for all players

#

In source engine, the server will run players inputs in the past (so the effects are propagated until present time)

#

But that is only for players interacting with world, not with other players (which would be physically impossible as noted above)

twin juniper
#

Can one playercontroller make an other playercontroller kind of โ€œunpossessโ€œ it's pawn by overriding the possession?

slim holly
#

if server allows it

twin juniper
#

Oh, do I need to run every action as โ€œexecutes on serverโ€œ to make it happen correctly? Multiplayer sure is confusing at first

slim holly
#

server is the only one who can assign possesses

#

but finding the right controller references is gonna be tricky

rare cloud
#

@slim holly, @twin juniper, no you simply need GameState class, and you use the PlayerArray (an Playerstate array) from PlayerState you can get the player controller

#

Client : I made something
Server : Oh ok you need to possess this player, let me check the player array

slim holly
#

I was kinda pointing out the procedure of converting local actor references to server references for possessions

twin juniper
rare cloud
#

Amazing screenshot, install gyazo or lightshot ๐Ÿ˜›

somber lava
#

or dont install anything and use snipping tool ๐Ÿ˜„

twin juniper
#

Had gyazo installed and it broke somehow. I'm also testing vr multiplayer in a local network so no internet connection

#

Therefor, camera xD

slim holly
#

you can do local testing while connected to internet

#

just do manual open ip.add.res.s

twin juniper
#

Maybe but I'm not doing that right now

#

VR multiplayer frustrates me. I tested the multiplayer shootout on vr and it worked, but copying all the relevant code doesn't help me in my project :/

#

And I'm not even testing the motion controllers. The widget interaction just doesn't work properly, because the second player is somehow blocking the first player, but can't do anything but looking around... if the second player leaves, then the first one can use widgets again...

somber lava
#

where can i download the shootout project?

#

everyone is talking about it but i cant find it

twin juniper
#

You can download the project inside of the launcher

thin stratus
#

Launcher

#

Also, @somber lava if you need help, please post it here, so everyone can try to help.

#

You are free to tag someone if you want, so they can look at it once they have time

somber lava
#

ok will do thanks

twin juniper
#

I would love to know why the widget interaction breaks when a second vr player joins the session ๐Ÿ˜ž

slim holly
#

3d Widgets?

#

i remember seeing something about assigning controllers for those

#

didn't look into it tho since I don't own a headset

twin juniper
#

Yeah 3D Widgets

slim holly
#

no @rare cloud it's an widget interaction component issue Morpho is having

wary willow
#

@Morpho aka VizualTek did you get your answer? Because yes the bug is still there.

#

You have to manually replicate the components if you don't want the listen server to move clients in VR

twin juniper
#

I want a listen server who moves his own pawn and interacts with 3d widgets. The second player should join as a client and move and interact on it's own. I'm currently testing without motion controllers, just gaze based

wary willow
#

Right. Sometimes the HMD will work accordingly. But I wouldn't count on it doing that all the time. The motion controllers definitely do not work

#

If you don't manually replicate the components the listen server player will have control of all hand components

#

One day Epic will fix it....One day...

#

In the mean time. You can do it via tick, plugin, or source code change.

twin juniper
#

I save the motion controller issue for an other day. First I only want those two players to move and interact on themselves. The first player can still move but not use widgets when the second player comes in. The second player can only look, but both use the same pawn. The second player can at least see the first player moving around in space.

#

So I have to replicate the widget interaction or the hmd pawn manually? I'm really confused right now.... working on that for nearly 8 hours today

#

They even should have different pointer index each, so that shouldn't be a concern...

#

So now I have internet at the pc again.... @wary willow how do I manually replicate these? Is there any tutorial or manual for that?

#

In blueprint or in c++?

somber lava
#

i have looked through the shootoutproject + many tutorials now, but still cant find an answer. as i understand it the gameinstance is on the client and survives throughout level changes and so on. seemed like the natural place to store playername, playerclass and others for me. the playerstate is used during a game session to save playerscore and stuff for each client. but how do i communicate the playername/class from the gameinstance to the playerstate? i tried to fill the playerstate on "Event BeginPlay" but that never gets called, neither does the Construction Script. how do i communicate this data?

twin juniper
#

I guess you could tell the playerstate when the player joins the match with the "PostLogin"-Event which starts in the gamemode each time a new player is joining

heady merlin
#

Morpho thats my plugin, and it handles replicating the controllers and HMD, but if a plugin throws you off you can do it manually in blueprint and get it working currently

twin juniper
#

It doesn't throw me off, but I would like to understand this issue and solve it on my own ^^ Because it boggles my mind ^^

heady merlin
#

unless they recently reverted the ownership fix they applied that is. My controllers aren't derived from theirs so I haven't tested them in awhile. But they did specifically "path" ownership awhile back.

#

"patch"

#

motion tracking is client side, so the controllers movements must be client side as well in order to retain 1:1 tracking parity. The engine doesn't currently automatically replicate the client side movement to the server. So you'll have to manually RPC the locations up to the server and then from the server to all other non owning clients.

twin juniper
#

Like I said before. I used VR and HMD in the Multiplayer Shootout and it worked. I was able to play with those two Players. But in my project, the second player somehow breaks the first one, and I don't even use motion controllers right now

heady merlin
#

its just widget interaction you have issues with then?

twin juniper
#

currently yes. I have a hmd mesh which teleports to the actual position but is not rotating correctly (I would like to fix that afterwards)

heady merlin
#

did you set "Virtual User Index"

#

for the widget interaction component

#

or only finger index

twin juniper
#

I did set the pointer index

#

will test the virtual used index as well

heady merlin
#

virtual user is what you need

#

Pointer Index is finger for that players hand

#

virtual user is what player

twin juniper
#

hmm okay, maybe that's the trick for me then. I'm building my project and will test it

#

At least I think that the hmd pawn is modified (virtual user index) after I let them get possessed in the gamemode.

heady merlin
#

I believe that PlayerState->PlayerNetID is exposed in blueprint now

#

should just be able to set virtual user index to that

#

to avoid conflicts

twin juniper
#

PlayerState -> PlayerID is exposed. I think that's what you are talking about or is PlayerNetID something different?

heady merlin
#

thats fine

#

i couldn't remember what they called it anymore

twin juniper
#

Nope, still breaks it like before

heady merlin
#

Are you setting it both client and server? pretty sure interaction widgets are client side only

twin juniper
#

The virtual user index gets the playerid of the player

heady merlin
#

print out the virtual user index at the end there

#

see what the client vs the server says

thin stratus
#

@somber lava You need to access the GameInstance locally

#

To get the actual players name

#

If you store the name in the PlayerState, you can simply use the PlayerState's BeginPlay, limit it to the owning client (SwitchHasAuthorty + getting Controller for example)

twin juniper
#

Print somehow doesnt work right now xD

thin stratus
#

@somber lava Then you are sure that you're on the client, here you can get GameInstance, get the PlayerName and then call a SERVER RPC where you pass the server version of that PlayerState the name

#

That SERVER RPC then simply sets your replicated PlayerName variable

#

And that's it

heady merlin
#

Are you sure you are using that gamemode then

twin juniper
#

Yes

#

It is set in the world settings of that map and is never changed

heady merlin
#

then you are going to need to break and step through and see why its never reaching your print node

twin juniper
#

Also the second player spawns at the correct location which is set in this gamemode

heady merlin
#

oh

#

you are possessing on client side too?

twin juniper
#

I execute the event on the server only

heady merlin
#

then how are you setting the virtual user index on the client? like I mentioned that you needed to

thin stratus
#

Do you even printscreen?

heady merlin
#

otherwise the client will have the wrong values

thin stratus
#

images + gifs

twin juniper
#

Currently having no internet, therefor smartphone

#

I know how to screen capture

#

And yes it is set to print to screen

thin stratus
#

Fair enough

#

walks out in shame

twin juniper
#

@heady merlin I start at the โ€œspawn meโ€œ event inside of my gamemode. The game mode then spawns the hmd pawn and let player one or two possess it. After letting them possess the pawn I set the virtual user index to different values like I showed in the previous โ€œscreenshotโ€œ

heady merlin
#

you are setting them on the server only though

#

I just checked to make sure I wasn't going foot in mouth, but nothing in the widget interaction component is replicated

#

so you need to do everything client side as well

twin juniper
#

So I should use the gamestate/playerstate for that?

#

or where do I set this?

heady merlin
#

I would set it in the character honestly

#

since that is where the component is

#

but its up to you

#

begin play would be enough

#

but I run most of my init in OnPossessed

twin juniper
#

But how? I need to get the player count for that don't I? Or I need some other parameter so the two characters do not get the same value

heady merlin
#

you can still get the player state from the controller

#

and set the user index to the netid

#

on possessed also means that if you unpossess / repossess it uses the current player , so its future safe if you change a mechanic

twin juniper
#

hmm will try that tomorrow. For today my concentration is gone xD

#

But thanks for the advices

somber lava
#

@thin stratus i did my best to follow your recommendations

#

is this anything like you meant?

#

also how did you mean to use the player controller in combination with the switch?

rare cloud
#

it's pretty easy to cheat with this system @somber lava

#

on your gamemode you can normally override function to login

#

or when player is construct

#

server fill playerstate and character and replicate to client

#

not the opposite ๐Ÿ˜ƒ

#

with BP you can override OnPostLogin

somber lava
#

i just want to select the class in the main menu and have my character spawn with it ingame

#

i am working on this for 4 hours now

#

everyone tells me different approaches

rare cloud
#

ok you only want to prototype

somber lava
#

yes

#

just want to be able to spawn to work on the actual prototype itself

#

nothing more ๐Ÿ˜„

#

but i cant even get that to work

#

pretty dissappointing

rare cloud
#

where you set this bp ?

#

gamemode ? character ?

somber lava
#

this is the PlayerState

rare cloud
#

ok

somber lava
#

in the options menu the player can chose his class, which then is saved into the gameinstance

#

i now need a solution to tell the server which class the client has chosen and spawn with that class

#

after reading the network compendium twice i figure playerstate is the BP used for this

rare cloud
#

I work with C++, but normally you can send arguments to server when you log in

#

because you need to make a GameMode for an offline menu

#

where you choose you class

#

and name

wary willow
#

booo

somber lava
#

i only got one gamemode atm

#

since my menu doesnt use the gamemode at all

#

i didnt bother to create a second one

rare cloud
#

and once you made you choice of class and name

#

you simply use the command open IP arg1 arg2

#

like open 127.0.0.1 Bob Warrior

#

and normally server can read this

somber lava
#

i use a listen server and sessions

#

the first client opens a listen server

#

the second searches the session and joins

rare cloud
#

oh ok

#

I have any experience with sessions

#

only dedicated server sorry

#

but normally you can use the same idea

somber lava
#

i looked into dedicated servers a bit earlier today, but listen server + sessions seemed way faster and easier accessable for a fast prototype / first project

rare cloud
#

there is a tutorial playlist on Unreal Engine youtube channel

#

and there is any function that you can override with blueprint to use the system that I describe above sadly :/

thin stratus
#

The way I described it is working for his purpose

#

There is no place the data is saved before the Player joins

#

He selects his name before he spawns and needs to tell the server this name

#

Steam would allow the server to get the name by the unique ID

thin stratus
#

but without he needs to go the annoying way

#

And that tutorial series teaches a lot of wrong things

#

I would not recommened to use it

wary willow
#

@thin stratus We are still waiting for your tutorial series though

thin stratus
#

They are planning on fixing it after GDC

#

@wary willow Such a tutorial series takes tons of time. No way i'm doing that for free

rare cloud
#

oh god Epic did something wrong ?! Is it possible ? ๐Ÿ˜›

wary willow
#

@thin stratus Then don't ?

#

Put it up on Udemy

#

Make some $$$

crimson swan
#

All you need right there!

thin stratus
#

:P

#

That should work

slim holly
#

but steam overwrites the name by default, yes?

somber lava
#

@thin stratus thank you very much, trying this atm.

#

the first question that popped into my head is something unrelated, why did you use get game instance and a cast? in the tutorial from epic they always used a variable with a reference to it

slim holly
#

depends do you need to call it often

worthy wasp
#

whast the way to get OTHER clients playerstates? i tried the below setup - which i thought theoretically should work.... but its returning default values for the nodes (except PlayerName - which is an engine default node)

http://puu.sh/u4DBg/37de20d4f1.jpg

i even tried setting their values INSIDE of the playerstate like this:
http://puu.sh/u4DHI/a9c3825088.jpg

slim holly
#

iirc GameState has array of all player states

worthy wasp
#

I switched the SetHPEvent (in playerstate) to SERVER - neither have the desired effect....

#

o.0

slim holly
#

player array

worthy wasp
#

apparently you looked past the first image?

#

i'm already doing that

slim holly
#

mm nope I just tuned in

worthy wasp
#

its in the above image - the one you replied to

slim holly
#

oh right

worthy wasp
#

CastGameState -> GetPlayerArray() -> ForEachLoop -> CastToPlayerState()->GetVariables

#

this returns (even on server) default values

#

yet i can print string from playerstate TICK function....

slim holly
#

well player 0 only works for local copy of the playerstate

worthy wasp
#

and it prints out the CORRECT variables

#

and reply to that - this filters out SELF

slim holly
#

right, you need your own playerstate

worthy wasp
#

dude

slim holly
#

get reference to your controller -> get playerstate

worthy wasp
#

your not folliwing me and your not understanding my goal

slim holly
#

sec ill start the engine

worthy wasp
#

simply put - i want to access OTHER PEOPLES playerstates

#

i'm not concerned about my own

somber lava
#

@thin stratus i was wondering why your script didnt do a thing and put some breakpoints in debug mode. it never enters the Event BeginPlay isnt that/shouldnt that get called automatically? or did i forget to call it somewhere?

slim holly
#

ok so you want to modify health values @worthy wasp ?

thin stratus
#

@somber lava I used GameInstance and casted it because I need to?
I don't have this casted reference saved in the PlayerState. If you have it already casted somewhere, then feel free to save it to a reference.

wary willow
#

@somber lava You only have like two weeks experience in Unreal Engine 4 right?

#

I know I suggested taking a little break from Multiplayer and understanding the basic framework first, but maybe you forgot

#

I'll suggest it one more time though

thin stratus
#

Kinda true

#

First 3-6months are not really something for diving into multiplayer if you are new to programming adn the engine

#

If it never calls the beginplay, then you probably didn't set the GameMode to your level and/or didn't set the your PlayerState class as the default one in that GameMode

#

If, however, you DID set both and you are 100% sure that it's properly set, then please restart the Editor

#

me and my gf had problems with projects not using the set gamemode/default classes until editor restart

#

@worthy wasp WHen is this called?

#

Could it be that the values aren't yet replicated?

#

If you want to display the Values in your UI, why not just passing the PlayerState reference

#

And binding the values by using that reference

#

Instead of only passing the values of it

#

Your images don't give much information

#

as they are only a small cut from the whole graph/logic

#

No idea when or where you call stuff and what yo udo with these variables

#

If the PlayerState itself shows the correct values on tick, then I would say it takes time for them to replicate properly and you access them too early?

worthy wasp
#

@Cedric - i'm binding event to when damage is receieved to update all players HP bars of MY CHARACTER (its a team based game)

#

i just found that my event isnt triggering - i have to debug this

somber lava
#

@thin stratus i restarded it since everything was set correctly and now after restarting i always get a blank screen on startup and no methods/events are called at all

#

i gotta resolve this problem first before trying anything else, still thanks for your time!

thin stratus
#

@worthy wasp Fair enough

#

@somber lava That sounds odd :D

#

Are you sure you are on the right map?

#

Editor Startup map doesn't need to be your last used one

worthy wasp
#

@thin stratus i fixed the widget communications - but my clients cant see server pstate variables - my server can see clients....

#

clients always get default variable values

thin stratus
#

When are you getting them?

worthy wasp
#

on update of damage being applied

thin stratus
#

You said you bound an event when damage is recived

worthy wasp
#

yes

thin stratus
#

Damage is applied on the Server

worthy wasp
#

so the method of that

#

i know

#

but hold on

thin stratus
#

And then you do what

#

?

#

Call a multicast?

somber lava
#

yes, that was the first thing i looked after. main menu map

worthy wasp
#

CharacterClass -> EventDamageReceived()->CastToPlayerstate->SetVariables

thin stratus
#

@somber lava Welp, easiest way would be to check what SHOULD happen and see if something is broken at that point

#

e.g. UI should show up? -> Check the part where the UI stuff is getting called

worthy wasp
#

this IS running on server AND clients (print string always says Server:...)

thin stratus
#

It's a ServerRPC

#

and it uses the GameMode

#

how is that running on clients

worthy wasp
#

because gamemode has access to all pcontrollers

#

no?

thin stratus
#

Well yeah

#

And no

#

The Server has

#

You can call that "GetAllActorsOfClass" everywhere as long as you are on the Server

worthy wasp
#

correct - so is there a better method/approach to replicating HP to all other connected clients?

thin stratus
#

(might also be worth just using PostLogin and Logout to fill an Array of PlayerController, cause GetAllActorsOfClass is only bad workaround)

#

The other thing is

#

You are getting all PlayerController

#

And then the UI

#

And calling update on the UI

#

Do you realise that this is never getting executed on teh clients?

#

ServerRPC means you are on the Server

#

Being able to use the GameMode means even more you are on the Server

worthy wasp
#

but i'm trying to force an update on all clients

thin stratus
#

Getting all PlayerController in the GameMode means you have all Server Versions of the PlayerController

worthy wasp
#

only way i've ever done that successfully is to iterate all pcontrollers -> Run Function

thin stratus
#

Despite the PlayerController of the Server, these PlayerController shouldn't even have a valid UI

#

These are PlayerControllers ON the Server. If each of the mhas a UI, then your Server has multiple layers of UI

#

What you want to do is creating a CLIENT RPC inside of your PlayerController

#

That then gets the UI and calls UPDATE

#

And you call this CLIENT RPC in your Broadcast function

worthy wasp
#

understood

#

i'll try that now

thin stratus
#

cause you want to go to the Client version

#

The other thing is

#

This might still not work properly

somber lava
#

@thin stratus i just put breakpoints onto the "Event BeginPlay" of the mainmenu level blueprint and they are not thrown even though i have the map selected when starting AND set as the map to go in settings

thin stratus
#

You set the Variables on the Server RIGHT before you call these functions

#

This does not mean that the REplication is already done when the clients call the update function

#

What yo uwant to do is either Pass the new values to the Client by using parameters on that CLIENT RPC

#

Or to bundle them in a STRUCT

#

and set that struct to be ON REP

worthy wasp
#

i'll try passing values first

thin stratus
#

And in the onrep function you call the update function

#

Alright (:

worthy wasp
#

the OnRep would be taking place in the playerstate - how would i force a server RPC so i can call up to game mode?

thin stratus
#

@somber lava Woot, you are in the level MainMenu and the LevelBlueprints BeginPlay is not calling?

worthy wasp
#

nvm - let me play with it... appreciate the help!

thin stratus
#

@worthy wasp Why would you need that

worthy wasp
#

thinking ahead (maybe too much)

somber lava
#

yes, even after several restarts

thin stratus
#

Player gets damage (happens on server) -> Getting PlayerState (still server) -> passing the new values for the Struct (still server) -> setting the OnRep Struct variable inside of the PlayerState (still server)
Replication happens -> OnRep calls some time in the future on everyone (now we are on all clients and server) -> In the onRep we get PlayerController -> Tell UI to update

#

@somber lava I'm really at a loss here :O

#

If you open your map (search it in the content browser), the LevelBlueprint should call once you've started the game

#

Assuming it's not the Editor Start up map

#

And if it is, then you obviously don't need to open it anymore after restarting

#

but still, the LevelBlueprint should call :O

somber lava
thin stratus
#

If you play, what does the outliner on the top right say about what GameMode class is used?

somber lava
#

level opened in editor

thin stratus
#

Assuming you even use a gamemode

somber lava
thin stratus
#

In the mainmenu

#

what the...

wary willow
#

lol

#

@somber lava Show your GI logic

thin stratus
#

I have no idea why that BeginPlay isn't calling lol

somber lava
#

the world outliner doesnt show any gamemode

#

wtf

wary willow
#

it doesnt need to

thin stratus
#

Shit's broken, yo

wary willow
#

unless you override it

#

it will use project settings GM

#

so, depends on what you used

#

oh...

thin stratus
#

Yeah but it doens't show any he said

wary willow
#

You changed GI in project settings?

thin stratus
#

Not even default

somber lava
wary willow
#

in the level, it doesn't need ot

#

to

#

I usually set GameplayGM as default

#

and override my mainmenu level with my MM GM

somber lava
#

no override

thin stratus
#

I never use a GameMode in the MainMenu

#

I handle everything in UI and GameInstance

#

but depends on the project of course

#

BUT his problem is still weird

somber lava
#

"I handle everything in UI and GameInstance"i did/do the same

thin stratus
#

Well yeah, the BeginPlay of the LevelBlueprint should call :O

#

I mean, can you print a string

#

Instead of using the breakpoint

#

just for sanity

somber lava
#

nope

wary willow
#

?

somber lava
#

does not work

wary willow
#

Did you try a new project?

somber lava
#

one moment, i will restart my PC, this is weird

#

this is an even better idea

thin stratus
#

LevelBlueprint not calling BeginPlay

#

Now I've seen everything

somber lava
#

meh

#

shootout works

#

opened the other project

#

still the same

thin stratus
#

Can you create a new map

#

In that old project

#

and check if that calls the begin play

#

maybe the maps broken

#

"map"

somber lava
#

wat

#

i think my gamemode is broken

#

i chose gamemode override

#

with the default gameModeBase

#

and it works again

#

o.O

#

now i always spawn without a character/cant move

#

since the BeginPlay of PlayerState is never called

somber lava
#

i just tested it, event tick is called

#

just no beginplay

fossil spoke
#

In the task bar at the top is an option to reinstance or recompile the class. Maybe give that a go. Either that or reparent your BP to GameMode and then back again.

chrome fable
#

@somber lava Yo I had this same bug and reported it

#

It is an engine bug

#

To fix this, I created a GameMode in a previous engine (4.12 for me), then migrated it over. This solved the issue of BeginPlay not firing (along with other very very strange behavior)

jolly siren
#

hm wow lots of code in shootergame for reloading

#

they use a server rpc, client rpc, and variable replication

#

seems like a lot

heady delta
#

Can anyone confirm if steam voice is still dropping packets in 4.15?

versed socket
#

@jolly siren Do you mean the Shootout 1v1 tutorial thing in the "Vault" or whatever?

fierce birch
#

@heady delta there is steam voice implementation on ue4?

jolly siren
#

@versed socket no, shootergame

#

@fierce birch yeah it's completely broken ootb, you get like 1 word to come across. I fixed it but I need to open a PR for it. They didn't touch it in 4.15 tho @heady delta

#

they backlogged the issue

fierce birch
#

What did you need to change for it?

jolly siren
#

I'll try and set aside some time to open a PR today, it really wasn't much code so hopefully epic will look at it

supple musk
#

Hi guys, i can't seem to execute a Server RPC on an actor placed in the scene. It won't reach server. Even if i do Client RPC > Server RPC. Any tips ? ๐Ÿค”

jolly siren
#

is the actor replicated?

thin stratus
#

@supple musk Ownership

#

Clients can't call ServerRPCs on Actors that they don't own

#

Actors placed in the Level are Server owned

#

Client-owned Actors are such as PlayerController, possessed PlayerCharacter/Pawn, PlayerState

#

If you want the client to call an RPC on the scene actor you need to re-route that through one of the client-owned actors

supple musk
#

Alright so i have to rethink my networking to not go through the scene actor but through the player interacting with them, thanks ๐Ÿ‘

jolly siren
#

Okay, I created the voip fix PR

#

it's my first one, so lmk if you guys see any issues

thin stratus
#

@supple musk Good though of mind is right after the player presses his key, splitting client and server

#

So right htere you could make a ServerRPC

#

And let that also trace

#

Or what ever you do to interact with the scene actor

#

If the input is INSIDE of the scene actor, then you might really need to get the Playercontroller, call a serverRPC, pass the scene actor and then let the Server version of your Playercontroller call the function of the passed scene actor

heady merlin
#

@jolly siren Hope that gets pulled, someone else had one awhile ago to fix it and I think they pulled it in because voice worked again for 1 4.14 preview, then broke for every one after that so I assume it got reverted.

#

although, just restarting it as a fix probably isn't what they will end up with

jolly siren
#

right, yeah there is probably much better ways. but at least it works

#

I didn't know it was fixed in 4.14

#

I don't use the previews tho

heady merlin
#

yeah only for 1 preview, think it was 2

#

then 3 broke it again

jolly siren
#

ahh okay

dawn glen
#

anyone know why when i set my airship to movement mode falling on server it doesnt fall? it is in falling mode but it stays flying.... http://prntscr.com/e9n270

It falls on all the clients, but it will not fall on server.

Lightshot

Captured with Lightshot

verbal slate
#

I have single level with multiple courses and after all players finish course, they should be moved to another course

#

How should I manage spawn points?

#

Have spawn points for each cource or just one set of spawn points on first course and then move them around level to next courses?

dawn glen
somber lava
#

@chrome fable @thin stratus in case u might be interested i rewrote the whole project from scratch (gawd that takes ages with blueprints, time to learn some cpp) and now all the bugs are gone. begin play is called correctly now

#

thanks for your help

thin stratus
#

Yeah something really broke :P

#

glad you fixed it

somber lava
#

might also be that it wasnt a bug, but something stupid on my side. since im a bloody noob i cant tell ๐Ÿ˜›

trim siren
#

rojo

#

i see u need help with steam overlay

#

@last depot ^^

#

@last depot DM me

unborn nimbus
#

So I have this snippet but when when the ROS command executes, the ISMC is null. How can that be when the cast has to succeed for it to execute?

wise rock
#

Hi all I am working on an idea much like that of Dayz Mod PlotPole4Life If your famillar with it then you know it has its good and bad stuff. I am wondering how that works with in multiplayer side of the engine because if I place a a pole down and it says ok this 20 x 20 meter now belongs to say player BOB and say another Multiplayer trys to build in Bobs plot area the sytem says no your to close. Hopefully that makes sense thanks for reading and any reply

twin juniper
#

@heady merlin @jolly siren

#

I've had no issues w voip in 4.14

#

It was broken in preview but after release it was fine

jolly siren
#

that is surprising, I haven't seen it working in a long time and I'm pretty sure they haven't touched it in a long time either

#

what scenario have you tested?

twin juniper
#

Yeah it didn't work since 4.11 (that's when I started testing)

#

What scenario? I have a VR FPS game, and I call Start/Stop networked voice using mordentrals handy bp nodes

jolly siren
#

yeah your use case

twin juniper
#

I had the one sec bug earlier, but in 4.14 it's been consistenly great

#

Even between US-Europe

#

Doesn't drop between map travels and suc

#

So you're saying it's broken in 4.15 again? I can't convert until a couple plugins gets updated but I'll let you know

jolly siren
#

I skipped 4.14, but yeah let me know if you have better luck in 4.15

#

I don't use push to talk and test with a handful of people

twin juniper
#

I can tell you that it definitely works in 4.14

#

There is no push to talk, you fake it with start/stop. Same function calls

jolly siren
#

okay, yeah I don't use mordentrals stuff

twin juniper
#

He just exposed the functions, don't think he did much else to them

#

I implemented them around 4.12, left the code and after 4.14 we could hear each other

jolly siren
#

what subsystem are you using?

twin juniper
#

Steam

jolly siren
#

okay me too

#

lmk if it still works in 4.15

#

I'm not on 4.15 anymore because of all the tonemapper bs

dark edge
#

Do any of you guys know if there's any way to start the dedicated server on one map and the client on another with PIE? I'm trying to test my mainmenu -> join server flow but I keep crashing.

hollow quartz
#

@dark edge Play -> Advanced Settings, uncheck "use single process". Might work with a combination of command line arguments to force the client to load the menu and changing the editor multiplayer mode to listen server

#

or vice versa

cursive iris
#

I don't know if this is a weird question... but is there a way to spawn an authoritative projectile on the client and get simulated proxies on the server and the other players?

dawn glen
#

you would spawn your projectile on the server and have it replicate to clients would you not?

cursive iris
#

Yep... but then firing from the client while under lag would have a noticeable wait for server acknowledgement.

#

so I'm thinking that the client should have the auth copy and just force some sort of replay with delay compensation on the simulated copies... but I'm not sure if that's ideal either

dawn glen
#

you end up with a security hole i would think then

night jay
#

You just have the firing effect, sounds etc. on client

#

The actual projectile spawning on server

cursive iris
#

client authoritative damage sources are problematic on security.. :\

#

I'll go have a look at how UT does it for a bit

night jay
#

Pretty sure they just compensate the projectile's direction

cursive iris
#

direction?

#

not location or velocity?

night jay
#

Dunno how to compensate for velocity

#

But for rotation we just rotate the projectile to the player correctly

#

For location, it just spawns from the barrel location on server

cursive iris
#

I'm currently passing the initial rotation and direction... looks good on paper but there have been some very rare instances where the client and server do not show the same thing.

night jay
#

They never show the same thing

#

Because client is always behind

#

Unless you're in a LAN environment

last depot
#

I've been trying to get the Steam overlay working in 4.13-4.15 for three weeks now and I'm going insane. Is anyone able to help me debug the issue? I've tried using v132 of steam, also have updated to v139. I've reinstalled all the engines and steam multiple times. The DefautEngine.ini is configured correctly, and steam is running with me logged in, but I never get any overlay running in Standalone and steam doesn't say I'm playing Spacewar

night jay
#

Try doing it on a clean project

#

With default 132 and everything

last depot
#

I have

night jay
#

Document each step you do

last depot
#

And it acts like steam doesn't exist

#

No errors

fierce birch
#

@last depot and you have the steam overlay enabled on steam for other apps?

#

and you are using DX11 and not some newer api like DX12 or Vulkan?

last depot
#

Where's that setting?

#

Yes, DX11

fierce birch
#

I think I never got steam overlay on any game using DX12 (they could have fixed that since)

last depot
#

Well at least I think I'm using DX11

#

Haven't changed anything that I'd know would make it 12

#

I've done everything but reinstall windows

#

So desperate I might do that

fierce birch
#

yeah, it would be DX11 by default

last depot
#

I enable the steam plugin, change the .ini and run in standalone mode. Anything I'm missing? (It's pure blueprints. No C++)

#

@fierce birch That's checked. The problem is steam doesn't notice it at all. It doesn't say I'm playing any game

#

Both are run in admin mode, are on the same SSD, and are both open

#

So confused

#

It's worked before

#

But since 4.13 I haven't been able to do it

fierce birch
#

so you don't get the overlay for other games either?

last depot
#

The overlay isn't the issue I think. It works in steam games.
When I launch my UE4 project in Standalone mode, steam doesn't even recognize I launched the game. No overlay, no game change, like I'm not playing it at all.

#

I've also tried normal steam and the steam beta

night jay
#

That means Steam is not integrated properly

last depot
#

@night jay I might have just never enabled the OnlineFramework plugin....will test after 4.15 downloads.
Thank you so much. ๐Ÿ˜ƒ

night jay
#

All online crap was moved to plugins in 4.13

last depot
#

Sounds like that's why I've had issues since then.
Still need to change the ini file, right?

night jay
#

Probably, I just kept my ini the same but didn't bother trying it without the steam options

ebon siren
#

@last depot double check your .ini. At first I had this problem too, but I've realised that I had made a mistake in .ini (Note: Steam Mp IS working in Ue4.14)

last depot
#

Ugh it's still not working

#

@ebon siren You remember what plugins you enabled to get it to work?

#

I enabled OnlineFramework and SubsystemSteam but still getting nothing ๐Ÿ˜ข

night jay
#

I have OSSNull enabled too

last depot
#

Forgot to copy dlls from the steam folder over. Did that and it still doesn't work ๐Ÿ˜ข
I have no idea what's not setup correctly

night jay
#

did you alter your build.cs

#

And you don't need to copy DLLs from the steam folder

#

Your UE4 should already have them

last depot
#

@night jay Do I have a Build.cs if it's a blueprint project?
Should I make it a C++ project?

night jay
#

Make a C++ project with the same name as your project

#

Copy the source folder to you BP project

#

Make the changes as shown in the forum thread

#

package game

fierce birch
#

you can just add a dummy c++ file into your blueprint project

#

that will turn it into c++ project

last depot
#

@fierce birch That's what I did

fierce birch
#

and you get build.cs

#

ah ok, cool

last depot
#

I'll change the build.cs now

#

Hopefuly it fixes

#

@fierce birch @night jay Still nothing. What do I do after changing the Build.cs

fierce birch
#

is there any sample project around that is known to have working overlay?

#

I'd check something like that first

last depot
#

Do I rebuild my project or something

#

So confused

#

If there's a project with a working overlay and it still doesn't work on my pc...I'll just reinstall windows

#

I've given up any other ideas

fierce birch
#

it's always easier to compare working and nonworking solution as then you can compare the setup between them

#

it's not your windows if your steam games have overlay

last depot
#

I don't know what else it could be

fierce birch
#

I don't remember if you ever answered to my question if they do have

last depot
#

Yes. Everything works but UE4 projects

fierce birch
#

ah "The overlay isn't the issue I think. It works in steam games."

#

do you have some other project that's supposed to support steam overlay?

last depot
#

Downloaded a steam multiplayer tutorial project and that doesn't work either

last depot
#

Step by step