MmoEngine & actor class

Options
deganderson
edited April 2012 in DotNet
hi,

I am fooling around with the mmo island demo and I added some extra properties to the Item class. When OnItemAdded triggers the Item object has null values in the newly added properties. During the Initialize function they remain empty. They are however filled after this.actor.IsVisible is true in the Update function.

I don't understand this, can anyone explain this? And is there a way to make the full object available before entering the Update phase.

Deg

Comments

  • Boris
    Options
    When an Item is subscribed you receive just a properties revision, not the properties (see event ItemSubscribed). If the item has not been cached and if the revision has changed the client calls GetProperties for the item and then receives the newest properrties with event ItemProperties.
    On the client side this is received at HandleEventItemProperties in state WorldEntered.
  • Thank you,

    It is unclear to me where I can implement this HandleEventItemProperties handler, can you please point me in the right direction?
  • Boris
    Options
    Class Photon.MmoDemo.Client.GameStateStrategies.WorldEntered, method HandleEventItemProperties.
  • Great piece, keep up the terrific work.