Bubbolscript Documentation

Loops

1. Repeat

Repeat lets scripts do certain actions multiple times before moving onto the next one

You can make a script repeat an action multple times by using

"repeat [amount of times]

[action you want the script to do]

end"

Here is an example of a script repeating an action multiple times

repeat 5

print hello!

end

Output:

hello!

hello!

hello!

hello!

hello!

2. Forever

Forever lets scripts do something forever. Everything below a forever loop cannot be reached until the loop is stopped.

You can make a script loop an action forever by using

"forever

[action you want the script to do, for example: print hi]

end"

Here is an example of a script repeating an action forever

forever

print infinite loop!

end

Output:

infinite loop!

infinite loop!

infinite loop!

infinite loop!

infinite loop!

(and so on...)