For
for <gamevar> <iterator> { code to execute }
for <gamevar> <iterator> <num> { code to execute }
Executes the code in the curly braces for every instance of the iterator specified, and <gamevar> stores the sprite/sector/wall/etc found in the current iteration. For example, setting <iterator> to allsprites will execute the code for every sprite in-game, and the var specified in <gamevar> will be set to the sprite number of the current sprite it's on.
Iterator types:
- allsprites - All actors/sprites in-game.
- allsectors - All sectors in the map.
- allwalls - All walls in the map.
- activelights - All active polymer lights.
- drawnsprites - Only the sprites currently being drawn.
- spritesofsector <sector num> - All sprites in the given sector.
- spritesofstatus <statnum> - All sprites with the given statnum.
- wallsofsector <sector num> - The walls of the given sector.
- loopofwall <wall num> - All walls in the same loop of the given wall.
- range <num> - A range from 0 to the number specified.