Headspritesect

From EDukeWiki
Revision as of 11:31, 7 September 2008 by Hunter byte (talk | contribs) (New page: '''headspritesect <spriteID> <sectID>''' Returns the ID of first sprite in the sector. The purpose of this command to scan through all sprites in the specified sector. The [[nextspritesta...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

headspritesect <spriteID> <sectID>

Returns the ID of first sprite in the sector. The purpose of this command to scan through all sprites in the specified sector. The nextspritestat and prevspritestat should be used to go forward and back through the list of actors.

Example:

headspritestat i 1 // look for all sprites with the stat of 0
whilevarn i -1
{
	// use i as the sprite ID
	addlogvar i
	nextspritestat i i
}