Skip to content

Things to note

Zakru edited this page Sep 1, 2018 · 1 revision

Variables

Global variables can be emulated with the value objective, which is created in battleroyale:initialize. Some constants are also initialized, which should not be changed, ever. They are TRUE, FALSE and NONE, and their values are 1, 0 and 0 respectively. Constants are variables defined with a name of upper-case letters, underscores and numbers. There is no restriction for changing them, but they can be recognized from their names and should not be changed.

Variables can be used, for example, to do something when the game timer has a specific value:

# Define the point in time
scoreboard players set MY_TIME_POINT value 1000

# Execute something if the timer variable has the same value as MY_TIME_POINT
execute if score timer value = MY_TIME_POINT value run ### some command ###

Home page

Content creation guidelines:

Clone this wiki locally