Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Guest zyvgjc

ZDOOM-HEXEN script editing

Recommended Posts

Guest zyvgjc

Okay, here's what I'm trying to do:

I made four different monsters spawn inside a room, using the Thing_Spawn function, when the chaingun is obtained. What I want to know is, how do I use the ThingCount function so that when all the monsters are killed, an action is triggered? The ThingCount function requires the Tid parameter for the monsters. Since the monsters doesn't appear on the map (until spawned), how do I place the tag numbers on them? Any help would be wonderful. I'm using Deepsea by the way.

Share this post


Link to post
Guest Ty Halderman
zyvgjc said:

how do I use the ThingCount function so that when all the monsters are killed, an action is triggered? The ThingCount function requires the Tid parameter for the monsters.

This is a Catch-22 that you can't get around with normal scripting. If you don't want to keep spawning them forever, just put them in another room and teleport them in. That way they can have been assigned the TID you need to do stuff with them.

That said, the ThingCount function can also look for all Things of a certain type. If you know how many of that monster there are elsewhere on the map, and the ThingCount drops below a certain number, then you'd know all these spawned ones were gone.

Share this post


Link to post

Note though that skulltag (which is based upon zdoom 1.22) has a thingspan function that *do* allow you to specify a tid for the spawned thing.

So in st, what you want to accomplish should be easy to do :o)

Share this post


Link to post
Guest
This topic is now closed to further replies.
Sign in to follow this  
×