strum[lane]¶
One of your four lanes: its receptor, its notes and its holds. This is where modcharts happen - move a lane, spin it, fade it, change where its notes come from.
Written in .modchart files
These properties move the lanes and notes, so only a .modchart file may set them (any file may read them; strums.input, the keys on / off, may be set anywhere). A .event that sets one doesn't load. The No Mod modifier leaves .modchart files out. Two kinds of file.
How to use it
strum[0] = left, strum[1] = down, strum[2] = up, strum[3] = right - also in loops: for i = 0, 3 do
strum[i].alpha = 0.5 end. Everything adds to the whole strumline's values (strums).
Two offsets: x / y and wobbleX / wobbleY add up. Let one effect own x (a sway, a slide) and another
wobble (a jiggle on the beat) and they don't fight - setting a property stops a tween on it.
Shortcuts: hideLane / showLane, flipScroll, resetLanes. Recipes: Modcharts.
Psych: setPropertyFromGroup('playerStrums', i, 'x', ...), noteTweenX · Kade: receptor, setActorX
Example code¶
-- Every lane sways on its own, a beat apart.
function onFrame(dt)
for i = 0, 3 do
strum[i].x = 20 * sin(time / 300 + i)
end
end
Properties¶
| Property | Kind | Default | |
|---|---|---|---|
| strum[lane].x | number | 0 |
The lane moved to the right, in pixels. |
| strum[lane].y | number | 0 |
The lane moved down, in pixels. |
| strum[lane].wobbleX | number | 0 |
A second offset to the right, added on top of x - for a second effect on the same lane. |
| strum[lane].wobbleY | number | 0 |
A second offset down, added on top of y. |
| strum[lane].alpha | number | 1 |
The lane's opacity: receptor, notes, holds. |
| strum[lane].noteAlpha | number | 1 |
Only the lane's notes and holds - the receptor stays (for hide-near / hide-far modcharts). |
| strum[lane].color | colour | #FFFFFF |
Multiplied onto the lane's receptor, notes and holds (#FFFFFF = their own colours). |
| strum[lane].angle | number | 0 |
The lane's rotation in degrees, clockwise: receptor and note heads. |
| strum[lane].scale | number | 1 |
The lane's size: receptor, notes, hold width. |
| strum[lane].scroll | choice | "auto" |
The lane's own direction: "auto" (follows strums.scroll), … |
| strum[lane].isDown | switch, read | false |
Whether the lane scrolls down right now. |
| strum[lane].pressed | switch, read | false |
Whether the player holds the lane's key right now. |
| strum[lane].homeX | number, read | 0 |
Where the lane's receptor rests on the screen, in pixels from the left - before x, … |
| strum[lane].homeY | number, read | 0 |
Where the lane's receptor rests on the screen, in pixels from the top (it changes with … |
| strum[lane].direction | number | 0 |
The lane's way in, turned clockwise around the receptor, in degrees: 90 = in from the … |
| strum[lane].speed | number | 1 |
The lane's own scroll speed on top of the song's: 2 = its notes come twice as fast, 0.5 = … |
| strum[lane].noteAngle | number | 0 |
The lane's notes turned, in degrees, on top of angle - the receptor stays. |
strum[lane].x¶
number strum[lane].x = 0
The lane moved to the right, in pixels.
strum[lane].y¶
number strum[lane].y = 0
The lane moved down, in pixels.
strum[lane].wobbleX¶
number strum[lane].wobbleX = 0
A second offset to the right, added on top of x - for a second effect on the same lane.
strum[lane].wobbleY¶
number strum[lane].wobbleY = 0
A second offset down, added on top of y.
strum[lane].alpha¶
number strum[lane].alpha = 1
The lane's opacity: receptor, notes, holds.
strum[lane].noteAlpha¶
number strum[lane].noteAlpha = 1
Only the lane's notes and holds - the receptor stays (for hide-near / hide-far modcharts).
strum[lane].color¶
colour strum[lane].color = #FFFFFF
Multiplied onto the lane's receptor, notes and holds (#FFFFFF = their own colours).
strum[lane].angle¶
number strum[lane].angle = 0
The lane's rotation in degrees, clockwise: receptor and note heads.
strum[lane].scale¶
number strum[lane].scale = 1
The lane's size: receptor, notes, hold width.
strum[lane].scroll¶
choice strum[lane].scroll = "auto"
The lane's own direction: "auto" (follows strums.scroll), "up", "down".
One of: "auto", "up", "down" (what they do).
strum[lane].isDown¶
switch strum[lane].isDown = false
Whether the lane scrolls down right now.
strum[lane].pressed¶
switch strum[lane].pressed = false
Whether the player holds the lane's key right now.
strum[lane].homeX¶
number strum[lane].homeX = 0
Where the lane's receptor rests on the screen, in pixels from the left - before x, wobbleX and the
strumline's own offsets. Kade's receptor.defaultX.
strum[lane].homeY¶
number strum[lane].homeY = 0
Where the lane's receptor rests on the screen, in pixels from the top (it changes with the scroll direction).
Kade's receptor.defaultY.
strum[lane].direction¶
number strum[lane].direction = 0
The lane's way in, turned clockwise around the receptor, in degrees: 90 = in from the side, 180 = from the other
end. The notes stay upright.
Psych's direction 90 is our 0.
strum[lane].speed¶
number strum[lane].speed = 1
The lane's own scroll speed on top of the song's: 2 = its notes come twice as fast, 0.5 = half.
strum[lane].noteAngle¶
number strum[lane].noteAngle = 0
The lane's notes turned, in degrees, on top of angle - the receptor stays.