UE2 - UT2kX Replication from client to server not work

  • 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.

VBKesha

New Member
Jan 17, 2013
8
0
0
I write my Pawn in UE2R but i cant replicate my variable from client to server.
Code:
replication
{
  reliable if(Role < ROLE_Authority)
    Throttle;

  reliable if(Role == ROLE_Authority)
    JGPosition, JGRotation, JGVelocity;
}

But Throttle dont update on server.
Full code here http://pastebin.com/5q4cwy4A
Throttle set value by PlayerController.
On sever log i see:
Code:
bNetTemporary -  False
bStatic  -  False
bNoDelete -  False
Role -  2
bAlwaysRelevant  -  True
bHidden   -  False
bBlockPlayers   -  True

Throttle: 0.00 Role -  3
........
Throttle: 0.00 Role -  3
On client:
Code:
ScriptLog: bNetTemporary -  False
ScriptLog: bStatic  -  False
ScriptLog: bNoDelete -  False
ScriptLog: Role -  2
ScriptLog: bAlwaysRelevant  -  True
ScriptLog: bHidden   -  False
ScriptLog: bBlockPlayers   -  True

ScriptLog: Throttle: 0.00 Role -  4
ScriptLog: Throttle: 0.00 Role -  2
...........................
ScriptLog: Throttle: 0.00 Role -  4
ScriptLog: Throttle: 0.00 Role -  2
On client Throttle changing i see it on my HUD. What i doing wrong?
 

Wormbo

Administrator
Staff member
Jun 4, 2001
5,913
36
48
Germany
www.koehler-homepage.de
Variable replication is only available for the server->client direction. Client->server replication only works for function calls. (See the replication article linked in my signature for more details.)