Spawning things - Doom Legacy Wiki

Spawning things

From Doom Legacy Wiki

Jump to: navigation, search
Editing Tutorials

To spawn a map object, use the spawn function. To use the friendly names for objects include things.h in your script.

Here is an example of spawning a new map object that you can alter later in the script.

include("things.h"); //so we can use the names for objects
mobj ourobject; //declare our object
script 1 { ourobject = spawn(IMP, 56, 78, 90); //this spawns an IMP at 56, 78 facing 90 degrees //and assigns it to the ourobject variable
spawn(IMP, 56, 78, 180, 128); //this spawns an IMP at 56, 78 facing 180 degrees //and at a height of 128
IMP.spawn(128, 256, 270, 512); //And here is a cooler-looking way of spawning a //thing. By using the . operator. X 128, Y 256, //facing angle 270 and Z 512. }
Personal tools