Denovo

Control

Decide which blocks run, how often, and when.

if [true/false]

if true ▾

Runs the blocks inside only when the condition is true. When it is false they are skipped and the script carries on below.

SlotTakesWhat it is for
1true/falseSomething that is true or false, such as a comparison.

Script: if condition { }

if [true/false] / else

if true ▾
else

Runs the first group of blocks when the condition is true, and the group under else when it is false.

SlotTakesWhat it is for
1true/falseSomething that is true or false, such as a comparison.

Script: if condition { } else { }

repeat [number] times

repeat 0 times

Runs the blocks inside a number of times, one pass after the other. Counts above 10,000 are treated as 10,000.

SlotTakesWhat it is for
1numberHow many times to run the blocks inside.

Script: repeat count { }

for each [variable] in [list]

for each 0 ▾ in List

Runs the blocks inside once for every item in a list, putting the current item in the variable first. Given a map, it goes through the map's keys. It works on a copy taken when the loop starts, so adding to or removing from the list inside the loop does not change which items it visits. Break out of loop stops it early.

SlotTakesWhat it is for
1variableThe variable that holds the current item on each pass.
2listThe list to go through, or a map to go through the keys of.

Script: for item in list { }

break out of loop

break out of loop

Leaves the loop it is in straight away and carries on with the blocks below that loop. Outside a loop it does nothing.

Script: break

wait [number] ticks

wait 0 ticks

Pauses this script, then carries on where it left off. 20 ticks are one second. The rest of the server keeps running meanwhile, and variables keep their values. It cannot be used inside a function whose result is used as a value.

SlotTakesWhat it is for
1numberHow long to wait, in ticks. 20 ticks are one second.

Script: wait ticks

debug log [any value]

debug log 0

Writes a line to the server log, tagged with the script it came from. Nothing is shown in game. Use it to check what a value holds while a script runs.

SlotTakesWhat it is for
1any valueWhat to write. Text, a number or any other value.

Script: log value

end the game

end the game

Ends the game the way the other Merged games do: the server is taken off the Event Servers list, everyone is sent back to the lobby, and the server stops 5 seconds later. Show your winner messages before it. On a dev fragment it only reports that the game would end, so the fragment keeps running.

Script: endGame()

return

return

Stops the function it is in straight away and goes back to whoever called it. Outside a function, it stops the whole script for this event.

Script: return

return [any value]

return 0

Stops the function it is in and hands a value back, which becomes the result of the call. Outside a function, it stops the whole script for this event and the value is thrown away.

SlotTakesWhat it is for
1any valueThe value the function call should give back.

Script: return value

On this page