#multiplayer

1 messages · Page 339 of 1

thin stratus
#

Since the movement component alreary replicates, you don't have to call add movement on the serber

#

Server*

cold sparrow
#

I see, so the architecture that I have is not the best (client has a simple pawn, server has a character)

#

(I follwed and example from you tube guy making top-down multiplayer)

thin stratus
#

You want your player to have a character that he controls, right?

cold sparrow
#

y

thin stratus
#

Yeah, give him his character, possess it with the clients controller

#

Or set it as default on the gamemode

#

And add movement on the client

cold sparrow
#

so, character will move on the client, replicate to the server and server will replicate to other servers, right?

thin stratus
#

Theoretically you are right with setting it server side. But ue4 does that for some things already for you

#

Other clients

#

There is only one server

#

OwningClient - >Server - > other clients

#
  • also back to the original client
#

Have you read my compendium?

cold sparrow
#

yes, I did

thin stratus
#

Okay (:

cold sparrow
#

it is the best source of info available! Btw, thanks so much for it!

thin stratus
#

No biggie (:

cold sparrow
#

ok, will make new BPs to get the idea going

alpine tangle
#

This was working once upon a time, but now it's not

#

I'm running this function on server

#

The inventory slot has a thumbnail that is bound to the item thumbnail of the item data structure

thin stratus
#

Are you passing the data back to the client?

alpine tangle
#

@thin stratus No, do you have to do anything widget related on the client instance of an actor though?

thin stratus
#

Well widgets are client side. It you set the data on the server and don't replicated it or send it back, then the client will never receive the update

alpine tangle
#

So how would you send it back?

#

Would I call an event on the owning client that gets variables passed thru from this function?

thin stratus
#

For example, yes

#

Usually you use a smaller version of the Inventory. Only the information that is needed for the ui

#

Like itemID and stacksize or what ever you have there

#

Icon, description etc should be stored in a data table which has the itemid as row name

#

So everything that is static and doesn't change.

alpine tangle
#

Is that for optimization?

thin stratus
#

Also yeah

#

Wrote a few inventory systems by now

#

So for me it's default

#

If yours send and saves more data, maybe even static data, then this would be optimization for you

alpine tangle
#

I really appreciate the feedback, I don't understand the data table part yet, but I really have a grasp on structures now thanks to creating the inventory system

thin stratus
#

Datatables is like an excel table

#

First column has a unique name

#

They are based on a struct

#

So you create a struct and then create a datatable and selecr that struct

#

Rowname is given and must be unique, other columns are defined by the struct

#

In code you can pass the table your rowname and get the row from it

#

E.g. Pass itemid as rowname and get name, icon, description etc

#

What ever static information you have about your item

alpine tangle
#

So the rowname is basically the itemID

thin stratus
#

Yeah in general it's a name

alpine tangle
#

What's the plus side of this vs how I did it

thin stratus
#

But most people tend to give items numbered ids

#

If you pass all the data back and forth it costs bandwidth

#

There is no reason to pass data from client to server etc if it's never changing

#

Clients can just use the replicated id and get the data from the datatable

#

You only need to replicate data that changes

alpine tangle
#

then they access everything else locally

thin stratus
#

Like stacksize. Durability

alpine tangle
#

Okay

thin stratus
#

Yeah name, icon etc would be locally

alpine tangle
#

I'm gonna mess around with it for a little bit and see if I can change my system to that

#

I see how beneficial it is now

thin stratus
#

That reduces your actual inventory structure to mayve the itemid and stacksize

#

Sure (:

alpine tangle
#

So I created a data based off of ItemData

#

datatable*

#

Now I create a row and that is basically the information for that object

#

?

#

and basically the physical actor of the weapon or whatever only has 1 variable which is a name

#

ah i see and now i can make my inventory just a structure of names

thin stratus
#

Yeah if you have no other changing data

#

Datatables are not for storing runtime changes :P, it's readonly at runtime

alpine tangle
#

Thank you so much for your help man

#

It works now 😃

thin stratus
#

(:

lament kettle
#

I can't replication "Set Skeletal Mesh" for some reason...

lament kettle
#

fixed it

sweet horizon
#

Good day. It kind of feels bad that I'll jump right into asking a question given I've just joined haha, but here it goes:

#

Can a dedicated server perform CreateSession calls? I don't know what player ID to put as 1st param (C++)

thin stratus
#

There should be tutorials that you csn Google that show how to do that

#

You call the usual createsession stuff on RegisterServer

#

Idk that out of my head. Haven't worked with session + dedi in a while

sweet horizon
#

Many thanks. I saw articles saying that a player ID / param 1 of '0' would work for CreateSession. Think I'll work around that for now.

night jay
#

Anyone know how big actor references are when replicating em?

jolly siren
#

so the size of a FNetworkGUID I guess. Which is mostly just a uint32 (4 bytes)

night jay
#

That's much smaller than I thought it would be

dire temple
#

Hello is anyone around?

sweet spire
#

maybe

slim holly
#

@night jay you really shouldn't need to replicate references

#

(I don't even know if it works)

night jay
#

it works

#

and really it's more for ease of use than anything

slim holly
#

I wonder how does it convert it tho 🤔

cyan bane
#

What techniques do you guys use to minimize how noticable small position corrections are?

lilac egret
#

Do I have to replicate everything manually or is there a technique to replicate things automatically and choose the ones you do not want to replicate?

maiden atlas
#

If you set a variable to be replicated, then any time you change it on the server side it will be replicated to the clients

#

You can also set it to rep-notify, where a function is automatically called after a new value is replicated for it

#

This is pretty handy

#

However, you do have to set it on the server, so you will need to make a server replicated setter function

#

An example would be a function replicated to server that sets the bool FlashlightOn to true

#

Then in the rep notify for FlashlightOn you could put the code for toggling the light on and off

twin juniper
#

replicating everything goes against the whole client/server simulation model unreal uses. theres no reason to replicate that footstep sound, because you can just throw it into something the client is already simulating locally (walking animation). theres no reason to replicate that explosion entity, just tell the clients to spawn their own explosion at these cord's. even better you can just spawn explosions based off an event thats already being simulated, like this impact here means spawn explosion, but without the server needing to tell the clients anything.

#

you should strive for super accurate simulation of gamestate, but leave critically important things like a players health, or what weapon they are holding up to replication.
replication does indeed start somewhere, but allot of things can run off stuff the client is already simulating locally

trail dragon
#

When a pawn is possessed it calls PossessedBy(AController* ...), but only on the server. How does the client know when it's possessing a new pawn?

#

I have a weird situation where when a pawn is possessed it needs to offset by clientside-only data. We're already trusting the client (It's VR) so..

trail dragon
#

I can send the data to the server (it's head position) but when they first connect to a server and it tries to spawn them, it won't be available

#

I guess I can override OnRep_Controller which should be called when it's set to a new PC

#

But then I don't know how much to offset them. Maybe I should just start everyone as a spectator and once they've sent data to the server about their position, then we spawn them, and offset their pawn when they possess it.

weak pasture
#

you can just call a client function inside PossessedBy cant you?

trail dragon
#

@hoary python My fear with Possess->Call RPC is that they will spawn and then flicker to their new location

#

Possess puts them at the actual Pawn's location, and then they offset to their actual location.

weak pasture
#

could try lerp positions from their current to the new one, maybe

#

ah i see, vr hmd position, might not want to lerp that? havent touched much VR. if not then yeah i would probably think the on_rep override on the variable would work for you

trail dragon
#

Yeah and I'm doing non-conventional stuff too. Technically the VR player's head is relative to their origin, and their origin is the pawn

#

But I represent the player by a sphere where their actual head is, so to make your sphere line up with where you're supposed to spawn you have to offset the pawn by the offset of the head effectively

weak pasture
#

are the other clients meant to see each others head spheres? might be a case of letting the server know where the clients head is, making sure the clients got the authority on the update so they dont have any stuttering based on ping of course, but interpolating it with the server. that would let you start with it with the server in mind

trail dragon
#

Yeah - effectively you're just represented by where your head actually is and your distance from your origin is irrelevant

#

I just don't want people to have to stand in the center of their room to line up correctly :p

#

Yeah the problem with letting the server know where the client's head is is that it doesn't get sent immediately, so on first spawn it's still zero. The solution for this is start everyone in spectator mode and then in OnRep the first time it comes in queue it up for being okay to spawn.

weak pasture
#

could do, or if you are coming from a menu and are seamlessly travelling player controllers, you can use copy properties to bring that location over and have it from the start, as the persons head will still be there before that level starts 😃

trail dragon
#

Can't seamlessly travel when connecting to a server

#

Has to be a hard-travel so I don't think you can copy any properties over.

weak pasture
#

dedicated server? rip that idea then. 😦

trail dragon
#

Nah even just connecting to another person's server can't be seamless, seamless only works when changing maps

weak pasture
#

ok right, yeah sorry I meant if you were coming from a menu with the host. for our game you hard travel to a Lobby then seamless to the match. i guess youll have a hard travel at some point anyway, so you're right that wont fix it

trail dragon
#

I'll try the OnRep_Controller thing (since your client doesn't move views until that happens) and hope that works, I realized I can probably just do AddActorLocalOffset(GetTransform().TransformPosition(HMDPosition));

#

Gotta sit through a 5 minute compile to find out though 😕

#

Well, OnRep_Controller doesn't get fired

trail dragon
#

Okay. OnRep_Controller only gets fired on the client, which means it doesn't get fired in singleplayer (since that's a server)

#

So, this idea is out 😦

#

Going to just go with sending a RPC after possession and worry about the possible flicker later.

sweet horizon
#

Hello 😃 Question with regards to Unreal dedicated servers

#

Assuming that a dedicated server calls CreateSession, what would be the difference between the Session Settings being set to bIsDedicated = true or bIsDedicated = false?

#

For the bigger picture, I am trying to integrate Unreal networking with AWS GameLift and Steam. I was thinking that Unreal dedicated servers would sit in AWS serverspaces, and they would manage Steam sessions and clients connecting to them

#

So far though I've discovered that trying to host a dedicated Steam session using an Unreal dedicated server requires you that you use the Steam master server setup

glad sedge
#

er.. Native NetSerialize StructProperty /Script/Engine.Actor:ReplicatedMovement (ScriptStruct /Script/Engine.RepMovement) failed.

#

What does that mean?

glad sedge
#

side question - do default values created by the client have to be replicated in order for the server to use em?

slim holly
#

default values for what?

#

only server should be allowed to set values for gameplay critical components

jagged goblet
#

is it possible to replicate a widget

rare cloud
#

@jagged goblet, nope

#

but from your widget you can easily get Player Controller or Character or Player State

#

and call RPC

#

Widget are only client-side

jagged goblet
#

thanks jack, that explains a lot lol

lament kettle
#

How do I go from client to everyone, without using multicast?

#

Or is there no choice?

#

ATM, i'm using server->multicast

brittle sinew
#

That is the correct flow.

#

Multicast functions must be called from the server

lament kettle
#

Problem is, I'm spawning an actor (weapon) from the character pawn (called via server function, and I've set the ownership to that pawn).

#

When I call the "event fire" function within the weapon (spawned actor), it only works via client.

brittle sinew
#

I'm not quite following your flow, what are you trying to do? Are you first trying to call up to the server and then multicast?

#

Or are you trying to multicast directly from the client?

lament kettle
#

Okay, flow is this.

#
  1. Pickup weapon (server spawns an item from the base character).
#
  1. Fire weapon calls a server function within the base character.
#
  1. Weapon event fire has an client function, that does the vfx/sfx.
#

^Spawning weapon (when picked up)

brittle sinew
#

Okay, so could you describe the issue a little more? I'm not quite sure what you mean by "it only works via client", that could mean a lot of things at this point

lament kettle
#

One moment please.

#

^Firing weapoin from base character.

sweet spire
#

jesus that switch

lament kettle
#

^Function thats being used

#

@sweet spire ill simplify that later

#

simple enum

sweet spire
#

I tend to attach process like that too more defined tyhpes

lament kettle
#

hitscan, melee, item

sweet spire
#

ie, most gun fire can all run on the same thing

#

all guns functionality tend to run the same

#

from pistols to shotguns

lament kettle
#

Not in my game.

sweet spire
#

What is different?

#

just curious

lament kettle
#

Differnt amount of sfx and spread methods.

#

I have a master weapon

sweet spire
#

Sfx?

lament kettle
#

so, i usually tend to put all common in there

#

anyways, thats not what i need atm

#

i need to figure out why the line trace only works on the sole client

sweet spire
#

u can carry spread types and amounts & sound effects, etc in some sort of weapon container

lament kettle
#

when on dedicated servers

sweet spire
#

ohh

brittle sinew
#

That trace doesn't quite look right—a forward vector is a direction. Once you multiply it by a distance you can use that as an ending point if you take into account their location (adding it)

lament kettle
#

@sweet spire i have a master weapon

sweet spire
#

cus ur using get player controller 0

lament kettle
#

is that why its not working?

#

like why its not replicating to other clients?

sweet spire
#

well

#

Your wanting to replicate vfx im guessing?

lament kettle
#

Yes

sweet spire
#

U just need

#

a simple bool

#

thats it

#

This is why i recommend my methord

lament kettle
#

and that is?

sweet spire
#

Bool, IsFiring, Rep notify

#

If target is firing start firing function

#

If target IsFiring False, stop fire function

#

and do line trace, but not from player controller 0

lament kettle
#

That makes sense actually, I'll give that a try.

#

From where then?

#

the gun

#

?

#

But I want the players camera.

sweet spire
#

Is your char aim locked too camera?

#

ie relative too pitch, yaw

lament kettle
#

It starts from the barrel to where the crosshair is.

sweet spire
#

like typical shooter

#

barrel to crosshair what

#

First time iv heard of anyone doing that

lament kettle
#

Really?

sweet spire
#

Well i guess thats kinda even easier

#

Well heres the thing

#

If u line trace from a barrel to cross hair

#

its like what

#

Your line tracing on a funky angle

#

instead of from player perspective

#

If i understand what u said right

#

i might misunderstand what you said

#

Heres an example from me

#

When my players weapon fires

#

The Vfx Fires from the Barrel too the center point on client only

#

and for Server it fires from camera to center

lament kettle
#

I'm shooting from the barrel of the gun, to where their crosshair is aiming at.

#

It's that simple.

sweet spire
#

Thats some really weird aiming

#

ops let me recorrect that i said

#

I fire from client camera pos too cross hair, and spawn muzzle flash on barrel*

#

Im not too sure how to advice you on that linetrace setup

#

firing from playercontroller 0 only works on a owning client really, it wont work for any other pawns

#

Is that weapon the master bp?

#

that bp that does firing

slim holly
#

I wouldn't use OnRep for firing a weapon

sweet spire
#

Why not?

slim holly
#

it might get pushed back during saturation

#

causing delay

sweet spire
#

its only for vfx

#

super cheap way to handle it

slim holly
#

wouldn't you use the same bool for vfx as you use for firing?

#

logic and timing is identical anyway

sweet spire
#

you are simulating clients firing

#

vfx

#

If other players start firing have the bool replicate

slim holly
#

well yea, rpc it to server but don't run the projectile spawn/damage on clients

sweet spire
#

It way cheaper to replicate a visual bool than multi cast

slim holly
#

Im just saying you have to transfer that bool to server anyway, might aswell drive sfx from it

sweet spire
#

more bandwidth

#

the bool drives the vfx

slim holly
#

not if you set on client first and set replication to skip owner

sweet spire
#

most of the time u dont need to replicate things like linetrace impact and stuff

slim holly
#

thus you would save bandwidth

sweet spire
#

what..?

#

I think you miss the whole point of it

slim holly
#

no I didn't

sweet spire
#

Instead of having to multi cast stuff, alot of things like this you can on rep bool, and have replicated clients simulate there firing

#

so any vfx impact or flashes etc

#

can be simulated

#

There is no need for accurate bullet holes and stuff most of the time.

slim holly
#

just set the bool on client end, no delays and no need to replicate it to owner, server does the damage logic/recoil/etc once the bool actually reaches it

#

it's not like you can drive the vfx based on server output anyway

sweet spire
#

man your not listening

#

the bool has nothing to do

#

with dmg

#

recoil

#

etc

#

The bool is only there to make clients simulate there cosmetics

slim holly
#

aight fine, do multicasts

sweet spire
#

dont multicast it jesus

slim holly
#

just saying you dont need to

sweet spire
#

major waste

#

You are 100% missing the point

#

From 1 bool, you can simulate Muzzle flash, impact damage and sound in two locations for example.

slim holly
#

@lament kettle had issue with 3rd person aim?

lament kettle
#

no

#

lol

#

ill just use the server -> multicast work flow

#

no one here appears to know an alternative

#

(a proper one that is)

slim holly
#

on...?

lament kettle
#

visual effects

#

to spawn from server vfx

sweet spire
#

somehow on the past 6 months, i have managed to avoid the need to multi cast at all on this project

lament kettle
#

to all other clients

#

I'm using rep notify too halcyon

sweet spire
#

multiplayer project as well, 70 player max

#

dont forget

#

if u dont replicate there weapon information

#

it cant do the firing

lament kettle
#

yes

#

i've repped everything

sweet spire
#

and player controller 0 on replicated pawns to your client, will try and linetace from the controller of the client

lament kettle
#

im trying a new method

#

give me 2mins

sweet spire
#

Think of it like this

slim holly
#

so here's what I use: Set weapon bTrigger to true on client -> send to Server to set the same bTrigger to true with replication but skip owner -> drive logic from tick

#

therefor, you dont need to multicast because the bTrigger is sent to everyone anyway

#

and they drive the logic from it using tick

sweet spire
#

u dont need to do that anyway because rep notify

slim holly
#

repnotify triggers once, you can initiate it using RepNotify but again but if you need Tick for say, automatic weapon then it's redundant

sweet spire
#

u dont need to use tick for this,

#

automatic weapons dont need tick 😂

#

well using onTick

slim holly
#

FOR EXAMPLE

sweet spire
#

There is otherways to handle things

slim holly
#

ÄUTOMATIC WEAPON¨

sweet spire
#

calm down m8

slim holly
#

yea you kinda need tick for automatic weapon

#

or similar

lament kettle
#

Fixed it.

sweet spire
#

sweet

#

i wish i had examples from when i use too use it

#

but now i use actors too replicated costmetic info too clients

lament kettle
#

Top one is from base character.

#

Bottom image is from the weapon hitscan.

#

Rotation works too.

sweet spire
#

fuck thats alot of data haha

lament kettle
#

No need to "replicate" via tick, the rotation of the follow camera.

#

A lot of data?

sweet spire
#

to me anyway

lament kettle
#

Bro, its just the base character.

slim holly
#

whole character ref is way too much

lament kettle
#

You think so?

sweet spire
#

two vectors & char ref bp haha

slim holly
#

oh right

#

don't send vector start data

sweet spire
#

Im gonna whip you an example up

#

one moment

slim holly
#

if player can manipulate it, they can kill from spawn

#

or literally anywhere on the map

#

if they find the memory address for it

lament kettle
#

its all replicated tho...

#

how can a player modify it?

slim holly
#

with cheat engines

sweet spire
#

easily

lament kettle
#

it runs from the server tho

#

not from the client...

slim holly
#

the linetrace should be done solely on server

lament kettle
#

Yes, I understand that.

#

I'll put is cosmetic

#

The line trace will be the damage aspect.

sweet spire
#

man theres no need to even make an example

#

idk how to make it any simple haha

#

IsFiring, rep notify on all base char, when its true enable VFX weapon fire loop, when its false disable it

#

when anyone starts firing, there replicated pawn on another client will do the same visually

#

thats the jist of it anyway

lament kettle
#

how do you pass the character who is firing then?

#

you need an end vector.

sweet spire
#

u dont need too

#

There pawns will know about them selfs

#

every single replicated pawn

#

Has its own Bool IsFiring

lament kettle
#

Thats assuming the code is within the pawn.

#

I want the code within the weapon.

sweet spire
#

So if player A starts firing, Player B,C,D verison of player A, start doing cosmetic

#

Are u replicating weapon

#

i assume you are

lament kettle
#

yes

sweet spire
#

then there u go

#

they should know about the pawns own weapon

#

so u should be able to call it

#

the visual client side of it that is

lament kettle
#

we've spent 30 minutes on this bisfiring rep

sweet spire
#

its hard to wrap your head around i know

lament kettle
#

and i still have 0 clue how to implement it

sweet spire
#

iv had this talk for ages with people

#

haha

lament kettle
#

where is the variable?

#

in the player?

#

in the weapon?

sweet spire
#

Yeah thats fine

lament kettle
#

where?

sweet spire
#

forget about the blueprint right

#

for the weapon

#

You need to understand this

#

The IsFiring Rep bool

#

Is to let that replicated pawn know, it can fire

#

u dont need to worry about the firing logic

#

You get me right?

#

its as simple as IsFiring then do the firing

#

then ever replicated pawn knows about its own bool, & weapon blueprint

#

IsFiring = True, Do CastToWeaponBlueprint, Do Cosmetic Visual

#

Make sense?

#

and ofc IsFIring = False, tell weapon blueprint too stop doing cosmetic visual

#

That functionality would be inside the rep

#

here is an example

#

obviously this applies for game param not cosmetic

#

But its the same

lament kettle
#

@sweet spire how do you loop the isfiring tho?

#

you cant use delays

sweet spire
#

what do u mean

#

by that

#

u mean the IsFiring bool?

lament kettle
#

yes

sweet spire
#

u dont loop it

#

On Mouse down its true

lament kettle
#

Okay, my question is this.

sweet spire
#

on mouse up its false

lament kettle
#

How do you pass a character reference.

#

With an RPC

#

and if we dont need to pass it, how do we obtain it?

sweet spire
#

why are u need to rpc

#

u can rpc too server with char ref like usual

#

but sending important data like vectors for hit traces is not a good idea

#

oh if ur talking about the bool

#

u just have the owner of it rpc for the server too set it

#

like so

lament kettle
#

Okay..

#

having an issue

#

This is on the base character:

#

This is the weapon:

#

line trace only happens on client and server

sweet spire
#

yeah uv nearly got it just a little mis understanding

#

Your weapon bp has a OnTick right?

lament kettle
#

yes?

sweet spire
#

so the weapon blueprint would really be checking If we are firing cosmetically

lament kettle
#

okay?

sweet spire
#

my assumption was your weapon blueprint

#

fires constantly

#

while ur holding the fire button

lament kettle
#

first, let us get it working...

sweet spire
#

that what it kinda looked like

#

Yeah its working

lament kettle
#

No its not?

sweet spire
#

but uv got functionality wrong

#

How do u handle your loop firing then

lament kettle
#

I dont see the line trace on other clients bro.

#

I dont care about looping atm.

sweet spire
#

U mis understand again

#

The IsFiring bool

#

is just a condition

#

U wouldnt have your full firing logic in there

#

It be like

wary willow
#

lol

#

Let me take over

lament kettle
#

i feel like im talking to a brick

#

why cant you just send me a sample bp?

wary willow
#

Okay

lament kettle
#

we've talked about this for 2 hours

wary willow
#

2 hours? lol

lament kettle
#

:/

wary willow
#

since 2

#

lol

lament kettle
#

it feels like im at the dmv

wary willow
#

Anyway, what was your original question?

sweet spire
lament kettle
#

Is using the server to multicast workflow, a good idea? Why or why not? (Origional question)

sweet spire
#

no offense victor but dont jump in right now 😂

#

just gonna compliate things more

wary willow
#

For some reason, I feel like I wouldn't be

sweet spire
#

well dont man, thats what im saying

#

already had someone jump in half way

#

Thats the basis of the rep notify functionality

#

Its too tell your weapon blueprint if it should be doing cosmetic stuff

#

Then its flipped on, any replicated pawn will do its firing stuff

#

when its fliped off

#

they would stop

#

also i dont have any sample blueprints because there is better ways to do this for alot of things, but it gets WAY more complex

#

This is just a super simple & cheap effective way to replicate visuals

#

also your issue is your lack of understanding of replicate and data control

#

There u go

#

the example u wanted

#

U have both pages not

lament kettle
#

you honestly helped me out Halcyon

#

I get it now.

sweet spire
#

DO U SEE THE LIGHT FAM

lament kettle
#

YES FAM

sweet spire
#

YES FAM

#

i remember that feeling

#

right dont forget

lament kettle
#

it doesnt make sense to keep sending vfx on server shit

sweet spire
#

to put a HasAuthority

lament kettle
#

just a bool

sweet spire
#

in front of the visual stuff

#

YES MAN

#

THEL IGHT

#

if ur client knows about it, like gun start point, socket, etc

#

then u can do like gun line trace and impact point

#

if that visual is not CRITICAL

#

u can have the client simulate it

#

through cheap af cheesy methods like this

lament kettle
#

yeah

#

your right

#

it makes more sense

#

less data

sweet spire
#

Lets not forget this

#

a, all required data for it the pawn needs to have with it

#

b, this is only for cosmetic stuff thts not critical

#

c, full client side only(except for bool set)

#

then u can go 1 step further and do like

#

Ignore owner on rep notify settings

#

and have your pawn set it on there side, then tell server to change it

#

but not recieve a copy from server

#

so there is no delay for the firing client

#

for the visual that is

eternal anchor
#

anyone used ipv6 ?

sweet spire
#

is ipv6 even in mass use yet?

slim holly
#

to some degree

#

my ISP lets you use both

#

however, they dont have translation layer so some sites don't work

#

as for the context of UE4, Im not sure. afaik it's not that different so it should work

twin juniper
#

do you have to click "component replicates" for the character movement component and the capsule collision of a character for it to replicate smoothly?

wary willow
#

@twin juniper no

twin juniper
#

@wary willow ty

inner iris
#

Great repnotify vfx examples @sweet spire I think I finally get it 😄

#

Will have a shot at replacing all multicast cosmetic events this weekend

#

Also regarding the muzzle to center of screen that was mentioned earlier- I think that's pretty much how most 3rd person shooters work, no? Otherwise your bullets wouldn't be accurate (going where the crosshair is pointing), or else the crosshair would need to be off center or dynamic in 3D space

#

Also @slim holly , regarding your comment "if player can manipulate it, they can kill from spawn".
If you have the server shoot a trace from its version of the player and verify the start and end positions relative to what the client sent, and disallow anything that had changed drastically, it'd stop false messages like this from going through, right?

sweet spire
#

If u input a vector from client

#

Abd take that in for line trace

#

Client can spoof it

inner iris
#

Of course, but if the server also runs the same line trace logic and the spoofed trace doesn't match up within a possible distance, it can simply be disallowed surely?

trail dragon
#

@sweet spire Your character should be replicating his view angles to the server

#

And then you trace from the server (but also on the client for prediction)

#

Which lets them aimbot but not cheat translations

inner iris
#

@trail dragon Glad to hear it's fine to do it like that. I currently have it set up so that the client can request a server trace if it thinks he hit another player to verify if it was possible/deal damage, but spoofed hits wouldn't make it through as the server would find a big mismatch between the angles like you said.

trail dragon
#

@inner iris It's... complicated to do this right. At least what Source engine does is that when you click, you run the trace on your local machine and do blood splatter/bullet impacts/visual tracer lines, etc. At the same time, you send the message to the server that you click. The server gets the message, and -here's the complicated part- the server rolls back time by your ping to see where the guy you were shooting at was on your local machine. Then the server does the raytrace to see if you did actually hit him, and then the server calculates damage, removes health, checks to see if he gets killed, etc, etc.

#

If you think about it, A's position is calculated on the server. This is sent to your client (so it's now a one-way time behind his actual position), so when you shoot your message is now a full round trip behind your latest info

#

So the server rewinds time to see where the guy was when he last sent him to you (effectively...) so it's still server authoritive but it checks against what the client should have been seeing and not what the person is currently at

inner iris
#

Yeah it's pretty complex stuff- have been researching loads of articles and videos relating to this topic. COD, CSGO and a bunch of other top shooters do it like this with the rewinding and use of snapshots. This is definitely way more accurate than my method but a lot more tricky to pull off as you have to store synced server and client locations and rotations etc.

#

My extremely hacky way of doing it is this:

#

I want the client's view to be favored as long as he has reasonable ping. So what he sees on his screen as being a hit, should in most cases result in a hit. However with running traces purely on server with no compensation, for any moving targets, he is likely to miss a lot of his shots and be frustrated "where are my bullets going!!!"

#

So since I want the shooter to be favored, I run the trace locally for him, and only if he detects a player hit, do I then call a server RPC that fires a trace off from the server version of his pawn. Since it'll be a bit off, and the client, server and person being shot at all have different ideas of where they actually are, there has to be some kind of error tolerance. Right now, I have it so that the server will trace, the start and end points of that trace will then run into a final trace that runs on a trace channel looking for a specific "tolerance" collision capsule that is roughly double that of the standard movement capsule. If the server hits this, the shot is allowed and damage is dealt.

#

I know it's by no means correct but I'm planning on refining it and adding multiple safeguards and case by case conditions to prevent being shot around walls etc.

trail dragon
#

I'm pretty sure what Source/etc do is favor the shooter

inner iris
#

Yeah they do favor the shooter, but their fancy rewind system allows them to favour and be accurate

trail dragon
#

Yours is just "allow cheating" ;p

inner iris
#

😄

#

If the server has to verify the trace (as if firing on server), I though a lot of cheating methods would be eliminated?

#

As in, the client doesn't send the server the info it generated, it just tells it to fire normally

#

Then the info is compared, and if it matches up within a reasonable tolerance, it's allowed

trail dragon
#

How are you going to handle "reasonable tolerance" when the client says he hit a person, but the server says "no you hit the wall 6in infront of you"

inner iris
#

Then the server is right

#

And it won't allow it

#

Only if the client says he hit and the server said he hit or was like 10 cm off where the client said he hit

#

Will it be allowed

trail dragon
#

So every time I poke around the corner and see someone, I can't shoot and have it count until a round trip latency

#

Plus if he pokes out of a wall briefly, I can't shoot.

inner iris
#

No! you shoot insantly on the client

trail dragon
#

Yes and then the server rejects them all.

inner iris
#

The server rejects if the hits are greater than a certain distance or the angles of fire don't match up. Being shot around things is fairly common in all shooters

sweet spire
#

@trail dragon no need i use prediction keys :p

inner iris
#

"I can't shoot and have it count until a round trip latency" even with snapshots / rewinding, wouldn't you still have to wait for the round trip?

trail dragon
#

You have to wait for the round trip yes, but if they were outside the wall on your screen and you had a clear LOS, it would count

#

Your method will fail when they are visible on your screen, but have moved behind cover on the server

inner iris
#

Well it'll be favored to allowing the shot, provided the person behind the wall hasn't moved greater than the allowed tolerance distance. Like I said, ping will have to be considered before allowing anything on both ends. Assuming players had reasonable ping (<100ms), then being shot around a corner wouldn't happen very often.

#

Higher pings it is very obvious, but still happens on almost all games when playing in high ping scenarios

#

I'll probably have to scrap my terrible system and try to figure out a proper rewinding one at some point in the future

sweet spire
#

if i was u, id actually get the game running smooth and all multiplayer gameplay func working before u try and mess with this stuff

inner iris
#

At the first playtest it was working great but no one could hit anything moving fast due to server RPCs so I went for this system and it works as expected, but you are 100% correct- no point on getting hung up on these kind of details before the game is actually fleshed out.

sweet spire
#

Like seriously prediction and comp is a huge fucking can of worms

inner iris
#

One last question for the road @trail dragon then I promise I won't think about lag comp again for a while 😄

#

"here's the complicated part- the server rolls back time by your ping to see where the guy you were shooting at was on your local machine. Then the server does the raytrace to see if you did actually hit him, and then the server calculates damage" Wouldn't this also cause the same problem as with my method as you mentioned: "Your method will fail when they are visible on your screen, but have moved behind cover on the server"

In the snapshot, they could be visible to the client, and the hit is allowed, but on server they could be behind a wall and still die. Wouldn't it work similarly?

sweet spire
#

by ping what

#

stop right there

#

Id go for gametime not ping

#

that fluxs so much its unreal

inner iris
#

Yeah I need to figure out accurate ping etc.

#

My values from the default ping UE4 gives you are way off

sweet spire
#

Server can check where they where, where he was, where he current is

#

and work it out

#

with tolerance

inner iris
#

It'd still essentially kill people who were behind walls on the server but not on the client though right? It'd just be able to 100% guarantee that the client was sending the correct info

#

And be more accurate of course (like you said, if you shot to one side of the player, you might have more or less tolerance with my method)

trail dragon
#

@sweet spire The point still stands, you go back in time so that your server's environment matches up with what the client was seeing.

#

@inner iris no - the whole point is that the server rolls back it's internal state to match what the client saw when the client clicked (which should have his view angles + button)

fossil spoke
#

Prediction and Compensation can only take you so far, you will never get an perfect system. The case where an player ducks behind cover but still dies is nearly impossible to eliminate.

sweet spire
#

lets thank jesus for FPredictionKeys

fossil spoke
#

Its about compromise

sweet spire
#

THIS ^

#

this is whati always tell people

trail dragon
#

So the server now "sees" what the client is seeing and runs his traces against the server's version of that timestamp, so still server authoritative, just matches what the client was seeing at the time he clicked

inner iris
#

@fossil spoke Yeah exactly, there's tradeoffs everywhere and even AAA titles have a plethora of bugs. I just want to know if it's worth trying to figure out a big rewind system, or if my iffy method will get by fine.

#

Ah I get it properly now @trail dragon

fossil spoke
#

Play test it

inner iris
#

The server's trace will be exactly what the client's was, not ahead or behind

trail dragon
#

Aw, can't read up on FPredictionKey, docs are down 😦

fossil spoke
#

If your focus groups cant find any huge issues with it that isnt going to be solved by an better system then wahts the point.

inner iris
#

@fossil spoke Playtesting on an EC2 instance from EU to NA, it works like a charm after tweaking the tolerance hitbox

#

But haven't tested on a large scale yet

#

Good point though

#

If it works it works

sweet spire
#

whatsu r tol hitbox increase

inner iris
#

I basically tested against players running left and right at different ping ranges

#

Right now it's increased so that a hit under 200ms ping always goes through with fast motion

#

And higher than that it only goes through if they aren't moving very fast or still (or the angle they are running at is more toward the player than to the left/right sides)

#

I didn't increase it scientifically, just until it felt like the shots were hitting when they should

trail dragon
#

Cheers

inner iris
#

Thank you @trail dragon @sweet spire @fossil spoke - the penny dropped regarding the benefit of rewind vs. other forms of compensation, will stick with my method until an issue comes up, then if needed build a better solution.

#

Really helpful talk, much appreciated!

fossil spoke
#

No worries, there is always pros and cons its just an matter of working out the benefits of one system vs another.

sweet spire
#

why the fuck is make brush from material not working D:<

#

oops wc

#

lmao

rare cloud
#

to confirm that I'm not doing a mistake, if I replicate an array of UObject ptr, all are constructed

#

not nullptr but zero initialized

#

it's a normal behavior ?

modern dome
#

Is there a way to replicate a variable manually?

#

The variable changes per tick and I think it would be better to simulate the variable on clients and sync them periodically

slim holly
#

well yea, you RPC it to/from server

modern dome
#

Hm, I see 😃

rare cloud
#

@Raildex#6923, also be careful standard replication is less expansive than an RPC

loud sage
#

(steam specific), But I'm just curious, are you forced to use quotes with steam achievements, as in Achievement_0_Id="ACH_WIN_ONE_GAME" seems to be used in examples, but would Achievement_0_Id=ACH_WIN_ONE_GAME be valid too? BlobThinkingEyes

tropic moat
#

@loud sage looks like it works without ""

loud sage
#

Awesome, thanks for confirming that, steam wasn't liking me today (wouldn't open....at all)

eternal anchor
#

How do I get up and port from within dedicated server ?

jolly siren
#

what?

eternal anchor
#

Ip*

#

Typed from phone (;

loud sage
#

ip should be the same as your local/public ip of your host

#

As in, the ue4 server shouldn't set up it's own virtual server to my knowledge. You should be able to get a computer's ip on windows by opening up cmd and using ipconfig and it's ifconfig (or ip link? Not sure about the new stuff) on Linux 😃

#

Not completely sure about your port though 🤔 I believe it's 7777 by default

inner iris
#

@iniside#8930 are you using Amazon EC2 dedicated servers?

sweet spire
#

i swear im the only person thats like fuck paying for servers build my own 😂

brittle sinew
#

Well, in the past few years virtualization/containerization has taken off

#

A lot of the time it's just much easier to have things hosted on virtual systems, makes load balancing and scaling a lot easier

#

For my NAS and stuff like that yeah, I'm going to host it locally, but spinning up new instances of a DO droplet is just so easy

sweet spire
#

true true, however i tend up looking at speed provided and pricing and stuff and im just like

#

"no, cheaper to cluster my self and rent a line"

#

then again this depends massively where u live

#

what line u can get

#

Uptime,

#

maint etc

#

You become responsible for everything

eternal anchor
#

@loud sage I don';t know IP of my host

#

im hosting server in Kubernetes on Azure

#

(;

#

I can host several servers on single node

#

and if port 7777 by server

#

it increments

#

so I need to post ip:port to database to be able to match against particular instance

#

I'm also evaluating Service Fabric

#

as it have better integration with Azure

loud sage
#

Ah, kubernetes is pretty awesome, I just haven't used it a heck of a lot 🤔

#

Doesn't it automatically create a subnet for the cluster and then an IP for each docker host?

eternal anchor
#

you can't really expose publicly hosts

#

Pods

#

I mean you can but you create loadbalancer for each and you need public IP for each

loud sage
#

In which case creating a container with permissions that scales accross all hosts should work if they executes something like a docker ps (or whatever kurbernetes offers) <wait no>

#

nvm, my docker knowledge is $hit, and my kurbernetes knowledge is even worse 😛

eternal anchor
#

the only reliable way I found is to create several groups of agent nodes put each behind load balancer

#

and then forward ports trough NAT

#

that is untill we get ipv6 working properly (;

loud sage
#

you'll still need ipv4 nodes though 😉 Not everyone has ipv6 yet

eternal anchor
#

don't care

#

in few years everyone who matter will have ipv6

loud sage
#

True, true

eternal anchor
#

so back to my original question

#

is there way to get IP:Port from within server ?

jolly siren
#

steam?

eternal anchor
#

I writing my own backed (;

#

backend

#

ok I see it is showed in log

#

and getting it is not that easy -;-

eternal anchor
#

o thanks

#

it might work

jolly siren
#

hopefully

eternal anchor
#

thing I found is directly in sockets implementation -;

jagged goblet
#

is there a special trick to get weapon muzzle effect to replicate on other clients

#

I'm multicasting but still doesn't seem to work

#

runs fine on client who is shooting but others cant see the effect

lament kettle
#

is passing an actor class to the server, dangerous?

thin stratus
#

@lament kettle In what regard

lament kettle
#

This is within the character.

thin stratus
#

@jagged goblet Multicast has to be called on the server and then replicates to all clients

jagged goblet
#

it is, its running off server then calling a multicast event

thin stratus
#

Well they can probably pass a class you don't want him to pass

#

Why not keeping class on the server?

lament kettle
#

so why even allow the option to pass things via server rpc?

thin stratus
#

@jagged goblet and where does it stop? Debugged a bit?

#

@lament kettle Because there are things less dangerous to pass

lament kettle
#

like?

jagged goblet
#

runs all the way to the end of the multicast

thin stratus
#

A username

lament kettle
#

hmm

wary willow
#

vectors

thin stratus
#

Rotators. Floats.

#

Axis values

lament kettle
#

the thing is... when a player selects the inventory slot, i call a function within the player

#

so that they can spawn the actor

thin stratus
#

The server should have the inventory too

lament kettle
#

it does

thin stratus
#

Pass the server the inventory slot number

#

And let him het the item and class himself

wary willow
#

@thin stratus Oh, does your crafting system on the MP has something like this?

lament kettle
#

ah

#

that makes sense

#

it's not dangerous to pass an inventory slot number

#

but it is dangerous to pass a class

thin stratus
#

@wary willow no, the inventory is very basic a it's just for making the crafting work

wary willow
#

Ah

thin stratus
#

@lament kettle Sure, the server has the authority. He can check if the item is really in the Inventory

#

@wary willow it has stacking and drag drop

#

And item types

#

No 3D representations

wary willow
#

Ah, could be a nice update

#

or new product

#

Something plug and play for people

#

But there may already be a few out there

thin stratus
#

It is plug and play. It's component based with interfaces

#

@jagged goblet and what exactly does not work then

#

You printed in the multicast and it's calling everywhere?

#

Mind sharing the code?

jagged goblet
#

yes its not calling everyone its just executing locally it seems

#

set to execute on all tho

#

bit of a mess since im trying things but let me screenshot

#

this is on the weapon bp itself

#

before muzzle event its a custom event that runs on server

thin stratus
#

What are you passing there

#

Are they actually replicated

jagged goblet
#

its the muzzle flash effect, i tried from nothing to set to replicated to rep notify

thin stratus
#

Did you check if they actually are valid

#

Like printing their display names

jagged goblet
#

hm well the effect is being played on the client just no one else can see it

#

and thats the only thing telling it to play the effect

thin stratus
#

Hmpf

brittle sinew
#

Just to confirm, are you sure the multicast itself isn't being executed?

#

Not that it's not producing the full intended effect, not that the emitter isn't being spawned, but that the multicast itself isn't being executed.

#

Confirming the result of that, either way, will help to find the issue

jagged goblet
#

how can i check if the multicast itself is being executed

brittle sinew
#

Dunno, print on it I guess?

#

Breakpoints in BP don't seem super reliable, at least to me

jagged goblet
#

string only seems to print on the client

#

i mean

#

hrm

brittle sinew
#

What do you mean by that? 😄

jagged goblet
#

i mean the muzzlevent is running and its set to multicast

#

so im not sure

#

and its running off server

brittle sinew
#

Okay, if you're sure the multicast isn't running that's good, I just wasn't sure what you meant with the 'I mean hrm' after that :p

jagged goblet
#

'Does not replicate' is that true even if run on server

brittle sinew
#

Well, yes, but that's irrelevant here.

#

You're running it on multicast, so 'does not replicate' is really what you do want.

jagged goblet
#

I see

brittle sinew
#

Is the event reliable?

jagged goblet
#

no

#

let me set it to reliable

#

no difference

brittle sinew
#

Okay. And you're sure this weapon is replicated to all clients at the time of the RPC call?

wary willow
#

Hmmm, I just did it

brittle sinew
#

If the weapon isn't replicated and each client spawns its own version locally, an RPC won't work

wary willow
#

And it works for me

#

Blank FPS Project

#

Called FireWeapon on Server, Multi on the Particle

jagged goblet
#

weapon bp is set to replicated

#

if thats what you mean

#

uh

wary willow
#

Is the weapon not attached to the Character?

jagged goblet
#

yes its attached to the character

wary willow
#

Hmm, well, as you can see, it works

#

Can you show more of your setup?

jagged goblet
#

cant quite see the code are you running it off playerbp or weapon bp?

wary willow
#

This is the player

#

(fps template)

jagged goblet
#

im running it off weapon blueprint

thin stratus
#

That's fine though

#

The one thing here is that i still don't know if it actually calls

#

Put a print string into the multicast

jagged goblet
#

so i have inputaction that when pressed executes fire weapon from the weapon bp

thin stratus
#

So you perfoem a server rpc inside of the weapon?

jagged goblet
#

yes

wary willow
#

Ownership

jagged goblet
#

ok

#

let me try

brittle sinew
#

Well, to go off of that, have you confirmed the Server RPC is working to begin with?

jagged goblet
#

running it off the pawn n calling the weapon code

#

that would make mroe sense

wary willow
#

Aye

#

Not sure what other people do

brittle sinew
#

I assumed so since you said that it works locally, but are you doing the emitter spawning anywhere else?

wary willow
#

But, I mean, you can just call the funcions in the weapon rfom the character

#

(not sure what kind of weapon system you have, component based or what have you)

jagged goblet
#

hrm victor could you share your code from your test earlier?

#

screenshot? gif is hard to read

wary willow
#

hmm, oh I deleted it, but I can remake it, but the issue is still your weapon bp

#

How does the player access is?

#

(as in, how does the player get the weapon)

jagged goblet
#

has a reference to it

wary willow
#

right, but...

#

How does the player get it?

jagged goblet
#

so when i do input action shoot, get reference to weapon and run the fire weapon function

wary willow
#

(is your weapon part of your character BP) ?

jagged goblet
#

i use attach to component

#

since i want different weapons

#

and be able tos witch from them

willow finch
#

Hey are there any good youtube tutorials you guys would reccomend for setting up ue4.17 for steam multiplayer? Side note, do I need to pay the $100 steam fee to get it to work?

lament kettle
#

Question:

Why is it that when I attempt to grab a variable within player state, I get null (from the server). But I get a valid variable result from (owning client).

#

Inventory is null when server

#

inventory has something when client

wary willow
#

@willow finch No to fee.

#

And there's a million YT videos

#

Including Epic's official "BP Multiplayer" (more like lobby)

willow finch
#

@wary willow When you say "No" are you saying "yes you need to pay" or "no you can test it without paying"?

wary willow
#

@willow finch No to paying

willow finch
#

So I only need to pay when I am ready to publish?

wary willow
#

@willow finch That's right

#

Each game

#

$100

willow finch
#

TY for saving me $100

wary willow
#

Well, if you plan on doing it anyway

#

Why not?

willow finch
#

PUBG killer here i come

wary willow
#

gl

willow finch
#

ty

wary willow
#

TBH

#

I am like 99% sure you can create your own profile now for free

#

It's only when you want to publish that game you have to pay

#

Since I still have mine, and I didn't pay anything

#

(so you can use your game's app id, vice spacewars)

#

But not 100% since I haven't really had a need to actually submit a game up just yet 😉

thin stratus
#

@jagged goblet are you spawning it and attaching it?

#

Did you specify the client as owner when spawning?

#

Is the server rpc going through? You are kinda dodging to answer the print string question

#

@wary willow @willow finch For testing you can use 480 as app id. Once you want to properly setup everything, you'll want to have your own appid and pay the 100 fee

#

And there are differences in setting up steam and implementing it

#

Allar has a blog post on setting it up aka adding it to the project

wary willow
#

Right

#

Like I said, I have my appid to test

thin stratus
#

Implementation is not documented well

wary willow
#

My own

thin stratus
#

@willow finch To implement more functionality you need cpp or buy plugins

#

And use the Subsystem interface

#

Aka friends invites etc

#

@lament kettle is it always null?

#

Or just at start?

jagged goblet
#

im spawning and attacking it from the player bp cedric

willow finch
#

@thin stratus can you explain futher what you mean about "more functionality"

thin stratus
#

Everything that's not exposed to blueprint

#

Additonal SessionSettings like server name

#

Party system

#

Achievements might be exposed

#

Cards, friend list, friend invite

lament kettle
#

@thin stratus it's for some reason not getting the master inventory within the playerstate.

#

It's null whenever ran on the server.

thin stratus
#

Is it replicated

#

The component itself

lament kettle
#

GameplayPS == Playerstate

#

And grabbing the inventory there is null..

#

BUT if i do is from owning client, it works.

thin stratus
#

Is that an actor?

lament kettle
#

The inventory?

#

Yes.

thin stratus
#

Oh

#

Hm

#

Why are you passing the server pawn to the Inventory

lament kettle
#

Because I want the...

#

oh.

#

Umm... so that there's a reference?

#

to who owns the inventory

thin stratus
#

Yeah but shouldn't that be the player

#

Who's inventory it is

#
  • you could use the Owner parameter for that
lament kettle
#

the server created the inventory, but its attached to the player.

thin stratus
#

Yeah but you pass the server pawn

#

Or at least you try

lament kettle
#

oh

#

ohh

#

i see

#

how do i get the clients pawn then?

thin stratus
#

Get the owner of the playerstate

#

And cast it to the playercontroller

lament kettle
#

from where?

#

I don't understand that logic.

thin stratus
#

Get owner

#

It's a node

#

Instead of GetPlayerController

#

Each playerstate has the players playercontroller as owner

lament kettle
#

like this
?

thin stratus
#

That's not what i wrote :D

#

Swap GetPlayerController0 with get owner

#

In your other screenshot

lament kettle
#

do i pass the character

#

or the playerstate

#

?

#

as the owner

thin stratus
#

Technically you can just pass the owner of the playerstate

lament kettle
#

ah i see

thin stratus
#

To owner of the spawn node

lament kettle
#

yes i understand

#

ill remove the bp_base char ref

thin stratus
#

That's the playercontroller then

#

You can getowner inside the inventory and cast it to playercontroller etc if you need any refs

#

This will also allow the client to call server rpcs inside his own inventory actors

lament kettle
#

thanks @thin stratus you da bomb :]

twin juniper
#

@thin stratus hey

#

do you know if i could use an AI Controller to make my turrets fire projectiles?>

#

because i know u cant call an RPC on an actor without an owner

#

and thest turrets wouldnt have owners

#

so im just thinking...

#

how would i make them spawn these projectiles?

#

lol

#

and also the rotation, and replicating this rotation

#

just wondering if u know anything about this off the top of your head?

#

if you dont its cool 😃

sweet spire
#

You need more detail than that

#

Char rpc to server to tell server to tell turrets to do a thing

twin juniper
#

@sweet spire ok, so lets say i have a forge, i want players to be able to put items into it, and have a timer where something is createed after 5 seconds

#

but in order to spawn th e new item in and remove the old ones

#

i need to call a server rpc

sweet spire
#

Yeah

twin juniper
#

how do u call a server rpc

#

on that forge

#

if u dont have an owner

sweet spire
#

no u dont rpc

twin juniper
#

then how?

sweet spire
#

U let serer handle it

#

And have actor furance replicated

#

Furnace

#

Server*

twin juniper
#

how do i set it up to detect:

  1. Is there a flamable?
  2. Did the player attempt to ignite the flame
  3. how long has it been since ignition
  4. Remove flamable item
  5. Add crafted item
#

there's a lot to check.

sweet spire
#

Bool
Rpc to server asking server to try an ignite
Server tracks it, replicates float
Same as 2
Server updates forge inventory array

twin juniper
#

@sweet spire yes but that bool needs to be set, on the forge

#

correct?

#

lol

sweet spire
#

Yup its rep notify

#

On notift if true then enable vfx if false turn off

#

What sets it is server when player turns it on

twin juniper
#

but

#

rep notifytt is called

#

on the Client

#

not on the server

sweet spire
#

Yeah thats the point

#

When its call on clients

#

The client will set there vfx visual of i5

#

It

twin juniper
#

Who receives RepNotify functions btw

#

the player controller?

sweet spire
#

Everyone

#

It be stored in ur forge actor

twin juniper
#

hm

sweet spire
#

Its just a state the visual

#

On and off

#

When the var is updated it rep notifies to every client who has that replicated forge actor

#

Then there clients toggle vfx on or off

twin juniper
#

hm

#

what about clients

sweet spire
#

Make sense?

twin juniper
#

who enter late?

#

and are not net relevant

sweet spire
#

Constructor

#

Sets vfx

#

Based on bool

#

Or wait

#

Rep notify might fire

#

When they first recieve actor maybe

lilac egret
#

is there a way to set everything to be replicated?

sweet spire
#

no that be retarded

lilac egret
#

to replicate blendspace

#

i only replicate the variable right

sweet spire
#

My assumption would be

#

U replicate a stat var to drive to blend space

#

State

lilac egret
#

yes

sweet spire
#

Anim bp dont get replicated i think so

lilac egret
#

but i only set the variable to be replicated or have to create a Run on server event followed by a multicast event?

sweet spire
#

The var must be inside the pawn and reped

#

Var rep should be fine

#

Depends when ur rep tho

#

Whats the var type and what drives it

#

Ie, float jump height etc

lilac egret
#

its a bool

sweet spire
#

Bool driving blend space

#

Thats prob why its not working

#

As far as i know u cant drive blend space with a bool

#

Defeats the purpose of blend space

lilac egret
#

haha