ActorIterator

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.

Note: This feature is for ZScript only.

Functions

Return TypeFunctionArgumentsUse/Arguments
ActorIteratorCreate (deprecated)
  1. int tid,
  2. class<Actor> type = "Actor"

(Note: as of GZDoom 4.0.0, this function has been deprecated in favor of CreateActorIterator.) 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(...).

ActorNextNoneCycles through the list of existing actors, filtered out by the Create() function.
voidReinitNoneRestarts the search.

See Also

This article is issued from Zdoom. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.