Pick Integer is very fast. A while loop is still a bit faster (because it doesn't use as many function calls), but Pick Integer is already pretty damn fast.
while ((var <= ae && ai>=0) || (var>=ae && ai<=0)){}
So basically Continue while:
Start Value is smaller or equal to End Value AND Increment greater or equal to 0 OR
Start Value is greater than or equal to End Value AND Increment smaller or equal to 0
Sure, it adds comparisions, but integer comparisions are damn quick. Good performance and the script size will stay small.
@ChromiumBoy: Go
Pick Integer is very fast. A while loop is still a bit faster (because it doesn't use as many function calls), but Pick Integer is already pretty damn fast.
Can't do it simply like this?
while ((var <= ae && ai>=0) || (var>=ae && ai<=0)){}
So basically Continue while:
Start Value is smaller or equal to End Value AND Increment greater or equal to 0 OR
Start Value is greater than or equal to End Value AND Increment smaller or equal to 0
Sure, it adds comparisions, but integer comparisions are damn quick. Good performance and the script size will stay small.