Your browser does not support JavaScript or its disabled!
Please turn it on, or be aware that some features on this website will not work correctly.
1K
Orb Counter #71
This counts orbs when you stand on them.
430b | 13 lines.
function matchPos(pos, pos2)
    return pos2.x == pos.x and pos2.y == pos.y and pos2.z == pos.z
end
local orbCount = 0
orbCounter = UI.Label("Orbs collected: ".. orbCount)
onRemoveThing(function(tile, thing)
    if thing:getId() == 31601 then
        if matchPos(pos(), thing:getPosition()) then
            orbCount = orbCount + 1
            orbCounter:setText("Orbs collected: ".. orbCount)
        end
    end
end)
- remove | + add

17 Nov 2021
Ads