Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Autonauts

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

Bot loop issue.

A topic by Demongornot created Sep 10, 2017 Views: 614 Replies: 2
Viewing posts 1 to 3
(+1)

There is an issue with loop when putting a loop for a set amount of occurrence inside another.

If I set a loop like this :

Then the game proceed to repeat the main one more than 2 times , even if the main repeat is set to only 1, the game will try to repeat it for infinity, before this loop there is instructions to take a plank and put it inside the saw which he ignore.

Nesting "Repeat X times" won't work properly, since they actually only have a single variable for the number of times a loop has repeated. So unfortunately this cannot be done at present.

It will either need to be changed to allow multiple "X times" nesting, or changed to prevent you from nesting them in the first place.

(+1)

In programming having a loop inside a loop can be really common, this is how some variant of quicksort work, this should not be prevented, only fixed...

Maybe storing said variable in an array rather than a variable for a quick temp fix ?