mapspot-monster spawn question
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
mapspot-monster spawn question
i spend a while searching the forums for an answer to this but i guess i just suck at it. i found nothing at the wiky. i guess im just blind or something... anyway. how the hell do i make it so when i spawn a monster it opens a door or does something after i kill him? i tried giving the mapspot the activate tag thing but it didnt work. im completly lost.

It's rather simple...
OK, you give a mapspot a TID of 1 in your editor, and you give the door a tag of 3...
OK, you give a mapspot a TID of 1 in your editor, and you give the door a tag of 3...
Code: Select all
Script 1 enter
{
Thing_Spawn (1 /*The TID of the mapspot*/, T_IMP/*Self-explanatory*/, 0/*The imp will be looking east when spawned*/, 2/*The TID of the imp*/);
SetThingSpecial(2 /*The imp's TID*/, Door_Open/*The special*/, 3 /*The Tag of the door*/, 20/*The door's speed*/);
}that was very usefull. thanks. 
now im trying to make it so the game ends when i kill the caco, i know i can do this with mapinfo but im curious if it can be done with this same thing too. here's the script. doesnt seem to work tho'
now im trying to make it so the game ends when i kill the caco, i know i can do this with mapinfo but im curious if it can be done with this same thing too. here's the script. doesnt seem to work tho'
Code: Select all
script 2 (void)
{
thing_spawn (1,19,0);
SetThingSpecial(19, Teleport_Endgame, 0);
}That's because you're using thing_spawn and SetThingSpecial incorrectly. Read these pages (1 2), they'll explain how to use them better.dochist, in short, wrote:Script doesn't work.
If you still don't get it, here:
Code: Select all
script 2 (void)
{
thing_spawn (1,T_CACODEMON,0,3/*Note: This is the number that's used to identify the monster, the first number (or name in this case) is just to tell thing_spawn what type of thing to create.*/);
SetThingSpecial(3, Teleport_Endgame, 0);
}