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 6 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"});
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
A
Antonio Donoso
said
over 6 years ago
Answer
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"});
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 PopularJorge 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
Antonio 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.
-
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 2486 topics