Autonauts Wiki
Explore
Main Page
All Pages
Interactive Maps
Autonauts Wiki
About the game
Content
Bots
Food
Parts
Structures
Tools
Wildlife
Gameplay
Research
Academy
Programming
Guides
Controls
Speed
Structure Requirements
Games
Prototype
Autonauts
Autonauts (Console Edition)
Autonauts vs Piratebots
Community
Help
Community Portal
Admin noticeboard
FANDOM
Fan Central
BETA
Games
Anime
Movies
TV
Video
Wikis
Explore Wikis
Community Central
Start a Wiki
Don't have an account?
Register
Sign In
Sign In
Register
Autonauts Wiki
Official wiki
549
pages
Explore
Main Page
All Pages
Interactive Maps
Autonauts Wiki
About the game
Content
Bots
Food
Parts
Structures
Tools
Wildlife
Gameplay
Research
Academy
Programming
Guides
Controls
Speed
Structure Requirements
Games
Prototype
Autonauts
Autonauts (Console Edition)
Autonauts vs Piratebots
Community
Help
Community Portal
Admin noticeboard
Editing
Programming
(section)
Back to page
Edit
VisualEditor
History
Talk (2)
Edit Page
Programming
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Repeat code blocks == Repeat code blocks help save memory and streamline bot programming. A bot program only enters a repeat block if the "until [...]" condition is not fulfilled. The condition will be evaluated again at the end of the repeat block, and if it is still not fulfilled the program will begin the repeat block again. Clicking the box to the right of the repeat block's condition indicates to exit the repeat block if an action within the repeat block cannot be performed (such as being told to pick up an item, but no items are available). Otherwise, the bot will pause at a blocked action until the action can be performed. {| class="wikitable" |+ !Command !Description |- |{{loop|type=hands|opaque=1}} |Repeats the enclosed code blocks until the bot's hands are full |- |{{loop|type=hands|not=|opaque=1}} |Repeats the enclosed code blocks until the bot's hands are '''not''' full |- |{{loop|type=hands|empty=|opaque=1}} |Repeats the enclosed code blocks until the bot's hands are empty |- |{{loop|type=hands|not=|empty=|opaque=1}} |Repeats the enclosed code blocks until the bot's hands are '''not''' empty |- |{{loop|type=backpack|opaque=1}} |Repeats the enclosed code blocks until the bot's backpack is full |- |{{loop|type=backpack|not=|opaque=1}} |Repeats the enclosed code blocks until the bot's backpack is '''not''' full |- |{{loop|type=backpack|empty=|opaque=1}} |Repeats the enclosed code blocks until the bot's backpack is empty |- |{{loop|type=backpack|not=|empty=|opaque=1}} |Repeats the enclosed code blocks until the bot's backpack is '''not''' empty |- |{{loop|type=?|opaque=1}} |Repeats the enclosed code blocks until the specified structure is at least 95% full (click the question mark to choose structure). Crafting stations are considered full if the queued item is on the output tile. |- |{{loop|type=?|not=|opaque=1}} |Repeats the enclosed code blocks until the specified structure is less than 95% full (click the question mark to choose structure). Crafting stations are considered full if the queued item is on the output tile. |- |{{loop|type=?|empty=|opaque=1}} |Repeats the enclosed code blocks until the specified structure is empty (click the question mark to choose structure). Crafting stations are considered empty if the queued item is not on the output tile. |- |{{loop|type=?|not=|empty=|opaque=1}} |Repeats the enclosed code blocks until the specified structure is '''not''' empty (click the question mark to choose structure). Crafting stations are considered empty if the queued item is not on the output tile. |- |{{loop|type=held object|opaque=1}} |Repeats the enclosed code blocks until the item (such as a Bucket) held by the bot is full |- |{{loop|type=held object|not=|opaque=1}} |Repeats the enclosed code blocks until the item (such as a Bucket) held by the bot is '''not''' full |- |{{loop|type=held object|empty=|opaque=1}} |Repeats the enclosed code blocks until the item (such as a Bucket) held by the bot is empty |- |{{loop|type=held object|not=|empty=|opaque=1}} |Repeats the enclosed code blocks until the item (such as a Bucket) held by the bot is '''not''' empty |- |{{loop|type=times|opaque=1}} |Repeats the enclosed code blocks a specified number of times (click the square with "1" to edit the number of times |- ||{{loop|opaque=1}} |Repeats the enclosed code blocks forever |- ||{{loop|type=hear|opaque=1}} |Repeats the enclosed code blocks until the bot hears a shout (specify which shout in the white text box to the right) |- |{{Command|type=exit|opaque=1}} |Breaks out of the current repeat loop (to insert this command, use the Extra Instructions tab) |}
Summary:
Please note that all contributions to the Autonauts Wiki are considered to be released under the CC BY-NC-SA
Cancel
Editing help
(opens in new window)
Follow on IG
TikTok
Join Fan Lab