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

Can spawned objects in ZDooM trigger scripts?

Recommended Posts

In the past this question has been raised, and I seem to remember that it cannot be done. However, this is what I want to achieve and this is what I've tried so far:

I want a red skull key to be spawned when a switch is pressed. This part was easy -- I just used a map spot, gave it a tag number, and used the thing_spawn function as part of a script.

Next, I want another script to be triggered when the red skull key is picked up. This part doesn't work. First I realized that the basic map spot does not allow any specials to be triggered. So then I changed it to a map spot w/gravity. This does in fact seem to allow specials to be triggered. So I chose this type of map spot, tagged it, selected ACS_Execute in the specials menu, and assigned the relevant script number. Unfortunately, this doesn't seem to work any differently than a regular map spot. The red key is spawned, but picking it up does not trigger the script.

A rather clunky solution is to have a linedef run through the map spot, and let the linedef trigger the script. I'd have to set it up so that the linedef can only be triggered AFTER the key has been spawned.

Any other ideas?

Share this post

Link to post

The new version of ZDoom has a sector trigger thing (a thing that triggers when you enter or exit a sector). You'll be able to do what you want with that.

Share this post

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