Their copies stay the same, look here: https://docs.unrealengine.com/latest/INT/Gameplay/Networking/Travelling/
An overview of how travelling works in multiplayer.
1 messages ยท Page 308 of 1
Their copies stay the same, look here: https://docs.unrealengine.com/latest/INT/Gameplay/Networking/Travelling/
An overview of how travelling works in multiplayer.
I need a different PlayerController in the new level
Then that won't be something you want to use seamless travel for ๐
Wait wait wait
so I can't use Steam multiplayer without seamless travel
but seamless travel doesn't swap out PlayerControllers when travelling?
I'm not really sure about Steam and non-seamless travel, but it is intended functionality for the PlayerControllers to persist
Does using ClientTravel not work with Steam? I haven't tried integrating it, I have no idea
// // This is when I spawn it and activate the projectile on the client
Print("CLIENT ROTATION: " + ShootDirection.ToString());
Rocket->LaunchProjectile(ShootDirection);
Print("CLIENT SPAWN: " + Rocket->GetVelocity().ToString());
...
// This is when I spawn it and activate the projectile on the server
Print("SERVER ROTATION: " + ShootDirection.ToString());
Rocket->LaunchProjectile(ShootDirection);
UGameplayStatics::FinishSpawningActor(Rocket, ProjectileTransform);
Print("SERVER SPAWN: " + Rocket->GetVelocity().ToString());
So shootdirection is the same, but once I spawn and activate them, the GetVelocity is a different value
I've made some changes (disabling seamless travel) and will report back on results
I'm pretty stunned tho: isn't Epic supposedly creating Unreal Tournament and Fortnight and all that?
Well, not supposedly ๐
I swear those games are online and multiplayer
They need to move been levels, right?
I just don't understand why this seems so fragile and unsupported
You could always see how UT does it then ๐
Good point
I'd bet my left kidney that's all in C++ tho
and they will just say "BLueprint is for noooobz"
I mean, when you're working on a project of that scale I just think BP isn't realistic to use
But either way, yeah, it's probably mostly in C++
@obtuse zinc is there any particular reason you're doing that two part spawning? I haven't used it myself, so I don't know if there's something weird with it
Well, when distributed version control hasn't worked with the engine for 14 major updates, yeah Blueprints is difficult to collaborate in
(and I was under the assumption that that Spawn log was location, not velocity, and those two velocities aren't parallel or even close to it, odd)
the only reason why i have the spawning on the client is because i am just testing to see if i can figure out why its not shooting in the right spot lol
i took it out when i made the server one, but it back in for testing
anyone have an easy way or just a way to set playername and access it anytime anywhere ?
for a kill feed and display above head and for saving
@obtuse zinc I meant the Begin and Finish spawning, I haven't seen that used for a particular reason before really
PlayerState seems like a good place to put that kind of data
@ripe cypress PlayerState is replicated to all Clients
Quick Q for the networking eggheads - how have/would you typically handle having a 'game lobby' like a classic RTS? Just a pre-match state in your server's code or some other networking layer? I am doing the server outside of UE4 but thought some similar logic would apply ๐
@obtuse zinc you're launching and then finishing spawn, which changes its position
I wouldn't really mess with that, you can just set the MovementComponent to not auto activate
Yeah I do have that set. Okay ill try spawning and then activating the movement component and see what happens
Yeah, I would just try it with SpawnActor
That still wouldn't explain the discrepancy in X/Y velocities between server and client though, that's really weird
thats what the client demo one i have uses, and im actually not sure why i didnt do that for the server
UGameplayStatics::BeginDeferredActorSpawnFromClass
im using that
i couldnt find documentation on it anywhere
Why?
Negative: ServerTravel <Mapname> is not working for my tests with seamless travel OFF
@obtuse zinc what does LaunchProjectile do by the way?
And are you overriding PostNetReceiveVelocity like the SG example?
@ocean dust are you having the clients travel to the new server URL manually? I believe they need to do that
I don't understand what that means
I am using the Create Session and Join Session nodes to connect the two players
ServerTravel <Mapname> on the listen-server does not load the new map for both players
Yes, and I don't think it's supposed to with sessions
Oh
You have to tell the clients to call a method to go to the new server session
Then how do I change maps for both players?
I think part of our plugin broke cause I can't find out why client can't move
"As it seams, Server Travel is only possible with Steam when you use Seamless Travel" https://answers.unrealengine.com/questions/381639/clients-lose-connection-during-servertravel-with-o.html
@brittle sinew yeah I'm overriding it like in the example.
This is my launch function
void ARocket::LaunchProjectile(FVector ShootDirection)
{
MovementComp->Velocity = ShootDirection * MovementComp->InitialSpeed;
MovementComp->Activate();
}
๐
@brittle sinew FYI, switching over to SpawnActor worked. Not sure why the other one wasnt working. thanks for your help man.
@obtuse zinc hey sorry I just kinda bailed haha, but good to hear it works! I'm not sure why Epic uses that two part spawning to be honest
@brittle sinew @obtuse zinc https://docs.unrealengine.com/latest/INT/Programming/UnrealArchitecture/Actors/ActorLifecycle/
What actually happens when an Actor is loaded or spawned, and eventually dies.
Deferred Spawn
An Actor can be Deferred Spawned by having any properties set to "Expose on Spawn."
- SpawnActorDeferred - meant to spawn procedural Actors, allows additional setup before Blueprint construction script
- Everything in SpawnActor occurs, but after PostActorCreated the following occurs:
-- Do setup / call various "initialization functions" with a valid but incomplete Actor instance
-- FinishSpawningActor - called to Finalize the Actor, picks up at ExecuteConstruction in the Spawn Actor line.
Yeah, I mean I know generally what it does, I just don't know why they needed to use it when the only thing they were really doing was setting the velocity, when the movement component could just be set to not autoactivate
At the same time though, I don't know why it would break it
So ยฏ_(ใ)_/ยฏ
@ripe folio that's a nice-looking UI, my man. I recommend making all of the important buttons use that faded green color so that they stand out more and are more obvious to the player.
@ripe folio try using Networking Beacons. That's what's used in UT
what's is the best way to make a little round shop in multiplayer?
I have a struct with all the stuff you can buy
the problem is that the shop is placed in the level so the player doesn't own it
so my idea is to have a function on the shop with Buy(APawn* Buyer, FItemStruct Item) and make that call something like Buyer->AddItem(FItemStruct Item)
so is that enough?
Best to have items stored as an enum
The shop would have a struct for its data, so like the struct has the item type, amount it costs, how many it owns etc
yeah but I'm generally asking about the best way to handle this in a multiplayer setting
like would I take the money on the shop or the player?
it logically should be on the shop but I remember having funky behaviour with level actors since no player owns them
Well the server owns them. The server should take the cash from the player
When setting 2 players in the Unreal Editor and launching it. Should they have separate controller ID numbers?
Thanks @thin stratus
Would anyone know why my characters cant jump when im running on a dedicated server? lol. Listen server it works fine
Nvm no it doesnt, only listen server player can
GetCharacterMovement()->AddImpulse(GetActorUpVector() * JumpForce, true);
Should I be moving the jumping to the server?
Because I have a lot of logic in my jump function. Basically my jump button also controls sprint
You cant sprint without jumping first
Nothing stopping you from having conditions on whatever input triggers them
either way - i know the CharacterMovementComponent is replicated by deafult
so NATIVE fucntions inside this component = replicated
IE: Jump is one of those
now... because you've circumvented the MovementComponent....
you need to add in your own replication
Character->Jump()->ServerRequestJump()
Ok ill work on that, thanks
And it has a OnLanded function so you might be able to see if they can sprint after that?
i would highly suggest usin the JUMP() method in CharacterMovement - you can add any code you want inside of it
sipmly put: You're then relying ont he NATIVE REPLICATION that happens inside the component that is replicated by deafult
you'll probably have easier code + easier time replicating it.... not that it would be hard anyways
Ah I see what you're saying
I'll give it a shot
Yeah, so switching to the default jump works, now I just have to do it for my walljumping
Thans
Thanks*
Hey all - i'm having an issue with a FPS Template Project (4.14) - sipmly put when i spawn my character after EventPostLogin (shown below) it is non-reactive to input. I've done some print strings on the function - i know its firing locally.... and is locally controlled (TRUE). But it is not able to receive input - all help greatly appreciated! The mix of MultiplayerShootout & GenericShooter is being used for pawn management.
server travel with steam subsystem doesnt work, as far as i can see
@hallow shore - make sure your GAME MODE is set to UseSeamlessTravel(true)
again anything ENTRY LEVEL UI (IE: - Main Menu - where you choose Single/Multi player modes) should be done as FALSE.... because your NOT CONNECTED TO ANY OTHER PLAYERS OR OSS (Online SubSystem)
i though it checked it out ๐คฆ
i forget not all game modes inherit from one.
@worthy wasp it worked!
but ui left, i need to clear up? ๐ฆ
can you be more specific?
all ui before servertravel is left on screen
i traveled into blank map without any custom code
so you just open level with seamless enabled?
your not understanding
the LEVEL MAP is assigned a GAME MODE
inside that game mode - is seamlessTravel()
by the way this is from CREATESESSION()
IE: Hosting the game
so its man in a middle type of thing
it generate world save stuff there and reload new level
JOINING LEVEL:
http://puu.sh/tw5VQ/d3a790d01f.jpg
via esecute console command -> seamsless travel MAPNAME
hopefully you have coded things right so when you open level - you redraw your HUD
so the CONTROLLER PERSISTS they say
you need to print string (FROM CONTROLLER CLASS) BegiunPlay()->PrintString(BLAH) to see if it refires
i cant confirm that atm
but if you have issues....
write out to GameInstance variables
CONTROLLER CLASS: OnBeginPlaye()->GetGameInstance()->Cast->GetVariables
the stuff was designed to have game instance as storage and for complete reset of everything
any server map change SEAMLESS OR NOT - i always write to game instance
someone really need to dig into subsystem.steam and find why basic server travel doesnt work ๐
i dont have ANY problem with it - i dont know how you are
Anyone got some good recommendations for dedicated server hosts?
I was just going to go with amazon ec2 instance but thought i'd shop around first
digital ocean is not bad from what ive heard
AWS, google cloud service, azure are all not bad
amazon has an amazing feature set, but not sure how much use you'll make of that with a UE4 server
Thanks @polar bridge!
I shall look into google cloud service, forgot that was a thing
welcome ๐
@versed socket Oh I wish it was my UI! That's just an example from Planetary Annihliation in-case people forgot what game lobbies look like ๐
@regal hazel amazons are OK it really depends on how much CPU you need - the t2 medium is probably the minimum I'd go (its dual core) the m4.large I think would be ideal for my game but the price is pretty high
Having looked at google cloud service its actually looking fantastic
@regal hazel I also rented a dedicated from https://eoreality.net/ for a while, it was very powerful
Get the best Game Servers in the world! End of Reality provides hosting for popular games like CSGO, ARK, Minecraft, AAPG, also VPS, web, dedicated & voice servers
i had a credit from google this time last year and tried them, i recall it being ok
back then it was really hard to find out the cpu power you were getting, hopefully its improved
microsoft azure gives you some free credit for trying it out too but I didnt really like it
plus I get free credit from my msdn subscription.. still tho, for the money its amazing how much better amazon is vs msft
you can save too if you are good at linux too
Yeah I got the free credit as well, I just found
oh god i hate azures interface
yea, a mild nightmare
Do you like horizontal scrolling cause I put scrolling within the scrolling so you can scroll more when you want to scroll
yo dawg lol
i dont need UI innovation in my cloud management UI
but anyway, if you use vehicles, make sure you get enough CPU
if your server pins the cpu, the client experience goes to pooh real fast
I can imagine! But luckily we don't so that should be all good
@regal hazel Azure is free for Indie devs earning less than $120k I believe
Microsoft is here to help startups at every stage of their journey.
Its free in the sense you get credit
Unfortunately its quite pricey outside of that so for scaling later down the line going to hurt the ol wallet a bit :(
Yeah I agree ๐
I'm confused. This page https://docs.unrealengine.com/latest/INT/Gameplay/Networking/Travelling/index.html states you should not use seamless server travel when first loading a new map. But the Unreal multiplayer tutorial does this. Which one is correct?
An overview of how travelling works in multiplayer.
@wary path What exactly do they do?
They seamless travel from MainMenu to Lobby?
How are they doing that, OpenLevel node?
GameMode set to SeamlessTravel?
@cedric_exi from lobby to the selected game level using console command servertravel, and "Use Seamless Travel" in game mode
If I do it the same, I have problems setting the camera in the level blueprint, timing is broken
so not sure whether this is the correct way...
I have a problem with spawning an actor on the server, it's not showing up on the client
I've checked the usual suspects, is replicating, owner is set, etc
any possible culprits which might prevent it from showing up on the client?
ALifeBuoy* buoy = GetWorld()->SpawnActor<ALifeBuoy>(GetClass(), Parameters);
this is how i spawn it
Parameters is set on start to:
FActorSpawnParameters Parameters;
Parameters.Template = this;
Parameters.Owner = this->GetOwner();
for a shop in a round based game, I don't think I need to make the items array replicated right?
since it really doesn't change at all
and it's only for the local player
@grizzled loom where are you spawning this? GetClass() would spawn an actor of whatever class you're calling it from
If you have a class parameter, the template is just for the pointer output. I know that there's some sort of check for if the class is a child of the template class, but I forgot what it does, and am on mobile ๐
yea thats intended, im copying the object
its working perfectly on the server, just not showing up on the client
basically there's a single copy of the object in the initial level, everyone connects, everyone sees that object
and when you pick it up, a new copy of that object spawns in the original place
but only the server sees that copy
@brittle sinew and everything on the copy is set to replicate
bReplicates = true;
bReplicateMovement = true;
bAlwaysRelevant = true;
(same as the original one which works fine, only difference being it already exists in the level and is not spawned)
Ok managed to find a debug log on the client, which reads:
serializenewactor: static actor failed to load
googling that people point to a server/client version mismatch, but both are running latest file versions and all caches deleted
no running unpackaged
i tried packaging the server and connecting the client through the PIE, but same error
packaging both the client and server could be an option, but even if thats a fix, thats horrible for developing ๐ฆ
@wary path Weird. Yeah you shouldn't use Seamless Travel from MainMenu to Lobby
The Multiplayer Tutorial on Youtube by Epic Games isn't that good
I posted a bigger thread on the feedback forum a while ago
They teach a lot of things where they didn't know if it's correct or not. They just went with "it's working so don't touch it"
๐
@regal hazel The AWS Free Tier's benefits don't all disappear after the 12 months. Worth a thought I guess? (Scroll down to "How is this free?" http://slin.cloud/how-to-setup-a-serverless-backend-without-hosting-costs-part-1-overview/)
how would I handle buying from a shop in multiplayer?
basically I have an actr place in the level that acts as the shop
it shows a UI with all the items avaliable
Items in the shop are basically just a struct with the info and the class of the actual item
when the player buys an item, I take from the gold on the player state and create an object of that class then add it to a replicated array of items that user has
my question is what part of this should be a RPC?
I think becaause the shop actor is placed on the level it already belongs to the server?
so the calls from it will always be authority?
in my implementation, pcon would have component with all required rpc events from client to server, like "player ATTEMPT to buy item" "player ATTEMPT to sell item", etc.
Current items, if they should be client/server only, would be saved there as well.
@red ledge
@red ledge typically you would make an RPC to the server asking it to buy the item, in something like the controller. then the item would be added on the server and replicated to the client. that's how i do it, any other way i think has cheating potential.
in general, should i be able to connect to a listen server on my LAN through steam? i have everything setup, i can see it pop up my list of sessions, then when i connect it just hangs and eventually drops the connection. i'm just using the 480 test app id.
on my listen server, i don't see anything in the logs about someone trying to connect whatsoever
i had problems of lan working with steam before, didnt bothered to find out why, i dont see how lan matters.
just for testing. when i tried over the internet it had the exact same issue
steam master server
registered the session on the master server, which seems to work fine, go to connect and it just hangs
yessir
register the session, once it's registered open a level with the listen option
how you testing?
i mean ps setup
not sure i understand. i had it working fine with null subsystem, so i'm pretty sure my logic there is fine
you test play in editor mode?
[/Script/Engine.GameEngine]
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")
[OnlineSubsystem]
DefaultPlatformService=Steam
[OnlineSubsystemSteam]
bEnabled=true
SteamDevAppId=480
[/Script/OnlineSubsystemSteam.SteamNetDriver]
NetConnectionClassName="OnlineSubsystemSteam.SteamNetConnection"
if your build is small enough, i could try to host in it
it does work for me, if it would works, something wrong with ports and stuff.
i've even grabbed the pull request for fixing steam authentication
it's pretty big, i have a feeling it's something i'm missing
i tried completely disabling my firewall even
join session successful?
yes, actually, that's the odd part
says it joins fine, then just hangs on connecting
rather the callback is successful
ยฏ_(ใ)_/ยฏ
lol the only thing i can think is i'm sort of mixing C++ and BP, not sure if that would cause any issues?
neither, but i did see exi post saying that it doesn't work well
that was back in 4.9, though
really weird statement
just also struck me as odd because like you say it's just calling c++ in the backend
maybe he meant something like "session works just fine, so dont touch it cos you would screw up"
@thin stratus summon
did you try connecting by IP ?
no, i was under the impression you can't do that with steam
that works fine
been using it that way for a while now, but trying to move to steam
you using advanced session?
no, prefer to write my own BP functions
but i'm using exi's tutorial as a guideline
try advanced session plugin, its like 10 min to implement
maybe you the one who screwed up
lol that's very possible, i'll give it a try
its like one node for host which you need for testing
and there are a lot of stuff to turn on and off on it
so maybe you missed something
that's what i'm thinking too, so that sounds like a good idea! thanks!
lol, yeah i've noticed once i turn presence off i don't even see the session anymore
Thanks. I thought that it would be better to have the buy function on the shop, so I should move it to the player and make it check authority etc?
@red ledge, create an RPC with an id to the item to buy as arg
the player click to buy, the client send the id of the item, the server get the id, get informations of this item, get its price
get the player gold inside his playerstate
remove money and add the item to the player inventory
if he has enough money
you can check client side if he has enough money
to reduce sended message
but you must check server side too
thanks, will test that
is it better to have the player or character have the buying RPC ?
doesnt really matter, depends on presistance of player character in a game, but anyway i would pack it into a component.
@red ledge, I guess your inventory component is on your PlayerState and the gold amout of the player too
well the more logic place to declare this RPC is the PlayerState ๐
hmmm
so the player calls shop
the shop opens UMG menu with all items
the player chooses the item he wants "a struct"
and then UMG calls the player state from the owning client to buy the item?
@red ledge, the player open the shop menu, he choose an item to buy, check if player has enough money client side to reduce sended message, and finally call an RPC with the id of the item (Client -> Server).
Once the information is server side, you get PlayerState and check if he has enough money, if yes remove the money, and add item to the inventory
I won't enable the button on UMG unless the player has enough money to by that item so yeah I think that's client side checking
i would argue the controller is a better spot, player state is typically meant for replicating to everyone in the game where as controller is only relevant to the owner
either player state, shop or controller all would work theoretically
I can think of many places
the problem is that the shop is placed in the level
so it's always server side i think
yeah i'm actually not sure how that would work
I remember having replication problems with actors placed in the level before
if it was me i would do the controller. in fact that's how my shop works. in my controller i pass the class of the item they want to buy into a server RPC which checks to make sure they have money, then it spawns an actor on the server which replicates to all clients
take my advice with a salt of course, but i would even move cash to the controller. replicating it in the state will replicate to everyone. controller will only replicate to the owner, because controllers aren't replicated to everyone
unless of course other players need to see their cash
nah, they don't really need to see their cash, just that i'm trying to follow the practice of putting stuff like score and gold on the PlayerState
yeah score should definitely be in the PlayerState. i think typically if it's only relevant to the owner, controller, if everyone needs to see it, PlayerState
i think even if you do a client RPC from the PlayerState it will send it to everyone, i could be wrong on that one though
but i do know for sure if you do it from the controller, only the owner will see it, because the replicated clients don't have controllers of other players
@polar bridge, Simply set COND_OwnerOnly when you declare the replication of your variable on the PlayerState
and it will be replicate only to the Owner
yes that's also an option
which for me, has never really worked properly honestly
though that could have been an ownership issue. if you do it your PlayerState, i definitely recommend only replicating to the owner. a tech savvy user could start pulling cash from other players etc
and it's a waste of network bandwidth, more importantly ๐
hey ho ๐
I use world composition and loaded in 4by4 tiles each 2017x2017 i enabled client side level streaming however when i spawn in 4 players on different parts of the map the ones that spawn far away from the listen server just fall through the map, anyone experiencing this? They load the terrain though, they just dont have collision on it.
have you tried spawning one as a server to see if the terrain loads fine?
What do you mean?
so when you do a play in editor, the first client is always acting as the server
yeah
fly around with him and see if the terrain is loading fine everywhere
ive never done level streaming, but the first thing that comes to mind is the server isn't loading it correctly
yeah
Well the viewport doesnt load them.
But shouldnt the listen server in the background load them nevertheless?
are you running a dedicated server when you're doing that? if so uncheck it just so you can see it visually
No tried listen server on a client first lemme try dedicated.
When i try dedicated it works. Which confuses me.
I thought non dedicated emulates the dedicated.
no, not really
yes and no lol, i don't fully understand it myself but one is a listen server one is a dedicated server
there are some slight differences
So i guess World Composition doesnt work non dedicated.
that wouldn't surprise me
i think even with ark it actually runs a dedicated server in the background
You mean when you host a game on ark?
yeah, could be wrong there mind you
because i know for certain they heavily utilize level streaming
yeah, i've worked on a couple mods
Oh :p
their editor is...intense lol
yep, you can do total conversions which completely change the game
they maybe have added stuff for that now, it's been a while
but at the time, no
it was mostly just BP calls and variables they exposed
I see. Well thanks man. Helped me quite a lot, i wasnt even accounting listen vs. dedicated.
*accounting for
my pleasure, good luck!
thank you, first day in development :p
in game mode post login called before begin play but player state begin play called event before game mode post login ๐คฆ
That is a very complex sentence @hallow shore
@wheat breach
when level loaded, zero index player call post login BEFORE game mode begin play happens
when second player join session, begin play of his player session called BEFORE post login on game mode
judging by first row, i though post login is absolute first thing, since it happens even before game mode done.
uworld and his zero garantie in what order begin play called ๐
don't you love networking? ๐
im ok with networking, i just want thing to be consistent ๐ก
@hallow shore I've made the experience to be very careful about order of events. it seems that order is not always guaranteed. if you for example switch to seamless server travel, and relied on order before, all stuff will be messed up ๐ฆ
for a lot of stuff, I now use lazy initialization and cache the references as soon as they are available
@rare cloud so should I use COND_OwnerOnly even if it's only on the player controller?
have to turn it off, fix stuff then turn it on and fix stuff using two PC ๐
my life is pain...
@hallow shore you call a get-function to access a reference, instead of e.g. directly accessing playerstate. then you check if playerstate is valid, get the value you need, and cache it in a variable. if it is not yet valid, cache stays invalid. then check for cache validity, and skip if it is invalid
or something like this
problem is when to call get function
i mean i need array of players
and i need to know when new player join
I tend to do more polling now ๐ฆ since using UE
polling?
new player join is post login event...
to access the corresponding player state, you can use lazy initialization
if i message that new player on post login a thing via rpc, on reciving end the new player may not even have game instance ready
yup
game state*
its like, UI element constructed, but game state is not valid
WTF UE4
sometimes it is ready, but you cannot cast it to your class or whatever
I know this really *****
just don't rely on it to be ready
something need to be ready ๐
giant mess
it's best to use an example as guidance, in my opinion, as it takes a lot of time to find all this out...
the issue is, i would manage everything
but project is for client and i cannot find safe ground to ship it.
safe and reliable ground
safe one is ok, but patters are all over the place
giant pile of exceptions
then look at some example, how it is done there, and copy the "pattern". for example @thin stratus has a great multiplayer lobby example in the store where you can see an order of events which work.
the problem is that for example in beginplay, stuff is initialized on the server, but in beginplay on client it is not initialized
you have to consider all this...
link to example
I use these two for reference:
https://www.unrealengine.com/marketplace/lobby-chat-group-and-more
https://www.unrealengine.com/marketplace/generic-shooter-sample-project
Network systems like a Lobby, Chat, Groups (invite through the Chat), Character Select and more!
This is a 100% Blueprint project meant to be the base for an FPS / TPS.
there are some free examples by epic, but the more verbose one is c++
k, ty.
@hallow shore but seamless travel does work with PIE, regarding your upper comment. just disable the automatic connect
@hallow shore citing from the forum: "Go to the "Advanved Options" of the Play settings (Arrow right to the Play button) and go to the "Multiplayer Settings" tab. Disable "Auto Connect To Server"."
NEW UI UPDATE IN 4.12.x + VERSION:
Pictures:
http://puu.sh/pfvdt/def92e22b6.png
http://puu.sh/pfve4/8f63e0f16d.png
http://puu.sh/pfvet/f4375f78ce.png
http://puu.sh/pfvez/a902ab2121.png
http://puu.sh/pfvfa/f8ddec17fc.png
however, this only works if you start session, not if you test without starting session
ok no you are right, not PIE, I use standalone game, sorry, mixed this up. PIE only works with normal servertravel
why ever ๐ฆ
๐ฆ
Probably because of Single Process?
"UWorld::ServerTravel: Seamless travel currently NOT supported in single process PIE."
Hello all, I have a weird problem. On repnotify health, if it gets to 0, character death is called. However, when death happens by gun, it works properly (player collision gets turned off and player is invisible), but when death happens by a grenade, only player's movement is disabled but nothing else happens. What could cause this?
@bronze lava grenade is overkilling and you check only == 0
I'll check, thanks.
it should always be less or equal for int and less for float.
I don't think that that's the case. It does deactivate player movement, so the notifyrep does execute
show your "is dead" check
the code which calls this code
put breakpoint on granade "deal damage" and throw one
click on node you interested and press F9
when this node would be exectued with play in editor, game would pause and you would be able to do step by step
Alright, it highlighted my custom event
How do I unpause?
giant button PLAY
YES
it would pause every time
catch one you need and then go step by step on it and look variables values
some of them would be out of scope, some not.
But do you have any idea why the disabled input works correctly?
nope
maybe it kills twice or something like that
and screw up your delays
also player controller 0 is local player controller 0
Oh... it works with the gun, though
put breakpoint and test why it DOESNT work
Alright.
I can't find any reason for why it wouldn't work, when it works with the gun death...
go and check what are the difference between gun and other thing damage dealed
I made it so that when pressing "N", you'd automatically die. That doesn't work, either
I don't see any difference, both take the current health, substract the damage and apply it as the new health
Actually I do. The gun does everything on the server, while the grenade damage is multicast. This is because the grenade doesn't work when done on the server
it shouldnt multicast.
Make one function "Deal Damage"
and call it every time when target need to take damage
or use UE4 damage system
it should work as well
I'll try that. But when not using multicast for the grenade (server instead), it doesn't calculate the distance between the player and the grenade. Maybe I'm just doing everything wrong
This part doesn't work, if executed on server.
you doint it wrong
Thought so. What would I need to do then? :/
your damage its just distance between characters?
No, after getting the distance, the FirstPersonCharacter blueprint divides Grenade DMG with distance
in the thing which deal damage, lets talk about pistol, you have two characters, one which is source and one is target, because you figure out it on shoot
you should just call deal damage to target
when granade exploade, you get sphere of your granade radius and go one by one dealing damage
everything on server
everything on server!
type overlap actors
it would offer you nodes
there are box and sphere
Oh, found them. Thank you
Why not use a MultiSphereTracebyChannel?
You can't select a specific class filter with MultiSphere
TracebyObject then
Just cast to the class you want to "filter" for after the trace...
Don't see why that's any better than what they're doing now...
Their way should work, just looping through the results should be fine
True
dude
you need to start thinking
really
I have to go, so last one.
Since hit results return you array of everything got hit, maybe you can CALCULATE DISTANCE BASED ON EACH RESULT?
im gone.
Hey everyone, so I asked this in #lounge but was told to check this place out. So I am wanting to use PHP to create a login system for a C++ launcher I made. No idea where to start with PHP and server stuff that like, any insight would be kickass! Thanks in advance
@maiden saddle https://forums.unrealengine.com/showthread.php?94421-FREE-VaRest-Login-System-With-PHP-and-MySQL
Greetings Community,
7014470145
I've created an very basic login system with PHP - MySQL - VaRest / UE4.
I share this with you because I didn't see anything for such system in the web and because of that I want to support the community.
What you need is :
has anyone here ever actually managed to get steam to work with appid=480 ? either listen or dedicated server. i can't get either to work, and null subsystem works fine.
Yeah works fine when i do Gamejams
you can create sessions, find them, and join them fine?
Yep
guess i'll keep plugging away. been at it for a week or so now and still can't get it to work haha
You need to make sure your in the same region as the Host
Steam has region lock
You wont find sessions in other regions
yeah i've read that before. will it work over LAN?
how do you usually test, then?
i've been throwing my packaged build on another pc on the LAN, but no luck so far. was suggested i try the advanced session plugin and that actually made things worse lol. i had my session showing up before and couldn't join. now sessions just don't show up
Have you added the necessary information to your DefaultEngine.ini?
as far as i know yeah
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")
[OnlineSubsystem]
DefaultPlatformService=Steam
[OnlineSubsystemSteam]
bEnabled=true
SteamDevAppId=480
[/Script/OnlineSubsystemSteam.SteamNetDriver]
NetConnectionClassName="OnlineSubsystemSteam.SteamNetConnection"```
have the plugin enabled, etc etc. if i use the regular find sessions node intead of the advanced one my session shows up again. but when i join it tells me it joined fine, but in reality it just hangs with the server seeing no incoming connection
Can you ping your other computer?
yeah, if i use null subsystem i can connect to it in fact
i've used that, ive used the regular one, and i've created my own interface to try it. as far as i understand it, that doesn't work with steam
really i have no idea if steam will work with LAN, but i wouldn't see why not?
but i believe checking that box off makes it so it actually doens't use steam. could be wrong on that one tho
I'm really not then sorry. I've never had issues with it :/
i'm sure i'll figure it out eventually ๐ thanks!
turns out my virtual box network adapter was fucking everything up....lol...
VM's break everything
oh i wasn't even using a VM, just simply having the network adapter enabled on my PC screwed up the session mechanic
I'm make note of that next time someone has the same issue. Thanks for letting me know!
of course, if i can save someome else the head ache...
I might make a tutorial video and let people know that those issues may occur and I'll be sure to give you a shout out
i've had a similar issue before on a system with 2 network adapters both plugged in as well just FYI
that turned out to only be one of my issues. other issue was using source built engine that has a pull request added to it. that PR is supposed to fix steam authentication, but seems to actually break it. at least for listen servers.
once i used the 4.14 launcher version of the engine, with that network adapter disabled, then i was able to connect through the LAN with steam
but, ideally i would also like to get dedicated servers working. which i'm not sure is possible without that pull request
what is the problem with steam auth?
from what i've heard the launcher version of the engine doesn't properly enable steam authentication, and won't work with dedicated servers
but, i'm going to test that out myself
so you got a fix for a problem which you not sure exist ๐
it's a little difficult to test at the moment because there's currently a bug in 4.14 which broke logging functionality from the gamesession class ๐ฆ
4.14
what an unfortunate version you choose for your project
heh, i like to keep my engine up to date, so i upgrade it whenever a new one comes out.
started on 4.9 i think?
bald tactics, let's see if it pays out for him 
i have same project, started on 4.6
nothing ever breaks, proabably because full blueprint.
@fossil spoke small correction about steams region lock, it's the developers decision to be multiregion or not. In case of the 480 id it is locked.
Cheers, i was actually wondering about that
same for PSN and XBox
When I request an id I go always region free
while you have to take that into account in your matchmaking algos xD
Of course
gaming between US and EU has a high ping
Still, id prefer users/administrators contorl those options, not Steam :p
yeah of course
"You have exceeded the Maximum ping for this server" love those messages
while it's just a simple shurtcut for devs
if you are a small dev and you do not want to worry about such things region lock gives you a smooth base player experience
is it a bad idea to put basic movement in a PlayerController since each of these would be stored on the server per player? Better to put movement input in the actual Character blueprint?
@red ledge, Normally you don't need to specify COND_OwnerOnly with Controller
thanks
because it's only replicated with owning client
I will check some source code
yeah you don't need:
void AController::GetLifetimeReplicatedProps( TArray< FLifetimeProperty > & OutLifetimeProps ) const
{
Super::GetLifetimeReplicatedProps( OutLifetimeProps );
DOREPLIFETIME( AController, PlayerState );
DOREPLIFETIME( AController, Pawn );
}
thanks, I'll only use it in hings replicated to more than the client then.
AddMovementInput isn't replicated by default anymore?
update session doesnt work for me ๐ฆ
i lied, i didnt had "allow join in progress" ๐
so, what is reasonable update delay?
they have delay of 30 sec on server status update?
45 seconds
You're talking about find sessions yeh?
find session 45sec forced delay is insane
im talking about updating current game mode on extra info for session and stuff
Oh um then idk
But yeah cs has a 45 second delay. It's horrible
any idea how do I use Radial force on dedicated server?
same as any other and test how it works?
I use FireImpulse on hit event, but it's not doing anything
actually it's not giving any error
there's an option for "Enable physics on dedicated server" under the mesh, but it was already checked
and that's probably not what I'm looking
probably a replication problem?
not really, the force is spawned on server and works when client or server spawns it
dedicated servers doesnt simulate physics?
afaik it does, but there are some elements it's unaware
like animations and stuff
as far as I can tell, the impulse fires but it's just a tiny nudge
on dedicated
on listen server, it throws the player like 5m into the air
PUT IN MOAR POWAH
I tried, does nothing
Hey, how do i add a player / spawn a player over execute console command ? Google canยดt find what i am looking for but i remember that you could add players after you started multiplayer preview
Simliar to the addbots command
Nevermind found "create player" . Works now
anyone know if it's possible to get steam dedicated servers working with the launcher version of the engine? i tried with the pull request, but didn't work. in fact that even broke my listen server
there are launcher version of agame?
/nvm.
huh?
No Rarp you need a code solution to be able to build a dedicated server
i realize that, i have it in code, i've overriden RegisterServer in a custom GameSession class, but it doesn't seem to work
doesn't seem to ever start the session. and 4.13-4.14 has a wonderufl bug where logging doesn't work in GameSession
what parts doesnt work?
in fact if i try connecting to it through the console/ip it doesn't work either
but didn't work
guessing it doesn't work with latest version of the engine ๐ฆ
like i say, that actually breaks my listen server
Unreal Engine 4 Specialized Engineer that does Other Things too
will take a look at that, thanks
still no luck with that. ah well, i've spent enough time on this, will let epic hopefully solve the problem before i release haha.
pretty sure it's just a bug in the engine, hard to tell because i can't make any log calls inside any overridden functions on GameSession ๐ก
why you cant?
Hey guys, anyone here ever used AddForce over the network?
Together with CharacterMovementComponent
I keep getting jittery movement at the start
I have been stuck on this issue for a little while now and I am a bit stuck on trying to get the rest of these weapon parts to inherit a texture pattern that is first placed on the root componet of the weapon body and the attached parts are supposed to recive the same pattern. I can get color to work with no issue but as the weapons are built into different parts the clinet can only see the intial pattern show up on the weapon body but not the rest of the parts granted they are not all fully textured yet just the bodys and some barrels.
The left screen is the server and the right is the client
In the weapon after the server knows the weapon build from the player save its set the parts, color, stats and weapon pattern/ texture. This is the function that finds the name of the data table row to get the correct pattern and set the opacity of the pattern.
https://images.discordapp.net/.eJwFwdENhCAMANBdGIAWPAq4DUGCRqUEavy43O733lc941Kr2kX6XAG2Y2Yem57CI9WiK3O9SurH1JlvSCIp73dpMsFSJERCE73xzkYyYP0Hg3PokSwuwdkATzsbv033VtXvDwbkItk.P-NpTuRm1Ls15d2cXZyl9Mqb8r4?width=1255&height=671
Less wall of text, more use of paragraphs and spaces please
and this is the OnRepNotify that is supposed to set the image that is a texture parameter in the same materail that is used on the weapon parts
ok thats all i got for that right now
Anyone has somewhat recent tutorial/materials on pawn replication please? I was trying this https://answers.unrealengine.com/questions/43869/pawn-replication.html but couldn't get it working
I'm basically trying to add replication to rolling ball template
I'm doing addImpulse on left mouse button click
@verbal slate check this
https://forums.unrealengine.com/showthread.php?134152-ASSETS-Replication-and-Networking-Tutorial-Project-(Blueprint)
Hello,
I have made a quick project that I believe will help with learning about networking in UE4.
It's fairly simple game where you have a ball you can roll around with physics, you can change the color of the ball with C, control with WASD and scale and zoom with mouse wheel.
Teaches you how to setup camera controls, apply input and force to a physics enabled pawn and then replicate that to the server without using the built in replicated movement.
The movement and scale is
Anything in C++? Sorry, I forgot to mention that.
I'm trying to find child actor(component) forward vector
none of these values make sense
these are weapon actor forward vectors
Green ones are correct, and red ones are what server thinks
Is that the vector for the hit or the actual object on your character
no it's just forward vector of the weapon that character is holding
and the weapon is separate actor
And its location is affected by your characters animation?
attached to socket, yes
Ok go into your character, select the mesh then go down to the skeletal mesh section on the right
make sure the mesh component update flag is set to always tick pose and refresh bones
\ o /
That's a long time lol
it was a checkbox back then iirc
Probably the whole layout looked much simpler then
number of options has been steadily going up for sure
welp, that concludes my day, all bugs fixed
I'm jelous lol
don't worry, I need to start on session management tomorrow
and interface for server lists and stuff
Is there a way to change the max view distance of pawns? When player2 moves too far away, it turns invisible.
NetCullDistance or AlwaysRelevnt?
Thanks, that was it.
is there a guide how to run headless dedicated server of stock UE4 on Linux ?
@sly kernel I used this and got it up and running
https://wiki.unrealengine.com/Dedicated_Server_Guide_(Windows_%26_Linux)
Anyone have any experience in making physics work in multiplayer?
Hey guys I'm trying to get multiplayer up and running with OnlineSubsystemNull just testing on one computer. I've coded it up and both the creation of the session and the finding sessions behavior finishes correctly, but when it won't actually find any sessions. I have one created for another instance of the game, so I'm wondering what I'm doing wrong
I can post code if you'd like me to as well as my ini file info
Is it possible to do real render distance like h1z1 does? blocks out
@gray crag one thing to check is if you have a network adapter conflicting with your subsystem. Check that your only have your required network adapter enabled and the rest disabled
Also send a log of both server and client. Would help in investigsting the issue
anyone know if the on destroyed event is already multicast run on server or what ?
If an Actor is destroyed on the Server then all clients will also destroy that Actor, if an client destroys an Actor, only that clients Actor is destroyed.
anyone know why a replicated var wouldnr replicate?
its setting on the server right but on client it is staying 0.0
Are you sure your running on Authority?
the game is set to 1 player with dedicated server
Other variables are replicating
jus tnot htis one
Here are the logs for the issue above. Sorry it took me so long to get back to here
@fresh saddle I also don't understand what you mean by network adapter. Like hardware wise or something in code?
Its not a literal network adapter
Oh ok. I guess I wouldnt' know where to find that information
I have a multiplayer shooter if I want to show a widget to just the one that did the kill server or client how do i go about that ?
I usually send a ServerToClient RPC that tells that client to show whatever kill screen needs to appear.
I can't find any good tutorials online showing how to set up a simple healthbar that updates on the client when taking damage. Can someone point me in the right direction? Been stuck on this for over a week now
?
@potent prairie you are not looking hard enough
There's literally a whole newbie networking official guide
And the last of it has damage replications
Let Me Google That For You
pretty sure that's where it starts off
with what you are looking for
okay thanks bro
Okay that helps, turns out my character were taking damage this whole time, lol. I've narrowed the problem being that my UMG widget script is bad somewhere, not able to update the actual progress bars on the screen
Anyone having luck with smooth vehicle replication?
It can be jittery for me sometimes
@potent prairie pretty sure the progress bar is a float between 0 and 1
So take that into consideration
@fresh saddle yeah i think that's where I'm stuck at the moment
it works if i have 0-100hp
And how is it not working?
because if I have a boss with 1000hp or something
dividing 1000/100 still gives me above 100%
You know you can just do
(Health/MaxHealth)*100 and it'll give you the correct percentage right?
Welp I didn't have a MaxHealth variable so I'll get to work on that xD
so i dont need a currenthealth and maxhealth variable?
aww wait. i cant have health above 100 if im using floats right? I think that was the issue
Floats go way beyond 100 haha
Just have two variables
One of your current health
One of your max health
And do the math i said before
Don't worry about what i said about getting the defaults. One thing at a time
okay yeah it works now
lmao
just took me a long time to wrap my head around that logic lmao
Allgood! Glad it's workin
working on server and client woo! thanks buddy
Welcome
do OnRep events happen on a server?
Server to client
i mean do they trigger on a server
the replay system relies on replicated values to work
RPC's don't trigger in replays but OnRep functions do
which is fine for clients recording replay data but if the server doesn't trigger onRep events then it'll never (maybe?) record the event?
I believe they're client only
It just notifies the client when a new value has came thru afaik
They are client-sided events called by the server
But then again its easy to test
Just put a print string
I'm having an issue where the client can see both players with animations but the listenserver/host player can only see their own animations
how are you setting the variables? @agile lotus
just whatever animations are playing the way they're supposed to
Thats how I tell an animation to play. it checks the true or false of a boolean
The booleans are replicated
Different way to use Unreal's splitscreen. Looks fun, and players got more space than 4 corners ๐
@silk snow you had to mod the engine for that didn't you?
doen't the default splitscreen hardcode how the windows are split?
well, i done it in game code part, not engine code ๐ and you can even do it with blueprints
it is basically 4 cameras render to UMG. You can ahve 1 camera, and you do split the image, but then it requires a little HUGE image res
so, i decided to go with 4 small ones, instead of huge one
specially because the game design was pushing me more in that direction
and as the nvironment won't be super visibale, i managed to remove lots of meshes, vigitation and added fog, which amde it run smoothly 60 fps as the rest of the game
hmmm
@silk snow Regardless it's still rendering 4x times
no matter if you use default or the way your're doing it right
The thing is... those camera renders are probably quite costly
yes, rendering several times costing, but depends on what actually getting rendered ๐
camera and players have base of my occlusion system, it hides and shows things based on their location, quite primitive, but got the job done, and kept the game eprformance nice
my first attempt, grass killed the eprformance, specially because it moves
Also forward rendering is better than defferd in terms of speed. so, it's trade of, and what ur game requires
Heh, I just lost 6 hours of work
I should have committed more ๐ฆ
Trying to get playerstate to get HMD info
And spawn players accordingly in gamemode
To their appropriate pawns (VR and Non-VR)
and bam
I found the fucking problem
Doesn't like playerstate
I thought the official splitscreen did that somehow more efficiently
I mean, they literally had to disable some PP as it was treated as single view at some stage
so bloom etc would leak from one view into another
if you just do scenecaptures, you could keep that stuff enabled
hey (unreal n00b here). I've set up a default pawn in my game mode and have made a blueprint character thingy. it has its own camera attached as a child which is set to activate for player 0.
so when I start my game with 2 players, one spawns like it should, and the other gets a random camera that is added for some reason.
it seems to add one additional camera for each connected player to the scene
what's the correct way to deal with player cameras, since this is happening?
Are you trying to do a shared camera?
nope, nothing special, just a player camera. but I've just come over from Unity
Hi I have a problem with Pawn - Rigid body interaction on clients:
https://youtu.be/aWZW0i1WDtM
It shutters a lot on both sides ( pawn and rigid body)
It gets worse with higher ping
at 100 ms its nearly unplayably , you can see it at the end of the video.
that's expected
if MP physics were easy, there would be a lot more MP physics games
Dunno if this is a multi-player, blueprint or c++ question but wondering why I would be having issues with variable replication. I have an ai base class in c++. I then have a derived BP base class from that c++ class. I do all my basic logic in the ai base BP to be used in all children. The issue is variables replicated inside the c++ class work exactly as expected however variables created in the BP and set to replicate and edited only on server it won't replicate. Server sets it and I can see that but in the client version it stays at 0. If I then delete the variable from BP and put it in the c++ base class it replicates fine with the exact same BP setup. Is this a common problem?
Hmmm, So, I have a system going right now, where I want to make sure HMD is on a player before they transform. https://gyazo.com/070a16f4b9e6056a04c6723569a01807
I mean spawn*
That's in GameMode
The first one is from PlayerController
I had hoped that since I had put all the playercontrollers in an array
I could just get the value from each playercontroller
But each and everytime it wants to spawn the VR pawn
So, obviously my logic/line of thinking is wrong
Is there a way to get a variable to stay with the player when they go from "Main menu" (non-MP) mode to "Gameplay (MP-mode)" ?
Because it works just fine in SP obviously.
GameInstance or SaveGame
Was my way of thinking wrong because when the players login they get "new player controllers" from the server?
I know it is lol
I had trouble getting that to actually return true on the first tick
Oh, how did you fix it?
Not use it but rather start my VR Client directly with -VR
Hmm, but what if I want to make a game that allows both?
Hm
This is the problem
The way I solved it, but that was a special case
is only spawning the first one as a normal player
What you could try is
Spawning a Non VR pawn for everyone
and then, in the non VR one
checking the boolean on tick
and if ti's true you destroy the non vr one and repossess a VR one
that should work around it
Hmm, that's an interesting approach, I'll try it, thanks.
trying to run my game with two players, but half of the time, the second client just sees total black and only 1 player gets spawned
got 2 "PlayerStart" spawn points
I have a lot of questions, but does anyone know what might be going on?
my player is based on Pawn, and it's set as the default player, so I start the scene with no players, then it adds one (always), and if I'm lucky, the next one too
Could be that it uses the same SpawnPoint for both and they get spawned in each other
and sometimes he decides to just don't spawn it cause of collision
You might want to get more control by setting the Default Pawn to NONE
and then use the GameMode and its "OnPostLogin" function
That gets called for each player connecting
And gives you their playercontroller
So you can simply find a SpawnPoint, spawn the Pawn and possess it via the passed PlayerController
both the spawn points are set to 'Always spawn, ignore collisions'.
I could maybe try something like that, though I want to learn Unreal from the ground up, as I've just got started with it. been watching tutorials for some days
I feel like something is wrong. there's a bunch of weird things happening apart from it not always spawning the second client. for example, it adds two random cameras in the scene when I try to play with 2 clients
if I 'detach' during Play more, my camera is inverted..
(alright, the fault was in the player blueprint's properties, not the spawn points, spawn settings at the bottom)
Probably a dumb question but how do I replicate a variable from UMG to Server? I want the player to choose a name and pass it to the server.
You would most likely want to send the info through something that you can send a server RPC through, like your PlayerController
Hmm. I've tried PlayerController but the PlayerController's variable didn't change when I tried to set it to a variable stored on the Pawn
(both variables were set to replicate)
You don't change replicated variables on the client unless you have it set up with a proxy (actually I don't think that this is even possible), the server has authority over them
You would probably just want to send an RPC with the info
Good to hear ๐
hello every1
AKorePlayerState* KorePlayerState = Cast<AKorePlayerState>(ShooterHero->PlayerState);
//KorePlayerState->Inventory.Add(theInventoryItemToAddToInventoryArray);
KorePlayerState->Inventory.AddUnique(theInventoryItemToAddToInventoryArray);
GEngine->AddOnScreenDebugMessage(-1, 2.f, FColor::Green, TEXT("Added bandage to players inventory!"));
//theInventoryItemToAddToInventoryArray->Destroy();
i have this code where i add an item to my players inventory and then i want to destroy it from the world
but the problem is that if u destroy it on the server
theres some sort of lag time between the deletion and adding it to the players inventory
so i commented out the "theiventoryitemtoaddtoinventoryarray->Destroy();"
and it works fine when i commented that out
so i know it has to do with the fact that the Engine has a lag time between adding something to an array and destroying it from the world
it seems like what ends up happening is it destroys it from the world before adding it to the array
only on the client tho
because on the server it works fine
i feel like im super close, been working on this for a week or so now lol
So I made a small multiplayer template game and then packaged it, changed some stuff, and packaged the new version as well
and I can have players connect to each other despite using different versions
How far can this be taken? Can two completely different games connect? Obviously things won't work right, but I have ideas
In particular, I'd like to have a simplified html5 version of a game where a player can connect and play in a sort of "top-down" perspective
While the desktop version is first person and contains the real and true gameplay
@vivid siren usually just if the player characters and maps are different they cant connect
So basically anything that's doing proper replication
With your question about crossplatform
The engine doesnt support it out of the box but you can change it to
@fresh saddle In my test, I had changed the layout of the map and the two players could connect still, though it would act weird when they tried walking on the updated areas, as expected
@vivid siren not sure whats happened to allow you connect but they shouldn't be able to
So it's probably just a lucky test? I wouldn't want to spend a lot of time making something based on something that doesn't always work, lol
Do you have an alternative idea? I basically just need a top-down in-browser player who can watch a desktop version of the game and use minimal interactions
Would the Socket Connection plugin be of use here? I'm unfamiliar with server stuff so I have no clue
@vivid siren yes it would
Or you could just remove every check the server does but I'm not sure how well that'd work with browser
But yeah websockets are the way to go
@fresh saddle What about this? https://github.com/HeliosOrg/SimpleDataIntegration/wiki/Plugin-Setup
If the interaction on the webbrowser was minimal, would this be okay?
Ideally, I'd like the website user to have a minimap view of the desktop gameworld with simple interactions like changing light colors and such
Try this and use it with socket.io https://github.com/getnamo/socketio-client-ue4
So my pawn isn't detecting input axis MoveRight at all when online
any idea why a controller is never the local controller in this?
in C++ btw
or at least it works with the sever but never with the clients
tried it in both editor and standalone using sessions ans without
Is that method you're talking about a client RPC? @red ledge
Because if it only executes on the server, it'll never be locally controlled except for the server obviously
the Use is an RPC
so I should make the widget creation replicated on client?
the method to create a widget is not an RPC
You would have to to create a widget and/or have it return locally controlled true
Yeah, if it's only executing on the server you're never going to get it locally controlled...it's executing on the server ๐
so I would make the widget called from the actor Use server RPC to create the widget a Client RPC?
Yes, I believe that would work
Are you sure your server RPC is ever making it to the server either way though?
Because you can't call server RPCs on objects you don't own, so unless the use actor's owner is your PC or your pawn, it won't be called
pretty sure the server RPC reaches, I can see the debug string on both the server and the client when I use from the client
Oh, are you calling the actual RPC on the pawn? Think I misunderstood
Either way, you'll need a client RPC to spawn the widget
Is setting an actors default to replicates required if you use server sided RPC's?
Like can you call a server sided event if the actor is not set to replicating?
@brittle sinew yeah that was it thanks needed the Client RPC
@Kanga RPCs go from Server to Client, Client to Server or Server to all. They all require an instance of the Actor to be on the Client/s, so setting them to replicate is needed
@fresh saddle
You could technically spawn it on all of them by hand without setting it to replicate, but then the connection is missing between them
Hello, can anyone help me with HTC Vive multiplayer?
How do I replicate AddActorWorldOffset? It only changes position on owning client
If I execute the change on server, nothing happens
Nevermind I fixed it by doing an RPC to the server
@sturdy urchin It's better to type out your issue, and wait for someone who might know the answer
I'm assuming you are having issues with replicating a head attached to the camera component, as well as motioncontrollers
There are currently two ways to do it: Get motioncontroller transform and replicate to all (this breaks late update for the client, but you can hack it and have "dummy components" that gets replicated, and set them to "Owner No See"
The second one is to use mordentrals VRExpansionPlugin, which comes with a custom motioncontroller and camera component
Yeah, i have issues with motion controller and HMD model replication
May case:
One player launch Standalone game with server role in VR
Another player launch Standalone game with client role
Each game works on differnt PCs in local network (-lanplay)
I have custom pawn with HMD model wich spawns Weapons for each hand. Weapon is custom AActor class with bReplicates=true.
I want to both server and client can see transforms changes on HMD and both Weapons.
How can i do this? How i need write replication for this case?
github link
@sturdy urchin ask @wary willow i know that he recently got replication for HMDs working.
You could ask him for advice
Shoot, or more headaches
@wary willow Hello, what about your motion controllers?
@sturdy urchin Vic is using VRExpansionPlugin afaik. I did mention how you could do it without it though
Or just look at GripMotionController.cpp in VRExpansionPlugin and borrow the replication piece
Thanks all
Hello all. For the past two agonizing days, I've searched everywhere, including the forums and youtube... Maybe Im not using the right terminiology, but in a multiplayer game (not LAN) how do I display the name/nameplate/gamertag above each player? Is there a tutorial for this; or can someone point me in the right direction?
@ocean forge what part exactly are you stuck on? Getting the Name, Making the widget or Replicating the name across server / clients?
I can get the steam name to show above the host. But when other players join they only display the host's name above thier head aswell. @native axle
I've tried to give each player a unique ID to reference the player controller but nothing works.
Can a server detect all the playercontrollers
and cast to them
I have some input axis stuff tied to my player controllers
wondering if I should RPC the input axis events
@ocean forge get player state and then get display name
Player state has everything set up
When I get home from work, I'll try to post the blueprint I have
@fresh saddle Thank you
Any idea why would my client player is not spawning all the time in my multiplayer project? It works like 1 out of 5 times. I have 2 spawn points set up but most of the time only server player will spawn
And sometimes when I click to window with client player, ball just respawns and actually disappears from world objects
These are the 2 errors I got in output log LogSpawn:Warning: SpawnActor failed because of collision at the spawn location [X=300.000 Y=-1770.000 Z=230.000] for [BP_MinigolfBall_Pawn_C]
LogGameMode:Warning: Couldn't spawn Pawn of type BP_MinigolfBall_Pawn_C at Rotation: 0.000000 -0.000000 0.707104 0.707110
I'm 100% sure that there are no collisions
When the spawning fails, ball is spawned on 0,0,0 coordinates
The issue is collision. Most of the time when you have spawning issues like this it is due to collision problems.
Make sure that your not trying to spawn actors inside another actor by accident.
Change the spawn collision type to always spawn
I tried putting spawn points up in the air and that didn't work out
If the players are spawning at the same point they maybe colliding
So there's a possibility that UE chooses same spawn point for both players?
Tried setting spawn collisions to always spawn, ignore collisions but still getting the error
Doing an RPC to "Set Throttle Input" doesn't seem to work? :/
@bronze lava If you're using the default wheeled vehicle, if you set the vehicle to replicate, throttling is replicated by default, keep in mind that it has to be done be the owning controller since it is a pawn
Yeah I got it to work, thanks anyway :)
Would you happen to know anything about my problem in #legacy-physics ?
I'm having trouble replicating my OnJumpApexReached
hang on I'll post a screenie
I bind the event on BeginPlay of the Pawn but for some reason it never gets called while online. I replaced my custom jump logic with the default Jump and it still wasn't called
Stop Jumping is also ignored by default jump on client
@agile lotus is your character set to replicate?
Ok, i hacked Vive multiplayer via C++
@sturdy urchin gj
Thanks
@fresh saddle yes everything else replicates, movement, jumping, attacking. but jump just never ends so the character flies up
My team and I are having an issue where a certain variable is not replicating properly. The server sees it it's supposed to be, but the client see it how it started, what would be the cause of that?
is multiplayer shootout supposed to pull up the steam overlay when you launch it standalone? I see it is configured for steam in the DefaultEngine.ini, but it doesn't seem to bring it up.
@fringe dove makesure plugin is enabled if you are 4.13+
and/or not disabled in steam settings
@wary willow thanks, that was it, it is showing up now
@fringe dove no prob
Anyone know the default # of players on a server these days?
@raven holly what do you mean? Like limits?
Question regarding Steam integration
Why does Epic not update the sdk version themselves? And are there any issues with using newer versions with UE4?
@raven holly depends on implementation tbh
I think you run into CPU problems before you run into network problems
Everything, depending on how your animation blueprints are setup
Animation BP affect performance? ๐ฎ
Yiss, I think at least with animations themselves that unreal automatically has a LOD for them, but you'd have to check that