ActorIterator

From ZDoom Wiki
Jump to: navigation, search
Note: This feature is for ZScript only.


ActorIterator is a lighter-in-comparison iterator compared to its brothers, ThinkerIterator and BlockThingsIterator which is much less resource intensive. However, actors require a TID in order for this to qualify them as part of the iteration. As such, a tid of 0 will not work at all.

Functions

Return Type Function Arguments Use/Arguments
ActorIterator Create
  1. int tid,
  2. class<Actor> type = "Actor"

Initializes the iterator, searching for an actor of type and with the specific tid. TID must not be 0.

  • tid - The TID to search. Must not be 0 or it will not work.
  • type - Serves as a filter. Specifying a classname here will only search for this type of actor and descendants. Default is Actor.

Note: this function is static and should be called off the class name, i.e. ActorIterator.Create(...).

Actor Next None Cycles through the list of existing actors, filtered out by the Create() function.
void Reinit None Restarts the search.

See Also