Sign In Register

How can we help you today?

Start a new topic
Answered

Realtime and properties

Hello,


Is there a way to access properties and property set in realtime scripts ?

My goal is to be able to AB tests some gameplay values (via segments).


Thanks for your help !


Best Answer

 Hey Simon,

There is no direct access to the Spark API from the RT scripts.
However you can preform a request out to your GameSparks config and get the response in your RT script and use that.

So, what i'd recommend is to create a logeventrequest which would use the Spark API to get the property set you need. The API can be found here.
Then from the RTscript you call the logeventrequest to get the property sets you need. You can see examples of how that is done here.

I'd recommend doing this in the initial setup rather than doing it in a packet callback, as it'll take some time to send the request and get the response back. In the meantime it'll holdup packets coming in.

Let us know if you have any other problems.
Thanks,
Sean

1 Comment

Answer

 Hey Simon,

There is no direct access to the Spark API from the RT scripts.
However you can preform a request out to your GameSparks config and get the response in your RT script and use that.

So, what i'd recommend is to create a logeventrequest which would use the Spark API to get the property set you need. The API can be found here.
Then from the RTscript you call the logeventrequest to get the property sets you need. You can see examples of how that is done here.

I'd recommend doing this in the initial setup rather than doing it in a packet callback, as it'll take some time to send the request and get the response back. In the meantime it'll holdup packets coming in.

Let us know if you have any other problems.
Thanks,
Sean

Login to post a comment