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
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!
Posted on December 10, 2010, in Game Development / XNA and tagged Console, Game Engines, Script, XNA. Bookmark the permalink. 2 Comments.
Hey. I’m the author of Jemgine (jemgine.codeplex.com), an XNA sidescrolling platformer engine. I’m thinking I might be interested in using your Neat thing as a front end for it, but I wanted to ask you a few questions first. You should be able to see my e-mail since this is your blog; could you drop me a line?
Alright!