clip record records a few seconds of your skater, clip play plays it back on the skater’s body, and clip kickflip makes the game’s own kickflip play it. It needs the skater.animation and console permissions. Every function is on the animation page.
How clips work
A clip is a run of poses for the skater’s body: the hips and every joint below them, frame by frame. A clip comes from one of two places:- A recording the plugin made with
reskate.animation.record, named"rec:1","rec:2"and so on. - A clip file in the plugin’s package: an Animation Studio clip file (FAS1 to FAS3), named by its path, such as
"clips/wave.fas".
1. The package
2. Record
reskate.animation.record(seconds) starts recording the skater for 0.2 to 10 seconds. It returns true, or false and why: another plugin or a recording already going on, or no room left for the plugin’s clips. A length outside 0.2 to 10 raises an error.
The recording is not ready at once. reskate.animation.recorded() returns nil until it is done, then hands it over once as a clip’s name ("rec:1"). Ask for it on a timer:
reskate.animation.forget(name) lets a clip go, and the memory it held with it. A clip still playing plays on.
A plugin’s clips hold at most 48 MB of poses (40 bytes a joint a frame). A recording needs room for 10 s of poses when it starts, so forget the clips you are done with. Recordings live in the plugin’s memory only: they are gone when it reloads or stops.
3. Play it back
reskate.animation.play(clip, options) plays a clip on the skater’s body from now, in place. It returns ok, why.
reskate.animation.stop() stops the plugin’s clip, and reskate.animation.playing() says whether one of its clips is playing now.
A clip file plays the same way, by its path:
pcall when the file might be wrong.
play is refused while a throwdown runs, and while another plugin’s clip plays: one plugin plays at a time. A plugin asks at most 4 times a second, a budget play shares with the plugin’s other skater controls.
4. Replace a trick
reskate.animation.replace(trick, clip, options) makes one of the game’s tricks play as a clip. The trick is the game’s own name for it, such as "kickflip" or "ollie". When the skater does that trick, the clip plays from its takeoff, its air (from its takeoff to its landing) stretched to the trick’s. It returns ok, why.
Pass
nil as the clip to give the trick back to the game.
clip record, then do one), so the clip has a takeoff and a landing to line up with.
A plugin replaces at most 32 tricks. A trick (with its pop) another plugin replaces already is refused. A trick’s name is at most 48 characters of letters, digits,
_, - and spaces, and any case.reskate.animation.trick() returns the trick the skater is doing now, or nil:
The limits
- Clips are not written while a throwdown or a game of S.K.A.T.E. runs.
playsays so; a replacement just does not play. - One plugin records at a time, and one plays at a time.
- When the plugin stops or unloads, its clip stops, its replacements are taken away, and its recordings are gone.