This is the ‘Multicast’ logic. If client has no authority, then the client requests the server to perform the action and update all network. This is done to prevent players from ‘cheating’.
what is confusing to me is that according to the GAS documentation. lyra is supposed to be setup to handle Replications with these Game Ability system. the B_PickRandomCharacter class according to the documentation should handle replications as its assigned to a controler ability set within B_ShooterGame_Elimination etc.
https://docs.unrealengine.com/5.0/en-US/abilities-in-lyra-in-unreal-engine/
I understand it is true for gameplay abilities. However, B_Pick Random Character is an actor component added to a controller during begin play, and it is designed to automatically run a routine (add parts) only on server authority. It is hard to me to understand how it fits in the Character Selection logic because I am not going deeper at C++ coding. Let’s see what we can learn from this issue.
I am reverting the logic to yesterday’s blueprints and see what I can find. I’ll update here if I find anything.
Go to Advanced Settings and make sure you have Run Dedicated
I can’t find this option. Do you mean ‘Run under one process’?
This might be helpful. It has to do with Packaging Lyra Client and Lyra Server.
How to Package a Dedicated Server in Unreal Engine - YouTube
No I guess that was an older option you no longer have to use. Sorry. Client mode is automatically a dedicated.
The thing is, Lyra team settings work just fine. But perhaps those are “registered” differently.
Yes, the settings are saved correctly, but not properly loaded in local machines. I am quite sure we need to pack the other game targets Client and a dedicated server.
Just curious on reverting to your logic, what to do about B_PickRandomCharacter assigned to the shootergame definition? if you remove it the player spawns empty with only the weapon.
I’m curious because @dromo mentioned about a custom B_RandomCharacter.
That should be a good option, indeed. Assigning an actor component to the Hero Shooter that attaches the cosmetic character after possess event. I need to open the Add Character Parts in VS 2022 to see what is in there.
No. It crashes on loading the level in all cases:
- Replace Controller by Hero Shooter to add Pick Random Character, that means it works only for controllers.
- Keep Controller with Pick Random Character (Tinplate without Sphere) + Add an actor component to Hero Shooter that attaches a sphere and gets the selected color
just a heads up packaging Server - Client is a whole other issue i ran server and clients on separate machines and game just hangs on loading screen - i might be missing something but it seems to be a common issue in other posts.
I’ve found something interesting. I added the sphere to Hero Shooter and transferred the code over. Now. the ‘client’ player is not executing Multicast nodes.
This looks like you’re in the right path, I’m just wondering how does the add player parts would work.
No, the client selected purple, and its showing black in both computers. Multicast is not being called.
The add player parts only works with controllers. It crashes if I try to execute it from Hero Shooter, unless my setup wasn’t correct enough.
I am testing two more alternatives of replication and I am done. I’ll wait for help. It’s way beyond my understanding.