#multiplayer
1 messages Β· Page 319 of 1
can anyone explain to my why this happens?
https://cdn.discordapp.com/attachments/298863440787800065/301099035404533790/example.gif
the replicated player always returns to its initial rotation, even if i overwrite it via RPC
@rocky meadow How are you driving the rotation?
i got the lookpos to the mouse and rotate the skeletal mesh
i fixed it using another skeletal mesh, not the inherited one
but if you know why this is happening, i would be glad so i can use the defaukt
i think its the AddMovmentInput Node from UE itself
which overwrites the skeletal mesh rotation
Well, when it comes to character and replication it's always best to use the "Add Controller Rotation" and lock character to it
if i do that my camera rotates to
Yeah I haven't done much top down stuff, but if you fixed it then all is good? π
well dont know if i run into any issues because i dont use the inherited mesh
hope not π
15 i guess
Kk, should be fine then
Hey, can anyone break down the top level steps to spawn and replicate a particle emitter for me? I've been thru the google results and cant seem to get this working
@fossil silo I just have the server do a multicast RPC -> Spawn Emitter
If it's in response to an event from a client it needs to go Client -> Server -> Multicast - > Spawn emitter
In some scenarios you don't want it to be a reliable event but if you're having issues it might be worth checking the box
ok thank u! trying that now..was having client run on server event, and replicating the emitter but onlyu server was seeing
wwhy isn't my variable replicating from gamestate
@slim holly try doing a repnotify?
if that doesnt work who knows
maybe you dont have the right gamestate selected in your preferences
regular rep or notify, it's connected to widget
server sees the right values, client does not
Widget- everything set to rep?
doesn't really matter is is on rep or regular replication, its not replicating
since I dont use the onrep function for anything
on top, the widget is set to update itself once per sec
well, its not using default values either
Are you sure your gamestate is set to your custom gamestate?
sometimes I forget to do that in the settings
yes I'm pretty sure Im using correct gamestate because it handles creating the UI that isn't showing the proper values
and according to my testing, this is the only variable that doesn't replicate
no idea why
@ctzn_07 ( ο½₯ Ψ Ϋ§ )α€ no it is known bug no date time variables replicate https://answers.unrealengine.com/questions/585179/problem-correctly-displaying-utc-datetime.html#answer-586424 . It's in the unreal tracker list but I doubt it's a high priority so don't expect them to fix it anytime soon . so you can either edit the source code and fix it yourself or use blueprints and find a way to do it manually which is easier for some things but difficult for others Also i believe there is a plugin that extends the blueprint library on the marketplace and it has fixes for problems with timespan and date time variables . Found here https://www.unrealengine.com/marketplace/low-entry-extended-standard-library
@slim holly
Yes it is the same bug for timespan
it was a generic structure with map name, timelimit scorelimit etc
floats, ints and strings
wouldn't replicate at all
@slim holly oh thought you meant you was using the actual timespan nodes . Hmm strange my structure replicates fine . Can you post the blueprints
I already replaced it with regular individual variables
it's menu values anyway, has no gameplay effect
Oh ok np :-p
I wonder is this normal in large scale projects
I'm getting latent loading of 2-3 seconds when connecting to server
I have a board game where you control units on the board. When i destroy them i seem to be having an odd issue.
If im client 1 and i destroy my unit it all works fine. The unit is destroyed from both client 1 and client 2 and a message is displayed to both. Exactly how i want it.
Now if im client 2 and i destroy my unit, client 1 works fine, the unit destroys and the message appears. But client 2 for some reason changes its camera/view even though i am not using the pawns camera. (The message still appears on client 2.)
It doesnt seem to be related to replication..
I dont understand....
Is there a list of variables and such that should and need to always be replicated?
like is there an array of replicated variables the pawn is a part of?
@opal sentinel if im correct, you need to run check if the function should only run on the server or if it should run on both the 2nd client and the server
For example if youre on the 2nd client it runs SRVSetDeath, and if youre the host it just runs set death.
thanks for the help, still workin with it
i guess my question would be, why would that affect the client 2 camera? If it were an issue like that, wouldnt it not be destroying it on the client 2 screen and destroying it on client 1? Ive tried running it with all different replication settings, on server, client, multi.. it all does the same stuff.... if the camera just stayed put it would all be perfect
Anyone know a good reason why apply radial damage doesnt work in networking?
Apply damage works fine
but radial doesnt work
Ahahahahaha
you know what it was?
my origin was set to the floor height.
i added 5 to the z and it works
ffs xD
anyway to get the server to pause the game for all players?
like on a game over
everyone slows down for a bit
then pause and displays scoreboard?
I'm trying to replicate ultra dynamic sky, but i can't seem to figure it out
Anyone managed to do it?
Got it π
@jolly berry You would most likely need the Server to change the time dilation, the let it tell all clients to display the scoreboard, not sure if time dilation is replicated or not
will changing time dilation to 0 pause the game?
alright gimme a sec, I noticed if u do one of those time nodes
it doesn't actually fully stop
but ill try setting it to 0 and seeing what happens
yeah it doesn't get replicated that's all
perfect thanks!
it like pseudo gets replicated?
i had to set it to 0 on the client side
but the slowdown works fine through server
weird
Should I be using object pooling for fast fireing weapons ? I used to use it a lot in unity but havnt seen much mention of it in unreal. For example if I have a assault rifle holding 300 round mag and can fire very quickly is it better to only spawn say 100 bullets and just keep pooling them ?
I never understand why PlayerState is null on Character when it begin play (on server side)
Does Multiplayer require Steam to connect from Host - Client via IP addresses?
nope, just use
[OnlineSubsystem]
DefaultPlatformService=Null
Sweet, thanks guys.
@rare cloud Well, maybe because BeginPlay of an Actor is independent from what ever other references it has?
That means the PlayerState is not yet created/set when the BeginPlay calls
yeah is already created but I guess it isn't set :/
timer seem the only solution to solve the problem
but seem a bit tricky
ok to solve the issue simply use PossessedBy instead of BeginPlay π
anyone know how to use the onPostLogin and On Logout functions on the game mode. i am trying to display a message in a widget whenever a player logs in or out eg "player1 logged in" but everything i try fails ,
@worn nymph make suer your variables are replicating
use Print String to help debug
and use breakpoints to see if something is working
im not replicaating aa variable im caalling a custom event
on post login cast to playercontroller caall player haas login event send message
login works but i cant get logout message to work and there is no way to debug becaause no breakpoints are hit when you close the game
@gaunt kestrel Probably getting the Replicated Version and the Client version
I assume your sword is replicated
Consturction Script runs on Client and Server
Put the Spawning and Attaching of the Swords into BeginPlay and limit it to the Server (switch has authority)
Uhhh now my players arent connecting to each other anymore
Making it the sword "Only Relevant to owner" looks like it works
@thin stratus please save me i been trying this for days lol
Logout and Login are both called inside the GameMode
they are already there
And that happens on the Server
So what are you doing to show the Message?
yes i know i haave login messages working i just cant get logout to work
Why not
i tried using logout aand end play node
but i fear by the time those two nodes get caalled the widget is aalreaady destroyed and so i can send the message
cant*
You want to open a Widget on the leaving player?
no in my player controller i have a chat widget
thaat laayers use to send messaages to eaach other
and it also sends system messages from the server
so when i log in i send system message and all plaayer controllers listening to ths event dispach
will get the system message aand diplay user has logged in
but when i do the same for logout no message ever arrives
in theory the message should try to send twice once to the player still log in aand once to the player logging out
the player logging out it will obv drop
Why would it
but the player still left should get the message but it never works
On Logout -> Get all PlayerControllers (either that shitty node or save them in an array)
And on each of them you call a Client RPC that sends the message
so
i still dont know why steam doesnt show the correct usercount
on my server
it shows the correct max users
but not current
For exmaple, yes @worn nymph Or just the generic "ReceiveMessage" function
hey guys, on a clients character, when hitting a "Run on Server" event from a character, when i pass a reference to the clients character thru a parameter, can i just make changes to replicated variables on that reference, and they replicate down?
also, when calling a server event, should I pass anything to the target? i.e. the reference to the character? does that mean "use your instances of this this character" for this event?
I usually have a Client RPC that tells the PlayerController to display a message i pass
when i try that i get accessed none in my server log
Well then just put "Is Valid" on the call
It's probably that one player that leaves that's still i nthe array but flagged to die
@fossil silo If you call the RPC on the Character
Why would you pass the reference of it
After that call you are INSIDE of the Character on the server side
actually i was thinking on a multicast sent after a server call
ok, then that would be the same for the multicast then
Do you have an example screen of what you mean?
its weird, i am spawning particle systems on the character, but doing it on a server event, and only the server is seeing it
yea one sec
sorta complex so ill try to get the juicy bit
@fossil silo Well Particles aren'T replicated
So if you that inside of the ServerRPC only the server spawns it
hrmm
You would need to do that inside of a Multicast
even on multicast?
so the client hits a server event, which hits a multicast event, and that multicast will execute on the clients instance of the client that started it all?
clientrpc being the multicast?
ok with the isvalid i get no aaccessed none errors but i also get no message sent
Multicast (needs to be called on the Server) moves to everyone
No Multicast is a third thing
ohh u meant run on owning client
@worn nymph Then your system is not working :P
i know thqat i just dont get why
Print a message on the client RPC @worn nymph And see if it calls
login works fine
I am actually spawning a blueprint that contains a particle system...both set to replicate
@fossil silo You wanna read my compendium if basic RPCs are not yet fully understood
ive read it like 10 times π
Badum
i can pull off most of this stuff in a fresh project with ease, but for some reason our system is getting a bit complex to do what we need to, so its getting confusing a little
idk how Particles replicate
I usually do ServerRPC->Multicast->Spawn Particles/Sounds
You can spawn the Particles directly on the calling client
to minimize the lag
Otherwise the calling client needs to wait for the Multicast
so passing around a reference to the actor calling server events is unecessary
You then would need to filter the owning client in the Multicast
wait, if im passing a reference to the one calling, then multicasting that down, the clients dont have that guy do they?
i need to use the 'self' of that multicast instead
i guess i thought that they needed the reference to the calling actor...
but self already is in there
that may actually be what is in the way of this working
im doing everything from a passed character, grabbing variables off of it and doing things to it
that passed character will not be the actual clients reference when it gets down to all the other clients will it?
thatll be the initiating clients reference
The well drawn character is all the same. Just the Client and Server instances
If you call the RPCs you are moving to the correct instances anyway
No need to do any passing of references
ok, but to clarify, the reference i pass would not == the clients reference?
clients 'instance' i mean
That points to a location in your memory
ok some sucess the message fginaally sent but its missing the plaayer name lol
ahh
obviously that's not the same on all clients/server
but the character that you pass gets passed as a net ID
that links him to the other copies of him
After all, only the server has the actual character
the other ones are copies that are moving through the data tha the server sends
got it
ok, thanks cedric, im gonna try to refactor this a bit and see if this might solve the issues
appreciate all the insights π
ohh snap, one last thing i forgot i wanted to ask
actually, nvm i think u answered it for me earlier with a comment
@thin stratus ok its finaaally working except one bug. its printing the last person to log in name instead of the person that logs out, how do i get the right name from the playerstate?
Get the PlayerState from the leaving player?
yeah
i need to set the player leaving name variable to be the player thats leaving name
i have the naame saved in playerstate?
so just drag off the leaving controller cast to player state get name?
:D Stop asking me and do it
Get the PlayerState from the PlayerController of the leaving player
And get the name from it
sooooooooooooooooooooooo
on my server
it shows the correct max users
but not current```
i even posted this as a bug report
and epic ignores it
hey @thin stratus , if I am on a Run on Server event, and I hit another custom event (that is not run on server, just normal) does that trigger from the server? or from the original calling client?
Uff
If you call an RPC you are moving over
Everything you call in that RPC is called on that side
ServerRPC moves to the Server version
As long as you don't call a CLientRPC or multicast again, everything is on the server from that second on
Sweet ty
Ping is * 4 right? from player state
Yeh
@raven holly Does that value work for non steam dedicated servers or is it a steam thing ?
Oh cool so I just get ping from playerstate *4 = actual ping
yep
I love this group pick up so many new things . Thanks man I have a server list and been wondering how to do that for ages
π
How to implement hit detection/shooting mechanics in UE4?
All I know is Server has to rewind positions and check if it actually hit the enemy
Hi everyone
I'm trying to setup steam for online multiplayer, but I can only make it work in LAN
I have on my uproject:
"Enabled": true
"Name": "OnlineSubsystemSteam",
"Enabled": true```
target.cs
bUsesSteam = true;
and build.cs :
DynamicallyLoadedModuleNames.Add("OnlineSubsystemSteam");
PrivateDependencyModuleNames.AddRange(new string[] { });
// Uncomment if you are using Slate UI
// PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });
// Uncomment if you are using online features
PrivateDependencyModuleNames.Add("OnlineSubsystem");```
on default engine I have this:
!NetDriverDefinitions=ClearArray
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")
[Voice]
bEnabled=true
[OnlineSubSystem]
DefaultPlatformService=Steam
bHasVoiceEnabled=true
PollingIntervalInMs=20
[OnlineSubsystemSteam]
bEnabled=true
SteamDevAppId=480
GameServerQueryPort=27015
bRelaunchInSteam=false
GameVersion=1.0.0.0
bVACEnabled=1
bAllowP2PPacketRelay=true
P2PConnectionTimeout=90
[/Script/OnlineSubsystemSteam.SteamNetDriver]
NetConnectionClassName="/Script/OnlineSubsystemSteam.SteamNetConnection"
AllowDownloads=false
[/Script/OnlineSubsystemUtils.IpNetDriver]
InitialConnectTimeout=120.0```
do I need to have the steamsdk installed?
What's not working?]
yes
You cannot find each other's matches?
Make sure you both set your steam region to be same
if you're using valve's test id (=480)
I find 0 sessions, I can only find a session if I create one locally (another pc on my lan)
yes
you both need to have same steam region for appid=480
where can I find that?
will test it out π , thank you
Anyone have issues with a Standalone (launced via editor) not creating steam_appid.txt? its deletinmg steam_appid.txt if there is one present but its never generating a new one. It works on one PC, but not on another dev's machine.
just tested, @vocal ingot , same region, 0 sessions
@torpid nymph make sure LAN is not checked while finding/creating session
do you see Steam pop up when you start the game?
yes
Are you running stadalone?
yes
that's weird, make sure you both have same region exactly! For example make sure you both have "India - Mumbai" instead of "India - Delhi" and "India - Bangalore"
yea, it's exactly the same region "spain and portugal" π
Make sure it's not a LAN session
and make sure Max Results in "FInd Session" is greater than 0
can you try searching again
Nice π
my god, thank you so much
already lost almost a full day trying to understand this thing π
@torpid nymph i have this same issue with people I test with. Out of 4 people only two can host. We run into the scenario where others and myself cant find the session. I think I have heard something about it having to do with the steam heartbeat?? I really don't know and haven't looked into it
maybe that explains why the first time I tried it, it didn't work, these things probably go away if you have your own appid I would assume
Maybe your friend didn't destroy session correctly when hosting again.
make sure you always destroy session before finding match and before hosting a match
@torpid nymph Can confirm, 480 cause inconsistencies. I recommend comparing the results to your unique build ID and filter thatway
I'm trying to decide between using Gamesparks or Playfab for leaderboards/matchmaking etc. I'm wondering if anyone has experience with both or could tell me why they picked one over the other. Currently Playfab seems to provide more features, but I would like to get some information on the topic
using a third party service like that terrifies me
especially if you're storing data on their service
most platforms have stuff already available for leaderboards and matchmaking
Hey guys, is there any reference to how the game mode, game state and player state work in detail?
I want to let players pick a character from a list after they connect to the server and persist that information across disconnects and map changes
What can i use to map the player to the character in the game instance?. Is there any ID or something that is assigned by the game and it doesnt change irrespective of disconnects?
@twin juniper Thanks that helps a LOT!
Your welcome
for the future is there a reference or something that I can use to get better at finding these things?
uhm
its pretty useless tho, a lot of stuff isnt documented
basically
u have to sit there
and read
for hours on end
until u find what u need
Nice book to read before bedtime
Im really interested in how the entire thing works under the hood.
haha
alright ! thanks again
π
hey so
if u spawn a Actor on the server
and the player isnt near by it
does it just not spawn unless u have bAlwaysRelavant set to true?
nvm i got it lel
@lost inlet Data would only be game play relevant, but I'm guessing you're afraid if you store users CC information?
I don't have that on the timeline, and it'd mostly be statistics gathering/experience etc
no, i don't want to rely on someone else's backend infrastructure
these online service companies tend to get acquired after not too long, and what happens to your data?
they could withdraw their services at any time
for basic mm/leaderboards, that's best left to the platform (steam/xbl/psn/etc)
UE4 devs, I have a doubt. If I do not create sessions, would I be able to use voice chat commands ?
sessions means online sessions*
I need to know :/ Β―_(γ)_/Β―
Devs
any guidance ?
That depends on the service you are using
If you connect via IP to a Server
you should technically still be able to send voice data
So that means i can use online::voiceservice functions of unreal, in the clients where i connect via ip @thin stratus
I have got connected my clients to server via ip. Now can i use these functions to trigger voice communication?
I read in some forums that i need to initiate session service first. But its not written officially anywhere
<@&276089159905705985> please some anwers here. I request.
Provided my session service is not initiated. I haven't created any sessions
Epic stream team @ is accidentally?
Hey , i have a doubt regarding voice chat services. I haven't created any sessions, but im connected wity my server via ip. Can i use onlinesubsystem methods to enable voice chat?
I'm sorry for that @wintry cove
If that question is not for you
I want to ask epic devs.
No biggie :p a lot of people seem to wrongfully @ us
Got epic stream team accidentally
We aren't with epic, just created by them. We oversee hosting by the unreal engine twitch account :)
Hey guys,
I have a slight interrogation. Replicated player pawns on the server, do they have a reference to their player controller ?
I think i read that the player controller is present on the client side, and has a replicated version on the server
on a dedicated server, you only know about your own player controller
on a listen server*
?
there's a client that acts as server
i know what a listen server is
but the hosting client on a listen server knows about every player controller
any CLIENT to a server only knows about their own player controller
oh ok
thing is, i got a trigger box that calls a method if it has authority
so only on the server
But the characters return nullptr as a controller
only the local player has a controller reference
post the code/BP?
void APlayerAreaTracker::NotifyActorBeginOverlap(AActor* OtherActor)
{
if (!HasAuthority())
return;
APFECharacter* character = Cast<APFECharacter>(OtherActor);
if (!character)
return;
manager->RegisterPlayerArea(this, character);
}
This is the triggerbox code
I get a "RegisterplayerArea" for every character that triggers
so where does controller come from in the RegisterPlayerArea function?
really you'd be calling character->GetController() somewhere
mb on the copy pasta
void ADynamicAISpawnerManager::RegisterPlayerArea(APlayerAreaTracker* area, APFECharacter* character)
{
GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Green, FString("RegisterPlayerArea!"));
AController* controller = character->GetController();
if (!controller)
return;
GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Green, FString("controller"));
APFEPlayerController* playerController = Cast<APFEPlayerController>(controller);
if (!playerController)
return;
GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Green, FString("playercontroller"));
APFEPlayerState* playerState = Cast<APFEPlayerState>(playerController->PlayerState);
if (!playerState)
return;
GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Green, FString("playerstate"));
}
is controller nullptr or just playerController?
that really doesn't make much sense on a server, you can add a breakpoint and inspect the actor that's triggering it
what is the net cheapest & most reliable way to replicate input?
I was thinking blueprint reliable event but that's probably not the case is it
can anyone tell me if the pointer indexes for menu interaction on vive controllers need to be unique to a player or across all players?
i.e if i have 2 players with 2 vive controllers, each controller has a widget interaction component, do i need 0,1 on both players or 0,1 on player 1 and 2,3 on player 2 ?
How do I setup voice chat using steam?
How do you do, fellow multiplayer programmers http://i2.kym-cdn.com/entries/icons/original/000/018/666/fellowkids.jpg
Today's lesson I learned: make sure you test everything in multiplayer every time you change stuff, cause you never know when some random variable not being set on server will cause an engine crash when you go to use some other part of the program in multiplayer for the first time cause you just assumed that other part would work
Difference between GameMode and GameModeBase?
GameMode is a subclass of GameModeBase and has all of the features that GameMode had before the refactoring (4.13? 4.14?)
GameModeBase is more bare, but allows more customization of flow, especially for non-FPS games
Unreal Engine was made originally for and mainly used for FPS games (Unreal Tournament). Because Epic's base game mode class before 4.14 had FPS specific features that certain game modes wouldn't really make use of and would in turn cause unneccessary performance hits, they made the more rudimentary GameModeBase.
All UE4 projects made after 4.14 by default use GameModeBase
@vocal ingot
So question
anything u dont want the client to be able to edit
should just be replicated right?
so like if i have a timer, where a number decreases by another variable "decrementalAmount" should decementalamount be replicated
How does AGameMode::Broadcast work?
Just looking at the source will be your best resource here
It uses APlayerController::ClientTeamMessage, if you want to see what that does just go down the rabbit hole π
is there some way to call server functions from a client ignoring the owner chain?
apart from just going to the controller or similar
im doing some reverse clientside detection, where its the enemy who hits the client. If the enemy hits you in "your" screen, you get hit for real
of course, the client doesnt have the enemy bot in the owner chain, so i got to go through the controller to avoid it
(yes, im fully aware its hacky as fucking hell)
but im not worried about cheating, im doing PvE VR swordfighting, and i need the player to be able to block stuff and riposte and other fancy stuff, without any kind of delay or lag
also, becouse im doing fancy stuff with physics on the enemy sword, so dedicated server gets a bit bugged from the lower tick rate.
Works as this right now: Server tells enemy to perform an attack, this goes to a multicast. Client sees the enemy doing the attack animation, and tries to block or whatever. While in the animation, the enemy sword does precise traces (lots of them) on its path. If it hits you but not the shield, it damages you(clientside). Any ideas?
you sure its not a virtual function?
i remember it was split or something
Because you can't have a BlueprintNativeEvent be virtual
I think you can still override the _Implementation function though
@summer nova each client should have a controller they can call server events onto, I know you mentioned you wanted something else but it might just be the easiest route...it really shouldn't even matter what PC you call it on as long as you pass a reference of the enemy along
I'm not aware what part of the engine doesn't allow you to call server RPCs on unowned actors...you might be able to edit that out in your own build, but I'm not sure how easy that would be
its what im doing right now @brittle sinew
im calling a client function that "forwards" the damage event to the victim
given that i have my own DamageComponent, its all handled properly
but it kind of has to pingpong from server to client or do hacky stuff, so i wondered if there is a better way
now i have an OK melee combat system for my dungeoning VR game im prototyping
as its PvE i dont have to care about one player vs other desyncing
they can desync slightly, but not much. Only the animation itself might desync
@brittle sinew I did look at source. There's no definition for ClientTeamMessage, only declaration.
Umm
{
FString SMod = S;
static FName NAME_Say = FName(TEXT("Say"));
if( (Type == NAME_Say) && ( SenderPlayerState != NULL ) )
{
SMod = FString::Printf(TEXT("%s: %s"), *SenderPlayerState->PlayerName, *SMod);
}
// since this is on the client, we can assume that if Player exists, it is a LocalPlayer
if (Player != NULL)
{
UGameViewportClient *ViewportClient = CastChecked<ULocalPlayer>(Player)->ViewportClient;
if ( ViewportClient && ViewportClient->ViewportConsole )
{
CastChecked<ULocalPlayer>(Player)->ViewportClient->ViewportConsole->OutputText(SMod);
}
}
}```
Oh, but it does not have a BlueprintImplementable or BlueprintNativeEvent specifier?
Has anyone gotten voice chat on steam working?
I have an odd problem with steam that I am hoping someone can help with
We just started to release our game to a small number of testers on steam and while all the developers have no problems every single tester cannot get the steam SDK to load
For developers (using the same steam branch and depots) the game loads fine, however for the testers they ultimately fail to load the SDK with the following message
LogOnline: Unable to create OnlineSubsystem module Steam
Has anyone here had any luck with being able to control opacity on a client skeletal mesh?
I can do all the other functions with dynamic material paramers but controller opacity with a scaler value is giveing me some trouble for some reason
I am useing RepNotfiys to handle the materail changes for when the characters are built when they join a game
@twin juniper Using steams API or built in VOIP?
The built in VOIP works with SteamSubsystem
Question: I have actor reference on Host that needs to be updated to all controllers, what's the most reasonable way to do this?
asyncronously
ie new controller joins the game, it will get the same reference
@slim holly OnPostLogin
not gonna work, reference changes during gameplay
@ivory parcel Sounds like the plugin is not packaged?
I'm just gonna go with onrep foreach loop
@slim holly You want to give a new controller the same ref
To give someone a ref you need to have the tef
Ref*
If you have it, pass it on postlogin
I don't see the issue
host creates and destroys particular actor during gameplay
so new players need the ref, and existing players need the new ref
as onrep
since it's partitially replicated actor
You can't pass the ref if the client doesn't have a rep version of it
the actor is replicated, so ref would be valid
but the actor content has to be manually replicated due to data size
Yeah but wouldn't the actor already replicate when spawned or destroyed
Ah okay
Why not letting the actor handle that
it will timeout
too much data
wait
that might actually work, when host spawns it, the actor does multicast to update refs
triggering onrep function, and clients can get the data content
@thin stratus It was odd, all the users had todo was restart steam
but it makes no sense why only they had problems
@twin juniper either? What's the difference?
@twin juniper Steam has their own voip "Steam calling" which you can do through their chat client. I believe you can use their api for VOIP specific to your games. Unreals voip works over all platforms and only requires you to change a config var
^
Supposedly, it's a little harder than that and I'm not getting the best quality
i want to be able to chat in game
like in ark
Have a look at @heady merlin's Advanced Sessions Plugin unless you want to write it yourself in C++
I can't say the built in voip as is, is production ready though
/** Returns whether this Controller is a locally controlled PlayerController. */
UFUNCTION(BlueprintCallable, Category="Pawn")
bool IsLocalPlayerController() const;
/** Returns whether this Controller is a local controller. */
UFUNCTION(BlueprintCallable, Category="Pawn")
virtual bool IsLocalController() const;
Difference between these two?
afternoon
I'm working through a lobby tutorial and I have it so that my server can switch to another level and the client can connect to that. But when my server switches to it's other level, the client loads my main menu and I can't figure out why.
The client should do nothing.
Server calls OpenLevel with "listen".
It seems very simple.
@sterile plaza You need to use the "servertravel" command to bring all the clients
I worked through this tutorial more and it goes over servetravel there.
The session is already open, so you don't need to open another listen session
Yeah, I think it's a bit awkward playing in PIE because it's already connected.
Yeah servertravel doesn't really work over PIE, you need to play it either as packaged or right click the .uproject and choose "Launch game"
Sorry, seamless servertravel doesn't work
packaging now to test
what does uproject launch game do?
run it with -game instead of -debug?
it works!
so question...
the client was able to find the server session when running on my computer
How does it know what to connect to? Is this going to work across different machines? How does it resolve IP?
@sterile plaza Yes
badass
If you want to release however you must submit it to Steam on their GreenLight program
what does release mean in this context?
What if I give it to people and don't sell it?
Can anyone point me to any thread where I can read up on making a ue game entirely online?
What Im aiming for is: Player boots up game Game verifies if he has a connection or not Game loads main menu with realtime info such as in game item sales or new content
I pulled it off with a peer to peer model, but this requires a dedicated server for the scale.
Well, with what you're wanting you can always use the "check online subsystem" and it can verify if a certain subsystem is live/online and you can then use branches to then allow different widgets and UI's
So itll try and join the main server and have the ui force loaded from the server?
@ripe forge You would most likely need an MasterServer or hook into an Database backend service that would hold that information, if you manage to verify an connection then the client would request that new updated information
^Like that. Since I'm using Steam in mine, I check and see if Steam is running
If True, it'll load up the main menu with the "Play" Button, Options, Credit, and more.
If False, it'll display a Widget which tells the user that the Subsystem Steam is not running and they must either start with Steam or restart the game.
I see I see now I understand that part, now if Id like the store and such to be constantly updated in real time how would I go about that
Depends on how you'd get it/hook it. If you're using a website, you may be able to hook it in C++(I only use Blueprints, so I wouldn't know!)
Shit.... then if I was to use a website, itll load the elements from there when the game starts up
Or ill be constantly hitting the server with pull requests on new content from the store which wouldnt be good...
@tawny raven @fossil spoke Thanks for the help though guys, I'm gonna edit my design doc with this new information and maybe budget for a server.
@ripe forge "Realtime" can be a relative term somewhat. You dont have to poll an Server every frame to get constant updates.
You could request updates once every second or every 2 seconds
Would still count as "realtime" updates
But less stress
Tempted to add 3 instances where they recieve updates.
- Game Start
- Refresh Button (with a 5 second lock per click)
- After every session ends
An refresh with an cooldown is an good option
Hey guys while building a Multiplayer game the listen server is always spawning the character at origin instead of picking the player start location while other players are spawning at their playerstart location how can we solve this?
Make sure there isnt an Pawn Actor in the level at that location that is being auto possessed by the server
Hey in my level i didn't have any pawn actor at origin. i just created an empty new level and placed my player starts but it didn't worked out. Here is the screenshot of the oce i am using
in the above screenshot index value is given to the get of playerstart array
Does anyone know how to send a large, one time data transfer to clients? Basically at map load. Any useful resources you can point me to?
I'm struggling with widgets in multiplayer
whenever I try to get an item of an array through the widget the server has, it always gives an out of bounds error and crushes
I set the number of a replicated array to 50 on Beginplay (C++) but the widget that I create after this with a refrence to the actor component detects it's like there's 0 items in the array on the server
the client can normally get the 50 items
@red ledge servers dont have widgets
im confused
ur trying to replicate an array?
listen server
hm?
I have a replicated array
I set the size of it to 50 on ther server at begin play
and I have a widget that has a refrence to the actor componenet that has the inventory
when I access it from a client, it shows that it was set to 50 items correctly
but on the listen server (authority) it crashes because it shows that there's no items there
I'm sure in both cases that the array has 50 items on the component, I print it to ake sure
but accessing it from the widget gives weird restults
im not sure if listen servers can have UI
sorry i dont use listen servers
so i dont want to feed u the wrong information
lol sorry
nvm, it worked without change anything, I think it might have been a problem in the editor
but now it doesn't detect the widget on the client for some reason sigh
I mean it gives null
it's fucking up in weird ways
when I play with 2 clients it goes grazy
when I play with 4 it works???
do you know how to check if a controller is truly the local controller?
Is Local Controller returns true for the controllers on the server
I check for local controller as well
I'm sure the code is correct, the OnScreenDebugMessage works
but the widget doesn't work well for some reason
rebuilt it and it worked
restarted the engine it didn't work
is it possible to test the steam OSS in PIE?
What steam version is UE using atm?
Hey guys, maybe someone will be able to help me. I had a line trace in character blueprint. It was working fine on both ends client and server. But once I moved that line trace to weapon blueprint, server stopped seeing clients trace. The weapon blueprint is replicated, inside it calls to server and multi casts to everyone.
prepare to fix a lot of stuff yourself
i'm trying to disable the peer to peer sockets for dedicated right now
need to get working user auth too
@spice glen Is the ServerRPC reaching the server?
If not, how do you spawn the weapon? You need to make sure to set the owner on the weapon
That's usually done by plugging the controller reference of the client into the spawn actor nodes Owner parameter
I usually spawn my weapons in the character on beginplay (switch has authority to limit it to the server)
And the use "GetController" for the owner
Or just self
Self might be better here as beginplay calls before the pawn is possessed
π€
My OnRep is getting significantly delayed
I mean, like 10 seconds
and the weird thing, it's not even saturated
server can totally see clients character input
but client is still not aware that match has started
because the status update OnRep is not triggering
LogBlueprintUserMessages: [RecoilController_C_0] Server: Updating UI to: ScoreBoard_C
LogBlueprintUserMessages: [RecoilGameState_C_0] Server: [11:7:34.157] - MatchOn
LogBlueprintUserMessages: [RecoilGameState_C_0] Server: MatchOn
LogBlueprintUserMessages: [RecoilController_C_0] Client 0: Updating UI to: ScoreBoard_C
LogBlueprintUserMessages: [RecoilGameState_C_0] Client 0: [11:7:56.807] - MatchOn
that's a very long OnRep Delay
took a bunch of changes but i finally got our modified steam OSS to not use p2p sockets
for dedicated
So I have all sorts of network stuff and replication set up, and im working on game mode/game state/ player state stuff. For some reason, when I launch PIE with 2 or more players, and I fire, my print statement always says that PlayerController_0 is firing, even though it's a different actor thats firing
And on load it is also saying that all characters except for my first character dont have controllers
hm no, but my print statement looks like this:
TEXT("%s possessing: %s"), *GetName(), *ControlledPlayer->GetName());
and thats in my playercontroller class
and this is the result:
LogTemp:Warning: MyPlayerController_0 possessing: BP_FPSCharacter_C_0
LogTemp:Warning: MyPlayerController_0 possessing: BP_FPSCharacter_C_0
sounds right?
Each client thinks it's own pawn is the same name?
And each client thinks it's own player controller is PC 0?
Each client only has the one PC
yeah
so it'll be PC 0
right, but those prints above are from 2 different clients, so would one of them know their pawn is BP_FPSCharacter_C_1?
don't think so
hm
but not sure
GetSimulationTimeStep() - Max iteration 8 hit while remainint time 0.410193 > MaxSimulationTimeStep (0.050) for Character_BP movement 'walking'
what is this
How does player hosted multiplayer without port-forwarding work in games like Civilization 5 and Gta Online?
How did you guys implement multiplayer in your games? What do you think is the most seamless way to allow players to host their own servers for about 4 people? I really like the idea of integrating it all into the game. I don't have a need for dedicated server because every session is basically just a match without persistence on the level
Isn't UPnP LAN only?
I would look into NAT punchthroughβI've seen it used for this purpose before
Figuring out the whole flow, however, is a much bigger issue
hey is it possible a variable doesn't reliable replicate?
I ask because I have a ServerRevealFirstObjective that changes a int that's replicated to all clients
however sometimes the int is replicated, and sometimes it's not
and I can't figure out why, it almost seems abritrary
saturation maybe?
I had solid 29sec replication delay on single enum yesterday
and still do
trying to fix it
Hey guys ! I'm in Host Session function. I'm trying to create session right now. My " OnCreateSessionCompleteDelegateHandle = Sessions->AddOnCreateSessionCompleteDelegate_Handle(OnCreateSessionCompleteDelegate);" is making the game crash. What possibily be the reason ? I've initialized the delegate in constructor as " OnCreateSessionCompleteDelegate = FOnCreateSessionCompleteDelegate::CreateUObject(this, &AVizGameSession::OnCreateSessionComplete); "
/help
RTS games usually work peer 2 peer
GTA Online is also an example on how to never design your multiplayer
the client can cheat ANYTHING in GTAO
so ,anyone have ideas how to get around this replication delay when using bunch of reliable rpc's
I just did Steam online test, behavior is exactly the same as in PIE
RPCs transfer at desired speed, but nothing replicates for solid 15 seconds after it stops
I might add, If I set it to unreliable every other call will fail
which is not ideal situation
This is from server host start to start match
that's a pretty big gap where nothing happens
waiting for 1 enum replication
can you debug when a player fails an RPC validation?
I search a way to get all relevant pawns for a client
Is it possible to have multiple people in a game without cooking it? (Is it possible to test the game in editor with multiple people in the editor?)
you mean other person has files just to run editor uncooked? or multiple editor on same computer?
LogNetTraffic:Error: ReadContentBlockHeader: Stably named sub-object not found with a child actor component
not sure what would cause this
turns out it was a BP adding an actor, just switched it over to use a child actor component instead
and everything is fine
hey guys, anyone know why End Play or Destroyed don't get called on game modes in seamless travels?
What's the common approach to adding fire rate to a server/client game? Usually on the client I have the projectile spawn immediately but now that I wanna add a fire rate I'm not too sure how to do that properly. I would normally think of adding a delay to the client and then the same delay on the server side but my assumption is if there's discrepencies in ping then the client could end up firing a rocket when the server isn't yet allowing it to fire one
The way I setup my projectiles is to spawn locally on the client first right away, then ping the server to multicast to every other client to spawn their own local versions of the projectile
if I just added a delay to the local client side that's prone to hacking?
I figure u also have to have the server have the delay as well, but then let's say I delay it on the client and then delay it on the server. If it took 80ms to ping to the server that there's a delay in effect, but then I suddenly improved my connection to 40ms and tried firing at the exact moment my fire rate is available again locally, isn't it possible I'd ping the server and still be 40ms behind when the delay would complete server side?
Should I be using ping as a factor here or am I overthinking this?
server should do the logic
simple boolean IsTriggerDown is the best approach
client should not have power over how and when it fires
Has anyone gotten Slice Procedural Mesh to work in MP?
would anyone have a clue why when I server travel from my lobby to my main map it loads for like a second and then the listen server player crashes
and then every other client returns to main menu
[2017.04.22-04.47.52:464][757]LogGameMode: >> GameMode::HandleSeamlessTravelPlayer: LobbyPC_C_0 [2017.04.22-04.47.52:466][757]LogGameMode: << GameMode::HandleSeamlessTravelPlayer: GameplayPC_C_0 [2017.04.22-04.47.52:466][757]LogGameMode:Display: Match State Changed from EnteringMap to WaitingToStart [2017.04.22-04.47.52:469][757]LogGameState: Match State Changed from EnteringMap to WaitingToStart [2017.04.22-04.47.52:473][757]LogSlate: Took 0.000170 seconds to synchronously load lazily loaded font '../../../Engine/Content/EngineFonts/Faces/RobotoRegular.ufont' (155K) [2017.04.22-04.47.52:531][760]LogGameMode: >> GameMode::HandleSeamlessTravelPlayer: LobbyPC_C_1 [2017.04.22-04.47.52:532][760]LogGameMode: << GameMode::HandleSeamlessTravelPlayer: GameplayPC_C_1 [2017.04.22-04.47.52:563][762]LogScriptCore:Warning: Script Msg: DestroySession - Invalid player state
There is no error there, try running your listen server from visual studio so you can break where it crashes
Follow the programming setup guide in UE4 docs, the unrealvs plugin is useful too. Then just run with MAPNAME?listen from vs and connect from your client build and vs will break when the server crashes
how do i test a standalone built version?
i tried attaching but
it can't find source for it
since i guess its cooked
I need to test server travel
You can just hit debug from vs and run it straight from vs, don't need to attach
yo thanks for that advice
ended up finding the error and fixed everything
I was able to actually play the game I've been building for months with a couple friends. That was pretty cool haha
Not sure what I did exactly but I got it to debug through source code even when attached to a standalone exe
so yeah, thanks man! @weak meteor
What was the error out of curiosity? :)
how do we intiate login using facebook and give permission to app to give access to user's info(friends etc..) ?
I am now using Loginwith facebook(playfab block and with access token) in ue4 , its working . but what if the access token is exprired or not available ?
@weak meteor I was having my world objects manually ping my HUD when to update. They all had a reference to the HUD
on the Server (even though it was a listen server) I believe either HUD or something within the methods being called was acting on nullptrs
I basically just removed all references of HUD from the world objects and had the HUD manually check the objects for the data it needs
better encapsulation this way anyway
but yeah the error pointed to one of my HUD-> calls
I commented it out and then another HUD-> call from a different world object crashed it
so I learned there just to have the HUD handle things by itself and not have world objects worry about it. Makes sense too cause the HUD should be able to decide how it wants to render information, the objects shouldn't force the HUD to
Anyone here have any idea why my character movement is jittery, only for the character's player's client? I'm calling AddMovementInput from the client to do movement.
I've also tried calling it from the server, but then clients couldn't move.
I tried calling it from Server who then tells the client to call it but that had the same effect as just calling it from the client directly.
This only happens with listen server too
is your AddMovementInput fed from an inputcomponent ?
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.MakeFile.Targets(44,5): error MSB3075: The command "....\Build\BatchFiles\Build.bat UE4Server Win64 Development -waitmutex" exited with code 5. Please verify that you have sufficient rights to run this command.
Has anyone encountered such a problem? When building a server.
Is the file editable?
It seems that yes
the build output might give more information
Anyone know why a dev server build would be a success but no server.exe would be created?
Hey guys i have question
When i replicate destruction mesh, the debris all client see the different location, but is correct?
@balmy pike yep had same issue just clean out the project folder by deleting all the not needed derived folders . Delete the visual studio files including the database file then regenerate them by right clicking on the project . Then rebuild server . Worked for me
@cedar galleon that sounds correct, replicating physics objects is not going to work over a network game without some significant work and having little else in your network traffic. Destructible mesh should be cosmetic-only in a multiplayer game, so will look different on everybody's machine
@weak meteor tk man
does anyone know how to increase client net speed cap
anything I found with google is outdated
so apparantly, there is absolutely zero gaurantee that player controller zero is the local player on a p2p host
after a couple of games bouncing between maps/gamemodes etc, my host's GetPlayerController(0) returns one of the connected players
Is it ever said that there is one? I avoid those types of index find functions for chiefly that reason
well if you look through the answer hub/forums etc of how to get the local player controller on servers they pretty much all hint at zero should always be the local
also @raven holly UE4 limits player names to 20 characters
:c
do you use engine source?
@raven holly if you use the engine source, GameModeBase.cpp:705
FString InName = UGameplayStatics::ParseOption(Options, TEXT("Name")).Left(20);
change that 20 to whatever you want it to be
@wise depot I think those people either A. see it experimentally be index 0 once and extrapolate off of that or B. just hear it from others and repeat it
I've seen nothing official to support that, so yeah, I wouldn't trust it
yeah probably the latter
either way if anybody else is having this issue:
world->GetFirstLocalPlayerFromController()->GetPlayerController(world)
that should return the first local player controller.
Which does not gaurantee it is the primary player in splitscreen
there is a check for primary player somewhere I just can't remember where
Hi, could someone please explain to me how Vehicle System (Main Pawn is ThirdPersonCharacter and players can possess vehicles) on Server-listener should be build? My system works but my vehicles on Client and Server side shake uncontrollably for some reason. π¦
what is good place to store reference of managers, that every actor in player world can get without server calls? I dont care about cheating, its only FX stuff.
Gamestate is common ground between clients and server
Hello, I've been working on a multiplayer game for a bit, purely in the editor, and everything has been going okay, but now I'm trying to understand how to implement standalone dedicated servers properly. Do I need to/can I maintain separate projects for client/server? How does that affect replication when it comes to things like packaged content/plugins etc? If anyone has any resources they could suggest it would be much appreciated π
No, it's the same project
Download the Source, build it and then change the Engine Version of your project to it
Then you can open Visual Studio and build a Dedicated Server of your project
There are tons of wiki articles etc about this
In addtion
to split client from server code
That might be interesting
Yeah I found the wiki(s) for building dedicated servers and I know if can be done this way but I wondered if real games used separate projects, stripping graphics and things the server might not need or want for security like secret keys for connecting to platforms like playfab/gamesparks. After building my server (which works normally in the editor), it crashes with an OSVR error and I wondered if the server should even be running OSVR...
ty for that link
@thin stratus does that link you posted above actually split all of the code?
whats inside of FortniteServerClasses.h
lol
@twin juniper No idea, didn't read it
Is there a unique net ID / GUID for actors that is available on both Client and server?
yes, the one on the playerstate
I'm talking about on a per actor basis
is the sha-256 available in unreal 4.15+ vanila? If negative, do you know about any decent plugin?
Hey peeps. Anyone knows why the Find/Create session it not working on iOS? We are trying using "NULL" subsystem. Works perfectly on PC and on Android, but on iOS it's literally nothing.
@raven viper NULL subsystem
is only lan i believe
i think iOS has its own subsystem doesn't it?
It does lol
iOS has it's own subsystem, but it is not working for packaging. Weird as hell
It is actually not solved, they just marked it immediately.
And yes, for NULL, we are trying LAN here.
super stupid question I hope but if I have an actor in the world on the map in a dedicated server, say an NPC Character, and I join with my client do I end up with 2 unique characters or is the character on the server the same as the one on my client just replicated? I only ask as that stuff is present in the game world when I load it in the client so I don't know if it's checking with the server and just connecting them or if its a completely unique character on client and server
Depends on whether you are replicating the given actor or not. It can be either.
Has anyone used Amazon's GameLift with dedicated servers?
If a variable isnt replicated
does that mean that someone can edit the variable
using Cheat Engine
lol
I'm not aware of safeguards against it (if any), but I'd assume if the client has complete control over a local variable they could.
If you let them use that value in an authoritative way though, that's just asking for trouble π
In the end, however, that's mostly the job of an anti-cheat
And I completely disagree. :p
Just because it has garnered a reputation of being lackluster, which I don't think is completely fair, doesn't mean it's a useless AC
i mean
conan got so many hackers
ARK has tons of hackers
cs;go has hackers even
it doesnt seem to do much tbh
server admin is best anti hack imo
How do I guarantee my editor will test multiplayer replication stuff like standalone will? The reason I ask is because I have a aiming system that happens on Tick for my rocket launcher. It was replicating beautifully in the Editor but when I tested on a shipped product it wasn't replicating at all.
It leads me to believe it's NOT actually replicating and the editor is just doing it on its own somehow
If I say have a component called Rocket Launcher attached to my Actor, and for my Aiming Component's on Tick it raycasts from the camera to the ground and then tells the rocket launcher to rotate towards that point, how could I replicate that to server/clients?
On server do you have access to every camera for each pawn?
@jolly berry You can't guarantee it, which is why you need to test and set up some debugging tools that you can use in a packaged game as well
The "always" works for replication on tick is Has Authority - > Multicast to all
But that can be expensive, so think about how you want to use it and how important it is
You can also just do it every tick client side, and send the multicast at a different rate
there's no guarantee other than knowing how it actually should work
and general rule of "no tick" applies to it aswell
Hey guys, when building Dedicated servers, do the clients also need to be built from the source? Or could I use the standard version to do it?
you should build from the same source to guarantee no differences
Thanks, @weak meteor
Hey, I'm trying some multiplayer things for the first time, and trying to change a material from a blueprint. The material changes, but only on the client where the BP function is called. How would I also change it on the other clients and server? As I said, first time doing multiplayer, so very much a noob at this...
there are quite a lot of concepts behind networking and getting multiplayer working which are good to know first, have you gone through any of the tutorials and docs?
@brittle sinew so they have their game on steam, yet they intentionally opted out of VAC?
I'm not sure how VAC integration works tbh, I don't think it's a simple opt out though
I'm guessing it's more of an opt in in discussions with Valve directly
As in, you don't automatically get VAC by publishing a game on Steam?
According to the Steam page, there are 482 Steam games using VAC
There are currently β 14000 total games on Steam
You do the math
π
Well when you say "intentionally opt out" that sounds a bit different, I'm guessing it's a lot of work to integrate VAC in with a game
But correct, either way Conan does not run VAC
;l
lol
π
it just spams
"Overflow in the voice channel dropped 1 packet"
and thats it
i was under the impression you get vac out of the box, wasnt ue3 like that with udk ?
Yeah, what I said earlier about talking with Valve about it isn't completely accurate
But it still needs to be implemented in the game well, and that takes time+resources
So if you unpossess an autonomous proxy character it becomes an simulated proxy character
interesting
Is there anyway to check if a controllerless character is local?
Unpossessing a character causes it's role to change from AutonomousProxy to SimulatedProxy? I can work around that. However, it looks like it stops COND_OwnerOnly replication too...π΅
Has anyone dealt with that?
@rough iron ^ β€
@jolly siren why would u want to check that
Code that relies on Role and COND_OwnerOnly breaks when Character is unpossessed
@jolly siren overwrite UnPossess()?
When you unposses it posses it with another controller that handles your custom logic
An AI one for example, there is no repliction anymore through it though (you can still replicate through it's pawb which does exist on the clients)
Replication is totally not working in my game?
Nothing is replicating, and it's on always replicate
@ me pls if you know something
@past totem You won't get help with a question like that. Start small... pick one thing you want to replicate in the game and make it work at a very basic level. if it doesnt work, post your code for that simple thing and someone will help you fix it. it will let you better understand how to make it work for all the other aspects of the game. takes some trial and error to get used to it. "nothing works in my game, let me know if you know why" ... isn't helpful to get help
Hmm yea I guess xD sec
When one player spawns an actor, any other player doesnt see this actor and can walk in it and stuff
is player 2 in the server?
start with the obvious
- are you running in multiplayer?
http://prntscr.com/f1rv1a Yep autojoining too
k
The players see each other moving and stuff
is the actor set to replicate?
Yep
blueprint or C++?
BP
if C++, did you implement GetLifetimeReplicatedProps?
uhm
you mentioned spawning an actor
are you spawning the actor on the server or the client
Well I have 2 different actors, one of them is with C++ but also have a child BP
Hmm I'm just spawning it regularly lol
No idea what that means
use the "Has Authority" node
Yep keypress
ok
ok sec
you aren't spawning it on Authority
are you sending an RPC to the server to tell it to spawn the actor?
Setting up networked games for multiplayer.
Like this? http://prntscr.com/f1rw6n
I can also change the custom event to run on a sever tho right?
ok I will try that first then
The various aspects of multiplayer applied to Blueprints.
read that
basically, if you spawn an actor on the client, it only exists on the client
if you spawn an actor on the server, it exists for all clients (baring some exceptions that you wont hit in BP)
so, it's likely you are spawning the actor on the client, thus you must send an event to the server to tell it to spawn that actor for everyone
It doesnt go to the first exec, only to the remote one
made a custom event that run on the server and now it does work :P
Thanks :P
Whats that for?
It seems like calculations are changing in a server, wtf?
Server:
http://prntscr.com/f1s3n2
Not Server:
http://prntscr.com/f1s3yn
#Broken xD
What could cause that?
I'm having a really strange problem with setting up multiplayer
I finally dealt with a strange problem that was causing my actors to respawn when someone joined in "had absolutely nothing to do with logic stupidly enough"
And now I'm dealing with trying to figure out what the hell is going on.
When a server is on it's own I can destroy the actor and respawn it, and repocess it
however, the moment another player joins and someone dies, the game crashes
with the only message saying that there was an infinite loop assertion at Collisionhit
Or rather character death event
Another thing is that for some stupid reason, the other players are able to see the server move around just fine
But the server can't see them moving around
I'm not seeing anything that would trigger an infinite loop
Oh what the fuck
I found the error, but I'm not sure what's actually happening
Oh I see
No that wasn't it...
sigh unreal makes this unnecessairly difficult
@rough iron I can replicate through an AI's pawn, but not with COND_OwnerOnly right?
Is there some way to force replicated properties to resync once it's repossessed?
@ocean mango lemme guarantee you that it's not difficult at all
At this point you are probably doing something wrong
And we would need to see your code to help you
is it possible to create a dedicated server and then somehow execute functions on it, create a gui maybe?
I just trashed the online code, and swapped to Split screen, I've spent a week on this and made no substantial progress
Turns out that "Replication" doesn't quite mean what it says
If you have a component that is not a product of "CharacterComponent" then you need to provide the implementation details yourself
Also, yes. Yes it is possible FTriangle
@ocean mango do I need to create external app for that or it can be done with ue4?
You can create an external app.
But doing it in UE, I wouldn't know.
UE lets you make a dedicated server, as far as I am aware, but I know very little about the details