Skip to content

Frequently used

The handful of names almost every event is made of. Learn these and you can build most things - each one links to its full entry.

The skeleton of an event

format 2.0

event { name = "My Event" }

function onEvent(p)       -- the chart reaches the event
    flash()
end
Name
onEvent(p) the chart reaches this event - p.value1, p.value2, your parameters
onBeat(b) every beat
onFrame(dt) every frame - for things that move all the time
onHit(note) / onMiss(note) you hit / missed a note
onStart() before the countdown - set things up, preload pictures

Time

Name
beats(n), steps(n), seconds(n) durations, at the song's tempo
time, beat, step where the song is right now
after(duration, function() ... end) later
every(duration, function() ... end) again and again

Making things move

Name
tween(prop, to, duration[, ease]) animate any number or colour - with an easing curve
reset(what[, duration[, ease]]) put it back
sin(x), lerp(a, b, t), clamp for values worked out every frame

One-line effects

Shortcut
flash([colour]) a flash
zoom(z[, duration]) zoom in, and stay
shake(strength) a short shake
flipScroll() downscroll ↔ upscroll
hideHud() / showHud() the HUD out / in
focus(who) the fight camera leans toward someone
pose(who, name) a fighter strikes a pose

Properties

Property
camera.zoom, camera.bump the zoom, the beat pop
hud.angle, hud.alpha the HUD turned, faded
strum[lane].x, strum[lane].alpha one lane moved, faded
strums.x, strums.alpha the whole strumline
flash.alpha, screen.alpha colours over the picture
text[n].value a text on the screen
image[n].file a picture on the screen
player.squash, player.pose your fighter
fx.grayscale, fx.chromatic built-in effects

Reading the game

Name
player.health, player.combo your run
song.singer who sings right now
song.mode practice, fight, replay or watching