SpawnForced

From ZDoom Wiki
Jump to: navigation, search

int SpawnForced (str classname, fixed x, fixed y, fixed z [, int tid [, int angle]])

Usage

This is an alternative to Spawn which takes the same parameters. It forces the actor to spawn, even in conditions where the spawning would normally fail (for example, not enough room to place the actor). As such, it should be used carefully.

The coordinates are specified in fixed point (the same format that is used by GetActorX/Y/Z and SetActorPosition). For details, read the article on fixed point.

To get a list of the things you can spawn in the game, visit the Classes page.

The return value is the number of things spawned.

Examples

See Spawn for examples. SpawnForced uses the same arguments in the same way.

ACS spawn functions
Spawn SpawnForced
SpawnSpot SpawnSpotForced
SpawnSpotFacing SpawnSpotFacingForced
SpawnProjectile