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, which are not the same as grid units in your map editor. To convert a grid unit to a fixed point, you multiply the coordinate by 65536, or use fixed point literals.

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
Personal tools
Namespaces

Variants
Actions
Navigation
ACS
DECORATE
ZDoom mods
Toolbox