reskate.throwdowns reads the throwdown the local player is in, and hosts drops: a throwdown queue where the skater stands, for players of the session your plugin chooses. Every function, and the throwdown event, needs the throwdowns permission; calling one without it raises an error. See permissions.
reskate.throwdowns.state()
The throwdown the local player is in, if any.
table
Needs the
throwdowns permission.reskate.throwdowns.host(mode, players, options)
Hosts a drop where the local skater stands, shown only to the players you choose. They see it in their game and join it with the game’s own Join; it starts once all of them have joined. The drop spawns over the next moments: follow it with hosting().
string
required
"jam" (a jam session), "spot_battle" or "skate" (S.K.A.T.E.). The game’s own names, "JamSession", "SpotBattle" and "ThrowdownSkate", work too.table
required
A list of 1 to 7 other players of the session: ids (
"7656...") or player tables with an id, as reskate.session.players() gives them. A player listed twice counts once.table
boolean
True when the drop was asked for.
string
Why not:
"one drop every 5 s", "not in a session", "<plugin> is hosting a drop" (another plugin’s drop is being asked for, spawning or open) or "a drop is asked for already".max out of range raises an error.
Needs the
throwdowns permission. One drop every 5 seconds; a refused call counts too. Reading the session’s players needs session.read.reskate.throwdowns.hosting()
What became of this plugin’s drop.
string or nil
nil when the plugin has not hosted a drop, or another plugin has hosted one since. Otherwise one of:"asked": asked for; it spawns at the next moment it can."spawning": being spawned where the skater stood."open": the chosen players can see it and join it."started": everyone joined, and it runs."cancelled": the plugin cancelled it. It stays so until the plugin’s next drop.- Why it failed:
"the skater is not in the world","a throwdown or challenge is running","a chosen player is not in the session","the throwdown events are not found yet; try again in a moment","your game is out of linked throwdowns (its speed or mods)","a plugin's drop is spawning already","the drop could not be queued","the drop never spawned","the drop did not spawn"or"the drop could not be described to the other players".
Needs the
throwdowns permission.reskate.throwdowns.cancel()
Takes this plugin’s drop away, if it has not started yet. A drop that started runs on. Cancelling when the plugin has no drop does nothing. After a cancel, hosting() says "cancelled" (from the next tick) until the plugin hosts another drop.
Returns nothing.
Needs the
throwdowns permission. When the plugin stops, its drop is cancelled the same way.The throwdown event
Fired when a throwdown starts or ends for the local player, whoever hosted it.
string
"started" or "ended".throwdowns permission. See events.