question

robertdemjan avatar image
robertdemjan asked

Cloud code on gamelobby_ended

Hello

I'm trying to run a cloud code on the event "gamelobby_ended"

I've setup a rule, the event is com.playfab.gamelobby_ended, no conditions, and the action is execute cloud script, and selected my function handler.

The gamelobby_ended event happens, can see it in event history, but my script is not executing. Am I doing anything wrong, or any further actions required?

I can post the cloud script if you need it, but I don't think the problem lies there.

Thank you for your assistance.

CloudScriptPlayStream
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

Upon review, it's because Rules can actually only be triggered by Player events. I've opened a bug to have the drop-down filtered to only those events, to prevent confusion.

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

robertdemjan avatar image robertdemjan commented ·

So is there any way to run a cloud script when a game server closes? I want to notify an external service that a game has finished( so I can clear the reconnect datas ).

0 Likes 0 ·
brendan avatar image brendan robertdemjan commented ·

The best way would be to call the Cloud Script from the server code, as part of it finishing the session logic. The one issue would be if the server code has a bug that causes it to fail before reaching that point, it wouldn't send the message. So the alternative would be to make the call via a player event, or by calling the Cloud Script from a client directly.

0 Likes 0 ·
brendan avatar image
brendan answered

What Title ID is this for, so that we can have a look at the specifics of the setup of the Rule and Cloud Script?

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

robertdemjan avatar image robertdemjan commented ·

It's 2ABB

Thank you for your help

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.