SpawnSpot

From ZDoom Wiki
Jump to: navigation, search

int SpawnSpot (str classname, int spottid [, int tid [, int angle]])

Usage

SpawnSpot requires a MapSpot at the location where you want the Actor to spawn. To spawn something at an exact coordinate, use Spawn.

Note that this function does not make teleport fog appear when the actor spawns. Since the teleport effect is simply another actor, you can manually do this by spawning a TeleportFog actor at the same time.

  • classname: the actor to spawn. To get a list of the things you can spawn in the game, visit the Classes pages.
  • spottid: the thing id of the MapSpot
  • tid: the thing id to give the spawned thing
  • angle: byte angle.

The return value is the number of things spawned.

Examples

This will spawn an imp from Doom at the mapspot with TID of 64:

SpawnSpot ("DoomImp", 64);

This will spawn a shotgun at the same mapspot with teleport fog and give it a TID of 200:

SpawnSpot ("Shotgun", 64, 200);
SpawnSpot ("TeleportFog", 64);

See also

ACS spawn functions
Spawn SpawnForced
SpawnSpot SpawnSpotForced
SpawnSpotFacing SpawnSpotFacingForced
SpawnProjectile