Clients and hosts see differently

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Silver_Ibex

Member
Feb 27, 2001
654
0
16
I got the aimer to work client side; trouble is the host for some reason thinks it also needs to send its crosshairs to the clients.

This means whoever is playing as host still has their position given away by a visible laser crosshairs/aimer.

How do I stop the host from sending this information???
 
Last edited:

Silver_Ibex

Member
Feb 27, 2001
654
0
16
Sure I could do that and have already tried it, but it has to work while in third person view.
When bonlyownersee=true the object will only appear if you’re in first person view, that’s why your weapon mesh with the hands doesn’t hover in front of your body when you switch to behindview.

The problem here is the host sending unneeded info to the clients, it is telling the client it is spawning the sprite.

The clients aimer does not show up on the host, so that’s halfway complete, or fixed if you can afford a dedicated server, so the host never enters the match.

I already set the sprites “RemoteRole=none” in hopes that would solve the problem but that didn’t fix it :(
 

Silver_Ibex

Member
Feb 27, 2001
654
0
16
Spawning Within Simulated Functions
There are other interesting hidden behaviors that may not be immediately apparent. For example, because of the requirements that an actor be owned by a playerpawn at some point in its parent hierarchy, a function can only be replicated to a single player in the game. (No, making a player owned by another player will not work. ;) Multicast function replication does not exist. You can try to get this behavior using simulated functions, but no data can be passed between the server and the client, (since they both originate on their local machine, and exist only on that local machine.) Or you can use replicated variables, which can and are replicated to all players in the game, assuming they are relevant to them.
If a spawn is performed in a simulated function (simulated functions are explained later), then multiple copies of the actor are spawned: the server, and each of the clients that the simulated function was run on. The server's version is normally then replicated to the client, so the client would see two versions. This would create strange behavior as the two became out of sync, and the client-spawned one could easily be mistaken for the 'official one' that for some reason, isn't having it's variables replicated.

So all I had to do was remove the simulated from the function and it would not send the info to the client :D