HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: _OnReplicationFieldUpdated not called  (Read 995 times)


  • Developers
  • *
  • Posts: 9
    • View Profile
_OnReplicationFieldUpdated not called
« on: Aug 05, 13, 05:00:33 PM »

i'm replicating a field from a server-class to a client-class.

the field-type is String.

i'm editing it in the
method of

works so far, the field changed on the client if modified on the server.
but the _OnReplicationFieldUpdated never gets called in the client-class for this.

-i checked R and IS for this field in the server-class
-i set changeCallback to YES for the field

still does not call OnReplicationFieldUpdated
on the client when changed : S

(I already checked this
but i don't really know how to continue with the given information)


+another question:

I'm replicating E_Abilities of the commonCharacter.
The client now knows how many abilities are contained in his new
E_Abilities, but the fields of each ability are not transmitted.
« Last Edit: Aug 05, 13, 06:15:28 PM by Musmaker »


  • General Accounts
  • *
  • Posts: 1155
  • Never stop learning
    • View Profile
    • Heroes and Villains MMORPG
Re: _OnReplicationFieldUpdated not called
« Reply #1 on: Aug 05, 13, 07:56:25 PM »

Another field to set would be the delta value to 1, for replication.
I believe the R is for replicate and the IS is for setting an initial value on server side.

I think in order for the field to get transmitted, each script has to have the same field in them, being a shared type of function. The script cmdabilities on the server side also needs to call or check the functions to pull forth its data.


  • General Accounts
  • *
  • Posts: 113
    • View Profile
Re: _OnReplicationFieldUpdated not called
« Reply #2 on: Aug 07, 13, 07:21:07 AM »

Answer to the 2nd question:

If a field "List of noderef of class XY" is replicated only the List is replicated.
Not the nodes, that are "behind the noderefs".

In order to fullfill the second part, you can do manual replication during "init-procedures" serverside.
Its not the best way, but you can replicate whatever nodes you intend to.

Code: [Select]
//Create a new Replication Group
  rg as NodeRef of Class _ReplicationGroup = createNodeFromClass("_replicationGroup")
//Replicate all Abilities
  foreach s in players.AbilityList
    ab as NodeRef of Class Ability = players.AbilityList[s]