1. Home
  2. Docs
  3. Getting Started
  4. Printing

Printing

To print text on the screen, type the printing channel name followed by .print command for example:


score.print "score: 0000"

In this example we stream to the “score” printing channel the text “score: 0000”
The printing channel name is a randomly selected word which we can use again to update our score text for example the following code:


score.print "hello"
wait 2 seconds
score.print "world"
wait 2 seconds

Will print the text “hello” then wait 2 seconds and then replace “hello” with “world”
The printing channel can have a position, size and color attributes for example:


system.print "Hello World" , color=red, pos=(50,150,0), size=3

To print a multi line text, use the keyword newline between lines for example:


system.print "Hello"+newline+"World"

To append text to a printing channel use the append attribute for example:


system.print "Hello "
system.print "World", append

In this sample the “World” text will be appended to the “Hello ” text instead of replacing it be default.

You can also print variables content for example:


var text="Hello World"
header.print text

You can also print expressions for example:


sys.print 10+20*5

Will print: 110.0
While:


sys.print "Test: " +10+20*5

Will print: Test: 10.0100.0
And:


var num=10+20*5
sys.print "Test: "+num

Will print: Test: 110.0

Was this article helpful to you? Yes No

How can we help?