I would like to setup dynamic teams based on players location. The creation / joining / leaving and destruction of teams would not be handled by the players but by cloud code.
How can I access the team functionalities from an event?
But for "write" operations I'm seeing only request. Is there anyway to access those from cloud code?
Best Answer
C
Customer Support
said
over 5 years ago
Hey Stephane,
Once you have the team created, you can get that team using its id....
var team = Spark.getTeams().getTeam("team id");
From there you have access to all the features that SparkTeam object can do [docs here]. You can also create, join, leave or drop teams through the cloud code too [docs here].
Once you have the team created, you can get that team using its id....
var team = Spark.getTeams().getTeam("team id");
From there you have access to all the features that SparkTeam object can do [docs here]. You can also create, join, leave or drop teams through the cloud code too [docs here].
Hope that helps, -Sean
S
Stephane Lallee
said
over 5 years ago
Great ! I did not find those documentation pages before, that is exactly what I was looking for ! Thanks a lot :-)
Stephane Lallee
Hi,
I would like to setup dynamic teams based on players location. The creation / joining / leaving and destruction of teams would not be handled by the players but by cloud code.
How can I access the team functionalities from an event?
I know I can get the existing teams:
https://docs.gamesparks.net/documentation/cloud-code-api/spark-cloud-code-api/sparkteams
But for "write" operations I'm seeing only request. Is there anyway to access those from cloud code?
Once you have the team created, you can get that team using its id....
var team = Spark.getTeams().getTeam("team id");
From there you have access to all the features that SparkTeam object can do [docs here].
You can also create, join, leave or drop teams through the cloud code too [docs here].
Hope that helps,
-Sean
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstCustomer Support
Once you have the team created, you can get that team using its id....
var team = Spark.getTeams().getTeam("team id");
From there you have access to all the features that SparkTeam object can do [docs here].
You can also create, join, leave or drop teams through the cloud code too [docs here].
Hope that helps,
-Sean
Stephane Lallee
Great ! I did not find those documentation pages before, that is exactly what I was looking for ! Thanks a lot :-)
-
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