Spawn number

From ZDoom Wiki
Jump to: navigation, search

Spawn numbers, often referred to as SpawnID or type, are unique identifiers stored on a single byte of data and corresponding to a single actor class for use in script functions and action specials such as ThingCount, Thing_Projectile, Thing_Spawn and their derived functions. Acceptable values for an actor are included between 1 and 255: 0 is used for "nothing" and numbers above 255 can't be stored on a single byte.

Note that new actors need not be assigned a spawn number to spawn them from an ACS script. Nearly every spawn function that takes a SpawnID has an equivalent function that uses the actor's name directly instead. This allows for the creation and usage of more than 255 actors without the possibility of conflicting SpawnIDs.

Spawn numbers should not be confused with DoomEd numbers. An actor may have a SpawnID, or a DoomEd num, or both, or neither.

Each game ZDoom supports uses a separate set of spawn numbers. Each actor with a spawn number has a corresponding defined name in ZDefs.acs, which is indicated in the following lists.

Please select one of the following: