Hopelessness Posted February 12, 2004 There was a time that I knew this but I no longer remember... How do I spawn an enemy without creating a dummy sector? I use ZDoom and I recall it dealt with composing a script, but I don't remember what the script looked like or what the numbers were that corresponded to the particular enemy you wanted to spawn. If someone could explain this or simply provide a link to a tutorial it would be most appreciated. Thank you. 0 Share this post Link to post
Ichor Posted February 12, 2004 Here's a couple of them. There's some more, but I can't remember right now: Thing_Spawn(mapspot tid, thing type, angle); Basic spawning command Thing_SpawnNoFog(mapspot tid, thing type, angle); Spawns things (not just enemies) without the teleport effect or sound. They just appear suddenly and silently. Oh yeah, the list of all the things that can be spawned: 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 Share this post Link to post
Job Posted February 12, 2004 Can you make it so that crossing a particular linedef spawns said item/thing? Also, could you explain an example for (mapspot tid, thing type, angle)? 0 Share this post Link to post
Ichor Posted February 12, 2004 There's a few ways to make a trigger line in ZDoom or Hexen. 1. Give a line the Thing_Spawn trigger and set it to "player crosses". For example, Thing_Spawn(3, 1, 64) would spawn a shotgun guy at any mapspot with a tid of 3 and facing north (90° = 64) 2. Give a line the ACS_Execute trigger. An example would be: ACS_Execute(5, 0, 0, 0, 0). This would run script 5, which might be something like this:script 5 (void) { Thing_Spawn(3, 1, 64); } This is useful for running multiple commands simultaneously, and eliminates the need for multiple trigger lines bunched together like I've seen in some maps. 3. This one is the most complicated, but it gives you the most control. Give a line the LineSetIdentification trigger, and give it an arbitrary number like you would a mapspot or sector tag. Let's say...7. Right now, the line won't do anything, so we must define what trigger you want in the script. For instance:script 3 open // this runs once the map starts { SetLineSpecial(7, 80 /* ACS_Execute */, 5, 0, 0, 0, 0); } Like I said, it gives you the most control because you can change the properties of that line at any time. For instance, let's say you have a switch, and you want it to be a toggle light switch. This is fairly easy to do once you know how. First, we give a line the LineSetIdentification and use...let's say 8 this time (7 is being used by another line). Also, give it the setting "player uses" (I've lost track on how many times I forgot to do this, heheh).script 3 open { SetLineSpecial(7, 80 /* ACS_Execute */, 5, 0, 0, 0, 0); SetLineSpecial(8, 80 /* ACS_Execute */, 6, 0, 1, 0, 0); } Now we must write script 6.script 6 (int arg0) { if(arg0 == 1) { Light_Fade(13, 180, 40); SetLineSpecial(8, 80 /* ACS_Execute */, 6, 0, 2, 0, 0); } else if(arg0 == 2) { Light_Fade(13, 60, 40); SetLineSpecial(8, 80 /* ACS_Execute */, 6, 0, 1, 0, 0); } } 0 Share this post Link to post