Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Autonauts

Make and teach robots to automate the world! · By Denki

Until Storage Empty / If statement

A topic by Knatte_Anka created Jul 13, 2018 Views: 1,405 Replies: 2
Viewing posts 1 to 3

I have problem with storage management when i wanted low volume of production of tools. 
the repeat command that exists is:

* Until Storage Full                      equal to  working until 95% full (if many places to get tools the tool count increses above 10 created fast)

* until Storage not full               equal to working  from 95% full

but if i want to to start work when storage is empty meaning a bot have taken the last shovel i cant check that easy.

a work around it is to call if  the box is empty by the worker bot and then create some but that require that i have dual usages of command.(shown in pictures below)

two ways i see that this problem can be fixed:

1: add a until storage Empty ( best fix but only for some cases not all)(0pcs)

2: add if command  that is run once if valid same selection as repeat

That last part i think can be very good to have that a part of a command is run once if for example storage is full.
Current setup:


if Example:


if i do need a else if statement i can use 2 if just select a other thing to check against 

looks like you're just making a tool stocker but in the most complex way you can, right?
well what I do is just make the bots using the tools just craft their own and go to town
it should look like this

also keep in mind that a blank repeat will just make the bot stuck until it's condition is met to I guess make an if statement, if that helps

I also asked Denki many months ago to add a "Repeat until ? Storage Empty" option and a "Repeat until ? Storage Not Empty" option.  I was told that it would be added to the new version of Autonauts.  Since then I have come up with another way to check for Empty by stowing and cycling the object and using the "failure" down arrow to test it, as shown below.  If there is any butter in the storage, the inner loop will continue to run and the bot will shout "ButterNotEmpty".  If there is no butter in the storage, the inner loop fails and the bot will shout "ButterEmpty" and then wait 10 seconds before it repeats the outer loop.