Photon Properties
Options
Hi, can anybody tell me an example how I can use Properties in my games, according with this:
http://doc.exitgames.com/v3/liteandlitelobbyaddon/liteconcepts
I need to assign a variable and edit his value every time that a player connects into the room.
Marco
http://doc.exitgames.com/v3/liteandlitelobbyaddon/liteconcepts
I need to assign a variable and edit his value every time that a player connects into the room.
Marco
0
Comments
-
There are actor- and room/game-properties.
In the dotnet library, you can use OpSetPropertiesOfActor, OpGetPropertiesOfActor or OpSetPropertiesOfGame and OpGetPropertiesOfGame.
When a player joins a game with properties, those are provided in the join response. These response parameters are used:
ActorProperties (249)
A hashtable of actor properties, one key-value per actor in room. The key is the (int) actornumber, value is a hashtable of properties.
GameProperties (248)
A hashtable of this room's properties (custom and "pre-defined" ones).
Also, setting properties offers you the ability to "broadcast" them, which forwards changes to other players in the room.0 -
I don't understand very weel, if I want to OpSetPropertiesOfGame and setting a number = 1 for the game room what I neeed to do? Can you put some code for example?
Thanks,
Marco0