A_MakePod

From ZDoom Wiki
Jump to navigation Jump to search

A_MakePod [(string podtype)]

Spawns an actor of type podtype (by default, Pod) if there is enough room for it. There are, however, two important differences with other spawn functions such as A_SpawnItemEx or A_SpawnProjectile:

  • The children actors generated through A_MakePod will appear in their "Grow:" state. They must have a "Grow:" state in order for this codepointer to work correctly.
  • A master generating other actors with A_MakePod will keep track of its children and will not spawn more than sixteen of them. If the children call A_RemovePod, however, they are unlinked from their master and leave room for more children. Typically, this is used in the children's death state so that they can be replaced.

A_MakePod is restricted to actors inheriting from PodGenerator because this codepointer uses the calling actor's special1 field to keep track of the amount of children, and other restricted codepointers might use the same field for different purposes.