Loops in Neat Script
I recently implemented a bunch of new features in Neat Script and Console. Among these features are expression evaluation and conditions. These features make it possible to create loops in Neat Script files. here’s an example of a loop in Neat Script:
echo off
echo Testing loop
dv l 1
:loop
echo (l)*(l)=((l)*(l))
inc l
if ((l)<=10) goto loop
echo Done!
echo on
end
neatloop
So basically this is how you can create loops in Neat Script:
Create a batch file using Notepad or any other text editor
Define labels with a colon before their name (i.e. :label), these will be your loop’s start point
Use goto command to jump to a label
Run your script using call command.
You can control your loops by creating console variables (dvars) and using conditions (if and on commands).
Go ahead and download Neat Game Engine now!