-- Waves and soundDone: a track of spawns by time -- three rocks from two spots in turn, then -- two at a point -- and a bell that says when its clip has ended. return { title = "Author test: waves", players = 1, layers = { { kind = "world2d" }, { kind = "overlay" } }, vars = { made = 0, rung = 0 }, types = { rock = { look = { kind = "box", w = 20, h = 20, r = 200, g = 120, b = 60 } }, spot = { look = { kind = "none" } }, bell = { look = { kind = "none" }, behaviours = { { kind = "sound", spawn = "testScripts/crackle.wav", volume = 40 } } } }, rooms = { { name = "field", entities = { { type = "spot", id = "left", x = 60, y = 240 }, { type = "spot", id = "right", x = 660, y = 240 }, { type = "bell", id = "bell", x = 0, y = 0 } }, tracks = { { name = "waves", key = "time", spawns = { { at = 0.5, type = "rock", count = 3, every = 0.2, from = "left, right" }, { at = 1.5, type = "rock", count = 2, x = 360, y = 100 } } } } } }, rules = { { note = "Count the rocks as they come", on = "spawn", type = "rock", act = { { "addVar", name = "made", amount = 1 } } }, { note = "The bell's clip ended", on = "soundDone", type = "bell", act = { { "addVar", name = "rung", amount = 1 } } } } }