Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
I_Am_Doom_Man

Possible to have one trigger reveal other triggers?

Question

In the level I'm making I wanted the player to go through a section, get an item, and then as they back track through the area have several monster traps activate that didn't before getting the item. What I had in mind was making a trigger for the item that when walked over enables a new trigger to be activated when backtracking, if this is possible to do. Otherwise, maybe theres a better method.

 

EDIT: I'm using the Ultimate Doom Builder in zdoom udmf format.

Edited by I_Am_Doom_Man

Share this post


Link to post

10 answers to this question

Recommended Posts

  • 2

you can make your item run a script on pickup (change its action in properties) and use setlinespecial in that script to make a previous linedef do things when walked over after the special is set, make sure to make the action repeatable on that linedef

 

example:

 

int door_3_triggered;

 

script 69 (void)
{

   if(door_3_triggered == 0)

   {
     setlinespecial(line_tag,door_open,3,0);

     door_3_triggered++;

   }
}

Share this post


Link to post
  • 1

Yes this is possible with the SetLineSpecial() Function

Additionally you can format it to run scripts in an alternative way like this SetLineSpecial("Linedef Tag Here", ACS_Execute, "Script Number Here");
If you want the new linedef special to run a script that is, which allows multiple specials assigned to a trigger

Share this post


Link to post
  • 1

The way to do this easily is to use the LineSide special, which allows the player

to carry out actions depending on the direction from which the player crosses the line.

Share this post


Link to post
  • 0

You could use a teleport ambush and combine a lift and a door, both preventing the monster from teleporting. When you go to the key, you trigger the lift but nothings happens as the door is closed, when you grab the key you trigger the door wich remains open, and when you backtrack you trigger the lift again wich this time allows the monster to teleport.

 

This is vanilla compatible, I only read you were using UDMF after finishing the example, but maybe somebody finds it useful.

 

 

 

 

 

 

2triggers.zip

Share this post


Link to post
  • 0

A vanilla compatible method:

 

Let's say you want to have a wall lower as you go back through the area - I'll call this wall "sector Z". You can use the WR Lower Floor to Lowest Neighbor Ceiling trigger (linedef type 91 in Doom format) and ensure there are initially no neighbouring ceilings lower than the floor's height. There will need to be at least one neighbouring sector with its ceiling at the same height as the floor to be lowered - I'll call this "sector X".

 

Upon achieving the area's objective of collecting a key, pressing a switch, or whatever it may be, have a trigger which lowers the ceiling of sector X to the height you want sector Z to lower to. You'll probably want to use dummy sectors to achieve this. You'll also need to ensure that sector X and other sectors neighbouring sector Z don't ever go any lower, otherwise the player will cause sector Z to go lower as well.

 

You can use the same trick for a ceiling you want to raise, using WR Raise Ceiling to Highest Neighbor Floor (linedef type 202 in Doom format) and ensuring there are initially no neighbouring sectors with a floor higher than the ceiling to be raised.

 

You can also use this method with a door you want to open - for this you'll need to make sure sector X initially has a ceiling height 4 above the door's. You could even use it for a lift, making sure the lift initially doesn't have any neighbouring sectors with a floor lower than its own.

 

EDIT: You can also use this to prevent Lights to Minimum/Maximum Neighbor triggers from having any effect until the light level sector X is itself changed. For teleporters, just make sure the destination sector's floor and ceiling heights are the same until you want the teleported to start working.

 

EDIT 2: You can of course have sector's X's properties change multiple times, for some interesting effects. One idea that springs to mind is a central area with a switch which initially does nothing. Upon exploring a connecting area and pressing another switch, the central switch will now lower the surrounding floor to reveal a new area. A switch in this area allows the central floor to be lowered again, opening up yet another new area. Repeat as many times as you like!

Edited by NiGHTMARE

Share this post


Link to post
  • 0

image.png.9612c9651eec33fa2f16bb681e3c35e7.png

I'd say this would be the simplest way to do something like this. The "lower, wait, raise" pillar would be activated by the linedefs you walk over first before backtracking. Then after you hit the linedef which lowers the other pillar indefinitely, the next time you hit the first linedefs would be when the traps activate, because only then will the voodoo doll not be blocked by anything and will be pushed by the conveyors into any extra triggers you want. Voodoo dolls are just extra player starts and conveyors are made by using action tag 253 on a line and then tagging a sector with the same tag as that line.

 

EDIT: Just realised "floor lower, wait, raise" doesn't exist (in Boom format anyway) but door open, wait, close will work just as well.

Share this post


Link to post
  • 0
2 hours ago, NiGHTMARE said:

Wouldn't "floor lower, wait, raise" just be a slower version of a lift?

 

For some reason I completely forgot about lifts when posting that what the hell? I think in my head I was thinking lifts only work by going up and down to the nearest floor so that wouldn't work with a pillar... but that's actually how floors wo-NEVERMIND just use a fast lift for the first pillar.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×