mob[n]¶
Sixteen stage mobs: Minecraft's mobs (or a mod's) standing around the fight, only for the people in the song. They stand still until your script moves them - then they walk, look, jump, fall over, explode or vanish - nothing of them is real: no AI, no sounds of their own, nobody is hurt, the world doesn't change.
How to use it
mob[0] to mob[15]. Set type and where it stands; move it with mobWalk and play its
actions with mobAction.
Where it stands is counted from the middle between the two fighters, in blocks: x = to your right, z = toward
the opponent (negative = toward you), y = up. Every player's game puts them where its own fight camera shows them
well, so the mobs stand the same way around the fight for both fighters. At most 24 blocks out.
Fights only - both fighters and whoever watches the fight from inside see them; practice and replays have no world.
With stage.world "fighters" or "off" they're gone with the world. A player can switch them off in
Options › Song effects › "Minecraft effects".
Example code¶
-- A zombie comes for the opponent in the drop and gets blown up.
function onStart()
mob[0].type = "zombie"
mob[0].x = 6
mob[0].z = 4
end
function onSection(n)
if n == 8 then mobWalk(0, "opponent", beats(4)) end
if n == 9 then mobAction(0, "explode") end
end
Properties¶
| Property | Kind | Default | |
|---|---|---|---|
| mob[n].type | text | "" |
Which mob: "zombie", "minecraft:pig", "iron_golem", a mod's "mymod:goblin". "" … |
| mob[n].x | number | 0 |
Blocks to your right of the middle between the fighters (negative = to your left). |
| mob[n].y | number | 0 |
Blocks up from the ground the fighters stand on. |
| mob[n].z | number | 0 |
Blocks toward the opponent from the middle (negative = toward you). |
| mob[n].look | choice | "none" |
Where it looks: "none" (the default) = it stands still and turn decides; "camera" … |
| mob[n].turn | number | 0 |
With look = "none": its direction in degrees - 0 = facing you, 90 = facing to your … |
| mob[n].scale | number | 1 |
Its size: 1 = its own, 2 = twice as big (up to 4). |
| mob[n].visible | switch | true |
false = hidden (it stays where it is). |
| mob[n].baby | switch | false |
true = a baby of its kind, where the kind has babies (a zombie, a pig, a villager). |
mob[n].type¶
text mob[n].type = ""
Which mob: "zombie", "minecraft:pig", "iron_golem", a mod's "mymod:goblin". "" = none in this slot. A
name that isn't a mob is said once in the event log.
mob[n].x¶
number mob[n].x = 0
Blocks to your right of the middle between the fighters (negative = to your left).
mob[n].y¶
number mob[n].y = 0
Blocks up from the ground the fighters stand on.
mob[n].z¶
number mob[n].z = 0
Blocks toward the opponent from the middle (negative = toward you).
mob[n].look¶
choice mob[n].look = "none"
Where it looks: "none" (the default) = it stands still and turn decides; "camera" (at you, through the
screen), "player" or "opponent" = it keeps turning to follow them. While it walks it looks where it goes.
One of: "none", "camera", "player", "opponent".
mob[n].turn¶
number mob[n].turn = 0
With look = "none": its direction in degrees - 0 = facing you, 90 = facing to your right, 180 = facing the
opponent.
mob[n].scale¶
number mob[n].scale = 1
Its size: 1 = its own, 2 = twice as big (up to 4).
mob[n].visible¶
switch mob[n].visible = true
false = hidden (it stays where it is).
mob[n].baby¶
switch mob[n].baby = false
true = a baby of its kind, where the kind has babies (a zombie, a pig, a villager).