Webhook for Player Properties Changes

JohnTube
✭✭✭✭✭
Hi,
Since changing the Player's properties will broadcast an event to the other players can you add a webhook to get the updates from server side like with Room properties ?
edit : Is it possible to have PlayerProperties available in the GameJoin Webhook ?
edit 2 : Is it possible to include a isInactive per Player in the GameEvent Webhook ? I want to know if the opponent is inactive when sending a move to send a push notification directly from server side code instead of client code. The only workaround I see is to add a flag in the event data.
Thanks
Since changing the Player's properties will broadcast an event to the other players can you add a webhook to get the updates from server side like with Room properties ?
edit : Is it possible to have PlayerProperties available in the GameJoin Webhook ?
edit 2 : Is it possible to include a isInactive per Player in the GameEvent Webhook ? I want to know if the opponent is inactive when sending a move to send a push notification directly from server side code instead of client code. The only workaround I see is to add a flag in the event data.
Thanks
0
Comments
-
JohnTube wrote:Since changing the Player's properties will broadcast an event to the other players can you add a webhook to get the updates from server side like with Room properties ?
opParameters.Add(ParameterCode.EventForward, true);JohnTube wrote:edit : Is it possible to have PlayerProperties available in the GameJoin Webhook ?JohnTube wrote:edit 2 : Is it possible to include a isInactive per Player in the GameEvent Webhook ? I want to know if the opponent is inactive when sending a move to send a push notification directly from server side code instead of client code. The only workaround I see is to add a flag in the event data.
Not with the current live version - but we already noticed this. And we're adding it in the update planned for this week.0 -
Philip wrote:That is what the SetProperties Webhook is for ... like for events you have to set the flag:
opParameters.Add(ParameterCode.EventForward, true);
I don't know if you got my question but I'm assuming you did.
I will try this by implementing an override method OpSetPropertiesOfActor in LoadBalancingPeer that takes 3 parameters :public virtual bool OpSetPropertiesOfActor(int actorNr, Hashtable actorProperties, bool webForward) { if (this.DebugOut >= DebugLevel.INFO) { this.Listener.DebugReturn(DebugLevel.INFO, "OpSetPropertiesOfActor()"); } Dictionary<byte, object> opParameters = new Dictionary<byte, object>(); opParameters.Add(ParameterCode.Properties, actorProperties); opParameters.Add(ParameterCode.ActorNr, actorNr); opParameters.Add(ParameterCode.Broadcast, true); if (webForward) { opParameters[ParameterCode.EventForward] = true; } return this.OpCustom((byte)OperationCode.SetProperties, opParameters, true, 0, false); }
0 -
Re-reading your original question ...Since changing the Player's properties will broadcast an event to the other players can you add a webhook to get the updates from server side like with Room properties
Meaning that the code change you propose in the client should work - and is what I meant.0 -
Then why don't you rename the GameProperties / SetProperties webhook and update the documentation here and your post here ? And add the option to do this from the LoadBalancingClient ?
edit : I can confirm that this works after testing it but it would be perfect if we could make a difference between Roomproperties and PlayerProperties like from client side (// we get PLAYERproperties if actorNr > 0 or ROOMproperties if actorNumber is not set or 0).0 -
JohnTube wrote:Then why don't you rename the GameProperties / SetProperties webhook and update the documentation here and your post here ? And add the option to do this from the LoadBalancingClient ?
edit : I can confirm that this works after testing it but it would be perfect if we could make a difference between Roomproperties and PlayerProperties like from client side (// we get PLAYERproperties if actorNr > 0 or ROOMproperties if actorNumber is not set or 0).
Hi John,
thanks and you do have a point - we'll have to discuss on our end on how to proceed.
-Philip0