For: Difference between revisions
Jump to navigation
Jump to search
Documentation of the "for" CON keyword. |
No edit summary |
||
Line 1: | Line 1: | ||
'''for''' < | '''for''' <gamevar> <function> { [...] }<br> | ||
'''for''' < | '''for''' <gamevar> <function> <value> { [...] } | ||
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. | 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. | ||
== Functions == | |||
{| {{prettytable}} | |||
| '''allsprites''' || All actors/sprites in-game. | |||
|- | |||
| '''allsectors''' || All sectors in the map. | |||
|- | |||
| '''allwalls''' || All walls in the map. | |||
|- | |||
| '''activelights'''<br />'''lights''' || All active polymer lights. | |||
|- | |||
| '''drawnsprites''' || Only the sprites currently being drawn. | |||
|- | |||
| '''spritesofsector'''<sectnum><br /> '''sprofsec'''<sectnum> || All sprites in the given sector. | |||
|- | |||
| '''spritesofstatus''' <statnum><br />'''sprofstat''' <statnum> || All sprites with the given [[statnum]]. | |||
|- | |||
| '''wallsofsector''' <sectnum><br />'''walofsec''' <sectnum> || 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. | |||
|} | |||
[[Category:EDuke32 specific commands]] | [[Category:EDuke32 specific commands]] |
Revision as of 03:56, 25 February 2020
for <gamevar> <function> { [...] }
for <gamevar> <function> <value> { [...] }
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.
Functions
allsprites | All actors/sprites in-game. |
allsectors | All sectors in the map. |
allwalls | All walls in the map. |
activelights lights |
All active polymer lights. |
drawnsprites | Only the sprites currently being drawn. |
spritesofsector<sectnum> sprofsec<sectnum> |
All sprites in the given sector. |
spritesofstatus <statnum> sprofstat <statnum> |
All sprites with the given statnum. |
wallsofsector <sectnum> walofsec <sectnum> |
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. |