Create actor properties on server (HP, Mana)

edited January 2011 in Photon Server
Hello

Is it possible to set the properties on the server when an actor enters the world ?
So that only the client can read those properties and can't edit.
I wanna use it for health, mana etc ... So that it will be save and only the server can control it.


Thanks

Rofni

Comments

  • You could simply set the properties when you create an actor. If you need to have different values / types of actors, you could extend the enter world operation.
    You are in full control of the functionality. You could either not make the client change certain properties and just fetch them or get updates or you could remove the set properties operation on the server side. This, however, would effectively cut off ALL properties from the user's control and in most cases, it makes sense to have some in client-control and some are exclusively set by the server side.
  • Thanks for the fast response!
    I'm reading the Lite and the mmo example for a few days now, the properties are not fully clear for me, but now i got it in the Actor.cs, with the PropertyBag.


    Rofni
  • properties in the mmo demo are a little bit different as they are part of the Item and not the actor (item = representation of actor).
    You can put anything into the properties hashtable when you create the item; look at the implementation of operation EnterZone to see how.
Sign In or Register to comment.