Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Several people in the past have agreed that adding Conditionals to the scripting language would certainly help.  The developers have been working for over a year on the next version of Autonauts. They have said recently "Unfortunately, if we release it too early, we'll just get loads of complaints about things that don't work or can't understand. We're going to release when we think it will be ready and make everyone happy rather than angry/confused."

While we are waiting, you can use the "Repeat until hear..." commands in the scripting language to act as Conditionals and you can use Steam Bots to overcome the problem of Worker Bots needing to wait a long time for recharging.

Below is shown one example of how to build bots that use the "Repeat until hear..." commands.  One bot named "GoFish" (wearing a Party Hat) will wait until the Salmon Storage is not full and then will Shout "GoFish".  Another bot named "StopFish" (wearing a Guy Fawkes Hat) will wait until the Salmon Storage is full and then will Shout "StopFish".   A set of 7 bots with names like "Fish1" will wit until they hear "GoFish" and then will repeat until they hear "StopFish" the commands to "Find nearest Deep Sea Water" and "Use held item" (which is the Fishing Rod).  These commands will control the bots so that they only catch fish when needed.

Below is shown an example of how you can set up a Steam Bot (wearing a Traffic Cone Hat) to charge Worker Bots and to also collect Logs into its inventory to keep itself charged.  After the Steam Bot has taken a Log from the Log Storage, if its inventory is full then the "Stow held item" command will fail and the Log will still be in its hands, and so it will add that Log back to the Log Storage.  If its inventory was not full, the "Stow" command will run and the "Add to Log Storage" command will be skipped because its hands are empty.  You can set the number of times that the "Repeat times …" command runs based on how much energy is used by the Steam Bot to find and move to recharge the Worker Bots.

(1 edit)

You can also do the following

Repeat [forever]
|   Repeat [until inventory full]
|   |   Move to Log Storage
|   |   Take from Log Storage
|   |   Stow held item
|   |__
|   Repeat [until inventory empty]
|   |   Find nearest unwound Workerbot
|   |   Move to Basic Workerbot
|   |   Recharge Workerbot
|   |__
|__

This way it will start by taking enough logs to work for a long time, and when it's got no Logs left in it's inventory, meaning it just used up the last log available, it will fill its inventory again.

Instead of using the first in the following code, you can choose the bot to take different amounts. If you don't want the bot to take out so many logs at once, set it to only take 3 for example. This way it has three logs in it's inventory and takes another three after they are all burned up 

(1)    Repeat [until inventory full]
(2)    Repeat [times] [3]