Skip to content

text[n], title

Eight texts you can put anywhere on the screen: a word on the drop, lyrics, a counter, a title card. Positions are shares of the screen, so they sit in the same spot in every window size.

How to use it

text[0] to text[7] - set value and it shows, "" hides it. Positions are shares of the screen, so a text sits in the same place in every window size. text[7] is where the built-in Lyrics event writes; the others are free.

Texts and pictures share the layers: layer says on which, order sorts within it.

Psych: makeLuaText, setTextString, setTextColor, setTextFont, setTextBorder · Kade: —

Example code

-- "GO!" pops in on the drop and fades.
function onEvent(p)
    text[2].value = "GO!"
    text[2].y = 0.35
    text[2].size = 3
    text[2].color = #FFD040
    text[2].outline = #000000
    text[2].alpha = 1
    tween(text[2].size, 2, beats(0.5), "backOut")
    after(beats(1), function() tween(text[2].alpha, 0, beats(1)) end)
end

Properties

Property Kind Default
title.text text "" The big line in the middle of the screen - Minecraft's /title look, over everything (up …
title.subtitle text "" The smaller line under it.
title.color colour #FFFFFF The colour of both lines.
title.alpha number 0 Their opacity: 0 = gone. showTitle fades it in (a quarter second), holds it and fades …
text[n].value text "" What it says (up to 1,000 characters). "" = hidden. Numbers are turned into text: …
text[n].x number 0.5 Where its anchor sits from left to right: 0 = the left edge, 1 = the right edge.
text[n].y number 0.5 Where its anchor sits from top to bottom: 0 = the top, 1 = the bottom.
text[n].size number 1 Its size: 1 = twice the GUI font.
text[n].color colour #FFFFFF Its colour.
text[n].alpha number 1 Its opacity.
text[n].angle number 0 Turned clockwise around its anchor, in degrees.
text[n].align choice "center" Which side of the text the anchor is on: "center", "left" (the text runs to the right …
text[n].layer choice "front" Which layer it's drawn on.
text[n].order number 0 Its place within the layer: higher = on top. Texts and pictures sort together.
text[n].font choice "default" Minecraft's fonts: "default", "uniform" (smooth), "alt" (the enchanting table's …
text[n].outline colour none A border around the letters in this colour, in place of the shadow: `text[0].outline = …
text[n].wrap number 0 Breaks the text into lines at this share of the screen width. 0 = one line.

title.text

text title.text = ""

The big line in the middle of the screen - Minecraft's /title look, over everything (up to 1,000 characters). A long one is made smaller to fit. showTitle sets it and fades it in and out for you.

title.subtitle

text title.subtitle = ""

The smaller line under it.

title.color

colour title.color = #FFFFFF

The colour of both lines.

title.alpha

number title.alpha = 0

0 – 1share of the screen

Their opacity: 0 = gone. showTitle fades it in (a quarter second), holds it and fades it out (half a second); set it yourself to show a title as long as you like.

text[n].value

text text[n].value = ""

What it says (up to 1,000 characters). "" = hidden. Numbers are turned into text: text[4].value = player.combo.

text[n].x

number text[n].x = 0.5

kept at the song's end

Where its anchor sits from left to right: 0 = the left edge, 1 = the right edge.

text[n].y

number text[n].y = 0.5

kept at the song's end

Where its anchor sits from top to bottom: 0 = the top, 1 = the bottom.

text[n].size

number text[n].size = 1

kept at the song's end

Its size: 1 = twice the GUI font.

text[n].color

colour text[n].color = #FFFFFF

kept at the song's end

Its colour.

text[n].alpha

number text[n].alpha = 1

0 – 1share of the screenkept at the song's end

Its opacity.

text[n].angle

number text[n].angle = 0

degreeskept at the song's end

Turned clockwise around its anchor, in degrees.

text[n].align

choice text[n].align = "center"

kept at the song's end

Which side of the text the anchor is on: "center", "left" (the text runs to the right of x) or "right".

One of: "center", "left", "right".

text[n].layer

choice text[n].layer = "front"

kept at the song's end

Which layer it's drawn on.

One of: "front", "back", "lanes", "top" (what they do).

text[n].order

number text[n].order = 0

kept at the song's end

Its place within the layer: higher = on top. Texts and pictures sort together.

text[n].font

choice text[n].font = "default"

kept at the song's end

Minecraft's fonts: "default", "uniform" (smooth), "alt" (the enchanting table's runes), "illager".

One of: "default", "uniform", "alt", "illager" (what they do).

text[n].outline

colour text[n].outline = none

kept at the song's end

A border around the letters in this colour, in place of the shadow: text[0].outline = #000000. none (the default) = the usual shadow.

text[n].wrap

number text[n].wrap = 0

0 – 1share of the screenkept at the song's end

Breaks the text into lines at this share of the screen width. 0 = one line.