Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!

spawn (function)

From Quake Wiki

entity spawn()

Usage[edit]

Creates a new default entity. Note that if you're spawning an entity that relies on precached sounds and models, one entity of that type must be spawned at map load or their sounds and models precached elsewhere (the server itself, another entity type, etc.).

Return[edit]

The newly created entity.

Example[edit]

// Creates an Ogre
entity ogre = spawn();
ogre.classname = "monster_ogre";

entity curSelf = self;
self = ogre;
monster_ogre();
self = curSelf;