Hi!
If I create a task that runs a Cloudscript at Given Event that a player triggers (a Custom Event), is it possible to retreive from that cloudscript handler the Body of data from the triggering event?
Thanks!
Hi!
If I create a task that runs a Cloudscript at Given Event that a player triggers (a Custom Event), is it possible to retreive from that cloudscript handler the Body of data from the triggering event?
Thanks!
Yes, the details of the event that triggered the Rule are available in the context of the call to the handler in question. We'll have a more complete write-up available on this soon, but if you have a look at the handlePlayStreamEventAndProfile handler in the basic Cloud Script set up as Revision 1 in new titles, you'll see how to do this. In short, for a handler defined something like this:
handlers.handlePlayStreamEventAndProfile = function (args, context) {
...
}
You can access the parameters of the event that triggered the call using
context.playStreamEvent.EventName
context.playStreamEvent.EventId
etc.
1 Person is following this question.
Are there limits to cloudscript api calls in free tier?
Sending JSON data for executing Cloud Script
Getting InvalidDropTable when calling EvaluateRandomResultTable
Advantages of CloudScript over Calling JavaScript from Node.js
Virtual Currency subtract / add cause recalculation of the recharge rate