Enjay
ASK ME ABOUT FOOTBALL / STEAM / DEAD CELEBRITIES / THE BLAIR WITCH PROJECT

Posts: 5536
Registered: 12-00 |
Lazer said:
Now outdated? How do you spawn them now? I've been waiting for a simple script method, which im guessing is the now current way... but how?
I'll simply quote Randy from a post he made on the Zdoom forum.
Randy Heit said:
int spawn(str actorType, fixed x, fixed y, fixed z, opt int tid, opt int angle);
Spawns an actor at a specific location on the map. For a list of things you can spawn, type
dumpclasses actorfrom the console inside the game. (Note that it is essentially
pointless to spawn some things, such as projectiles.) The thing will be spawned at location
(x, y, z) on the map. The coordinates are fixed point numbers, so be
sure not to forget the decimal point. Also note that z specifies the exact z-coordinate
of the new actor, and is not relative to the floor or ceiling of the sector it is spawned in.
The last two arguments to this function are optional. Tid is the thing id to give this
actor when it is spawned. If you do not specify tid, it will be given an id of 0.
Angle is the byte angle the thing will be facing. If you do not specify this, the thing
will be facing east (0).
This function returns a reference to the spawned actor. Because there is currently nothing you
can do with the reference, you should just ignore it.
Examples:
Spawn ("Barrel", 10.0, 16.0, 0.0); // Spawns a barrel
Spawn ("ZombieMan", 128.0, 200.0, 16.0, 1); // Spawns a zombie man with tid 1
Spawn ("Imp", 0.0, 0.0, 0.0,, 64); // Spawns an imp facing north
Spawn ("Shotgun", 0.0, 0.0, 0.0, 12, 64); // Spawns a shotgun with tid 12 facing north
int spawnspot(str actorType, int spottid, opt int tid, opt int angle);
This function functions identically to spawn, except it uses a map spot to specify the location of the new actor. Spottid is the map spot's thing id.
Examples:
Spawn ("HealthBonus", 13); // Spawn a health bonus at map spot 13
Note, these commands are not working in 1.23 b33, but have been fixed for Zdoom 2.
__________________
Meek
|