A_SpawnDebris

From ZDoom Wiki
Jump to navigation Jump to search

A_SpawnDebris (string type [, bool translation [, float mult_h [, float mult_v]]])

Usage

Spawns debris actors based on the specified type and positions them around the calling actor. The debris type has to be defined in a certain way:

  • Its health parameter specify the amount n of objects being spawned.
  • The first n states are reserved as the initial states for the separate objects. If you want to do some animations you can jump to later states from here.

Parameters

  • type: The class name of the debris actor to spawn.
  • translation: If this is TRUE, the spawned actor will be assigned the same translation table as the actor that called the function. Default is FALSE.
  • mult_h: This is a multiplier for the x and y velocities of the spawned actor. Default is 1.0.
  • mult_v: This is a multiplier for the z velocity of the spawned actor. Default is 1.0.

Examples

This is an example of a valid debris class:

ACTOR SentinelDebris
{
  Health 15
  Radius 1
  Height 1
  States
  {
  Spawn:
    SNT1 A -1
    SNT2 A -1
    SNT3 A -1
    SNT3 A -1
    SNT4 A -1
    SNT4 A -1
    SNT5 A -1
    SNT6 A -1
    SNT7 A -1
    SNT7 A -1
    SNT8 A -1
    SNT8 A -1
    SNT9 A -1
    SNT9 A -1
    SNT0 A -1
  }
}