I'm trying to get the location of my player in the cloudcode but i'm not able to get it.
I don't see any method in SparkPlayer to get it.
Does anyone know how to do it?
Thank you
Best Answer
A
Antonio Donoso
said
over 8 years ago
I don't know if this will work, but you can try to send a AccounDetails request in cloud code and store the response. Then you can access all the data from the response.
It should be something like this:
var response = Spark.sendRequest({"@class":".AccountDetailsRequest"});
I don't know if this will work, but you can try to send a AccounDetails request in cloud code and store the response. Then you can access all the data from the response.
It should be something like this:
var response = Spark.sendRequest({"@class":".AccountDetailsRequest"});
var location = response.location;
Hope this works.
J
Jorge Aldao
said
over 8 years ago
It works great!
When I thought about doing it in that way, I dessestimate it because I thought that the request was going to be Async, but it seems like not
Jorge Aldao
Hi there!
I'm trying to get the location of my player in the cloudcode but i'm not able to get it.
I don't see any method in SparkPlayer to get it.
Does anyone know how to do it?
Thank you
I don't know if this will work, but you can try to send a AccounDetails request in cloud code and store the response. Then you can access all the data from the response.
It should be something like this:
var response = Spark.sendRequest({"@class":".AccountDetailsRequest"});
var location = response.location;
Hope this works.
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstAntonio Donoso
I don't know if this will work, but you can try to send a AccounDetails request in cloud code and store the response. Then you can access all the data from the response.
It should be something like this:
var response = Spark.sendRequest({"@class":".AccountDetailsRequest"});
var location = response.location;
Hope this works.
Jorge Aldao
It works great!
When I thought about doing it in that way, I dessestimate it because I thought that the request was going to be Async, but it seems like not
Thanks
-
Documentation Notes
-
Design issues with user events
-
Using NoSQL
-
Runtime Collections vs Metadata Collections
-
Anonymous authentication from browser app
-
Modules
-
Movement With Unity
-
Problem with url parameters for downloadables
-
Querying NoSql GameSparks database
-
Challenge accesType
See all 2487 topics