Warning: reset() expects parameter 1 to be array, null given in /usr/local/etc/httpd/doomworld.com/vb/admin/functions.php on line 377

Warning: Variable passed to each() is not an array or object in /usr/local/etc/httpd/doomworld.com/vb/admin/functions.php on line 378

Warning: reset() expects parameter 1 to be array, null given in /usr/local/etc/httpd/doomworld.com/vb/admin/functions.php on line 377

Warning: Variable passed to each() is not an array or object in /usr/local/etc/httpd/doomworld.com/vb/admin/functions.php on line 378

Warning: reset() expects parameter 1 to be array, null given in /usr/local/etc/httpd/doomworld.com/vb/admin/functions.php on line 377

Warning: Variable passed to each() is not an array or object in /usr/local/etc/httpd/doomworld.com/vb/admin/functions.php on line 378

Warning: reset() expects parameter 1 to be array, null given in /usr/local/etc/httpd/doomworld.com/vb/admin/functions.php on line 377

Warning: Variable passed to each() is not an array or object in /usr/local/etc/httpd/doomworld.com/vb/admin/functions.php on line 378

Warning: reset() expects parameter 1 to be array, null given in /usr/local/etc/httpd/doomworld.com/vb/admin/functions.php on line 377

Warning: Variable passed to each() is not an array or object in /usr/local/etc/httpd/doomworld.com/vb/admin/functions.php on line 378

Warning: reset() expects parameter 1 to be array, null given in /usr/local/etc/httpd/doomworld.com/vb/admin/functions.php on line 377

Warning: Variable passed to each() is not an array or object in /usr/local/etc/httpd/doomworld.com/vb/admin/functions.php on line 378

Warning: reset() expects parameter 1 to be array, null given in /usr/local/etc/httpd/doomworld.com/vb/admin/functions.php on line 377

Warning: Variable passed to each() is not an array or object in /usr/local/etc/httpd/doomworld.com/vb/admin/functions.php on line 378

Warning: reset() expects parameter 1 to be array, null given in /usr/local/etc/httpd/doomworld.com/vb/admin/functions.php on line 377

Warning: Variable passed to each() is not an array or object in /usr/local/etc/httpd/doomworld.com/vb/admin/functions.php on line 378

Warning: reset() expects parameter 1 to be array, null given in /usr/local/etc/httpd/doomworld.com/vb/admin/functions.php on line 377

Warning: Variable passed to each() is not an array or object in /usr/local/etc/httpd/doomworld.com/vb/admin/functions.php on line 378

Warning: reset() expects parameter 1 to be array, null given in /usr/local/etc/httpd/doomworld.com/vb/admin/functions.php on line 377

Warning: Variable passed to each() is not an array or object in /usr/local/etc/httpd/doomworld.com/vb/admin/functions.php on line 378

Warning: reset() expects parameter 1 to be array, null given in /usr/local/etc/httpd/doomworld.com/vb/admin/functions.php on line 377

Warning: Variable passed to each() is not an array or object in /usr/local/etc/httpd/doomworld.com/vb/admin/functions.php on line 378

Warning: reset() expects parameter 1 to be array, null given in /usr/local/etc/httpd/doomworld.com/vb/admin/functions.php on line 377

Warning: Variable passed to each() is not an array or object in /usr/local/etc/httpd/doomworld.com/vb/admin/functions.php on line 378

Warning: reset() expects parameter 1 to be array, null given in /usr/local/etc/httpd/doomworld.com/vb/admin/functions.php on line 377

Warning: Variable passed to each() is not an array or object in /usr/local/etc/httpd/doomworld.com/vb/admin/functions.php on line 378
Spawning things using scripts - Doomworld Forums
Archvile
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > Spawning things using scripts
 
Author
All times are GMT. The time now is 20:24. Post New Thread    Post A Reply
DooMBoy
Heh
(but Stupidity still cannot be concealed)


Posts: 8509
Registered: 12-00


Can someone tell me exactly how to do it? Every time I try to do it, I always winding up spawning enemies that I didn't want spawned.

__________________
Heh

Old Post 08-21-02 03:12 #
DooMBoy is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Ichor
The Mysterious Red Square


Posts: 6934
Registered: 07-02


Use the command:

Thing_Spawn(#1, #2, #3);

#1 - The spot where you want the thing spawned
#2 - The type of thing, or TID, you want spawned
#3 - The direction it's facing when it's spawned (doesn't matter when it's an item, decoration, etc.)

Now, to get the monster you want, you need to find the right number to put into #2. I'm sure there's a list somewhere, or you could just experiment for a bit.

__________________
0.666 - The number of the Millibeast

Old Post 08-21-02 03:21 #
Ichor is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Ichor
The Mysterious Red Square


Posts: 6934
Registered: 07-02


Ok, I found a list of all the things (not just enemies) you can spawn.

0 T_NONE
1 T_SHOTGUY
2 T_CHAINGUY
3 T_BARON
4 T_ZOMBIE
5 T_IMP
6 T_ARACHNOTRON
7 T_SPIDERMASTERMIND
8 T_DEMON
9 T_SPECTRE
10 T_IMPFIREBALL
11 T_CLIP
12 T_SHELLS
19 T_CACODEMON
20 T_REVENANT
21 T_BRIDGE
22 T_ARMORBONUS
23 T_STIMPACK
24 T_MEDKIT
25 T_SOULSPHERE
27 T_SHOTGUN
28 T_CHAINGUN
29 T_ROCKETLAUNCHER
30 T_PLASMAGUN
31 T_BFG
32 T_CHAINSAW
33 T_SUPERSHOTGUN
51 T_PLASMABOLT
53 T_TRACER
68 T_GREENARMOR
69 T_BLUEARMOR
75 T_CELL
85 T_BLUEKEYCARD
86 T_REDKEYCARD
87 T_YELLOWKEYCARD
88 T_YELLOWSKULLKEY
89 T_REDSKULLKEY
90 T_BLUESKULLKEY
98 T_TEMPLARGEFLAME
100 T_STEALTHBARON
101 T_STEALTHKNIGHT
102 T_STEALTHZOMBIE
103 T_STEALTHSHOTGUY
110 T_LOSTSOUL
111 T_VILE
112 T_MANCUBUS
113 T_HELLKNIGHT
114 T_CYBERDEMON
115 T_PAINELEMENTAL
116 T_WOLFSS
117 T_STEALTHARACHNOTRON
118 T_STEALTHVILE
119 T_STEALTHCACODEMON
120 T_STEALTHCHAINGUY
121 T_STEALTHSERGEANT
122 T_STEALTHIMP
123 T_STEALTHMANCUBUS
124 T_STEALTHREVENANT
125 T_BARREL
126 T_MANCUBUSSHOT
127 T_ROCKET
128 T_BFGSHOT
129 T_ARACHNOTRONPLASMA
130 T_BLOOD
131 T_PUFF
132 T_MEGASPHERE
133 T_INVULNERABILITY
134 T_BERSERK
135 T_INVISIBILITY
136 T_IRONFEET
137 T_COMPUTERMAP
138 T_LIGHTAMP
139 T_AMMOBOX
140 T_ROCKETAMMO
141 T_ROCKETBOX
142 T_BATTERY
143 T_SHELLBOX
144 T_BACKPACK
145 T_GUTS
146 T_BLOODPOOL
147 T_BLOODPOOL1
148 T_BLOODPOOL2
149 T_FLAMINGBARREL
150 T_BRAINS

__________________
0.666 - The number of the Millibeast

Old Post 08-21-02 03:27 #
Ichor is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
DooMBoy
Heh
(but Stupidity still cannot be concealed)


Posts: 8509
Registered: 12-00


Whoa, that is quite some list! Thanks, man. :)

__________________
Heh

Old Post 08-21-02 03:31 #
DooMBoy is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
GooberMan
Scripting Nut


Posts: 1170
Registered: 02-01


Every spawnable thing is described in the ZDoom reference and the #include .acs files you include every time you compile a script... big case of RTFM here DooMBoy...

__________________
Say what?

Old Post 08-21-02 03:44 #
GooberMan is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Biffy
Forum Regular


Posts: 894
Registered: 02-01


New Zdoom is coming out (I think) which also uses the SpawnSpot command, similar to Thing_Spawn, except you can also assign the spawned thing a TID (thing ID, a tag number). In addition, that command can be used to call things from Heretic and Hexen into Doom, as long as the graphics and sounds are there to support it.

spawnspot ("Mace", 157, 177, 0);

This spawns a Heretic Mace at map spot 157, assigning it the tag 177, facing angle 0 (no matter for this item, it looks the same from any direction).

Old Post 08-21-02 03:44 #
Biffy is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
The Ultimate DooMer
(former) /newstuff Chronicler


Posts: 4701
Registered: 03-02


If you don't want the teleporter fog to appear, use Thing_SpawnNoFog instead. But in all cases, make sure you have a map spot with a tag at the place you want to spawn it, and that the first argument is the tag of that map spot.

Old Post 08-21-02 11:04 #
The Ultimate DooMer is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
boris
meow


Posts: 3626
Registered: 05-00


I think spawning things with a TID does already work with ThingSpawn.

__________________
this sig is in my pants | WIP - WADs In Progress: post your WADs!

Old Post 08-21-02 11:26 #
boris is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Biffy
Forum Regular


Posts: 894
Registered: 02-01


You're right, Tarin. It's the last argument...

Thing_SpawnNoFog (33, T_ARACHNOTRON, 64, 124);

Arachnotron at map spot 33, facing north, assigned the tag 124, spawning silently (without teleport fog).

Old Post 08-21-02 15:17 #
Biffy is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Use3D
Forum Legend


Posts: 4713
Registered: 04-02


i can't seem to get an enemy to spawn when a line is crossed. the monster spawn command is in the script, cause some doors open at the same time. the doors go off, but the monster never appears. help!

__________________
Have you ever seen the sun cringe and wither as it becomes a memory in a martyr's mind; they call it glory, well I call it crime.

Old Post 08-22-02 07:04 #
Use3D is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
DooMBoy
Heh
(but Stupidity still cannot be concealed)


Posts: 8509
Registered: 12-00


You need to put a mapspot with a thing id ine the part of the level where you want the monsters to spawn at.

__________________
Heh

Old Post 08-22-02 12:09 #
DooMBoy is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Use3D
Forum Legend


Posts: 4713
Registered: 04-02



DooMBoy said:
You need to put a mapspot with a thing id ine the part of the level where you want the monsters to spawn at.


yup, did that. the mapspot has a tag of 28, and i know it works, cause i spawned some radsuits there with a swtich. but i can't seem to spawn a monster to that spot from the script. more help!

__________________
Have you ever seen the sun cringe and wither as it becomes a memory in a martyr's mind; they call it glory, well I call it crime.

Old Post 08-22-02 17:14 #
Use3D is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Enjay
ASK ME ABOUT FOOTBALL / STEAM / DEAD CELEBRITIES / THE BLAIR WITCH PROJECT


Posts: 6381
Registered: 12-00


Have you checked that there is enough room for your monster to appear? I have found that spawnspot is sensitive to making sure there is enough room. If the mapspot is too close to a wall, or the sector isn't tall enough, nothing spawns. Thing_spawn may be similar (don't remember, and can't check ATM).

Oh and BTW, as well as spawnspot, the next Zdoom will have a spawn command that allows you to use coordinates as arguments, rather than using a mapspot to spawn an item. spawnspot and spawn are not working in b33, but as Biffy said, the real beauty of them is that ANY actor can be spawned by them, not just the items in the spawnables list (ie the more limited list of ones that work with Thing_spawn). OK, it is pointless to spawn a few of the actors (eg projectiles stay stationary, glass shards just wiggle on the floor etc) but it means all the various pillars and scenery items, as well as monsters from Doom, Heretic or Hexen can be called into any of those 3 games using a script (again as Biffy says, provided you have put resources to support them into a WAD).

__________________
Meek

Old Post 08-22-02 19:42 #
Enjay is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
All times are GMT. The time now is 20:24. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > Spawning things using scripts

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.