Sign In Register

How can we help you today?

Start a new topic
Answered

User Disconnection Event

i've looked long and hard, but i can find very limited documentation on the cloud code bindings. it'd be very helpful if the comments at the top of each binding script to offer a little more information on the event.

  1. is there a binding for when the player logs off or disconnects?
  2. what is the difference between the SessionTerminatedMessage in "user messages" and "global messages"?
thanks!


Best Answer

about "user messages" and "global messages"


If you send message to 100 users, first is called global script only once(you can add here logic for alll user), then user script is called for every user in their context. You can add there specific logic for specific user.

https://docs.gamesparks.net/documentation/cloud-code-concepts


For SessionTerminatedMessage I think better to use is "user script" because it gives the context of user(receiver).



opps. i've found the "player disconnected" binding under "system". please disregard part 1 of my question.

Answer

about "user messages" and "global messages"


If you send message to 100 users, first is called global script only once(you can add here logic for alll user), then user script is called for every user in their context. You can add there specific logic for specific user.

https://docs.gamesparks.net/documentation/cloud-code-concepts


For SessionTerminatedMessage I think better to use is "user script" because it gives the context of user(receiver).


Login to post a comment