Jump to content
  • 0

How do I make a switch perform two actions: Opening doors and lowering the switch to the floor


DTSlayer

Question

I'm just starting out in UDB and after familiarizing myself with how tags work, I was able to successfully create a working switch that opens two monster closets (yay!).  However, I also want the switch to lower itself to the ground where it will be hidden since it's a one time use switch.  The problem is I can't seem to assign two different actions to the same switch.  Is this possible or are switches only capable of performing one action instead of several?  When I tried adding an extra tag for the lowering action, it completely breaks the previous monster closet door action so I'm stuck.  Help please!

Share this post


Link to post

14 answers to this question

Recommended Posts

  • 4

That depends on the format you are using.

Doom: You can't. But you can turn door into a lowering wall. Or have switch retract into ceiling like a door instead.

Boom: As @Catoptromancy pointed out, you can add a scrolling floor and an extra player start there. Open a door and the that extra player (Known as Voodoo doll in the community) will scroll through as many action lines as you want.

GZDoom: You can probably write a script. I know nothing about that.

Share this post


Link to post
  • 1

I can think of a few ways to do this based on what format you're using.

 

If you're mapping for Vanilla Doom 2, instead of creating doors that block the monster closets, instead raise the floor to block the monster closets. Then you can have the switch lower sector to nearest floor and have it so that the switch opens the monster closets by lowering the raised floor down and also lowers the switch down to floor at the same time. One action, does two things.

 

If you're using Boom, the above method can still work. You can lower a voodoo doll onto a scrolling floor that will move it along and have it pass player pass linedefs. One linedef will lower the switch and another one will open the monster closet.

 

If you're using GZDoom (UDMF Format), you can do this via ACS scripting. You can go to the ZDoom wiki to learn how that works. The above two methods also work in GZDoom.

 

I mainly map in GZDoom but I still use the vanilla method. No point in over-complicating things right? I generally stick to simpler solutions and avoid scripting if I can.

Share this post


Link to post
  • 1
2 hours ago, DTSlayer said:

I'm just starting out in UDB and after familiarizing myself with how tags work, I was able to successfully create a working switch that opens two monster closets (yay!).  However, I also want the switch to lower itself to the ground where it will be hidden since it's a one time use switch.

have the "doors" of the closets as well as the switch (and the sector the switch linedef is a part of) with the same tag, assign the desired "lower this sector to XYZ action", hit switch, done...

Edited by Nine Inch Heels

Share this post


Link to post
  • 1

@DTSlayer

Given that you want to keep your map actions vanilla-compatible, I think the options presented here will probably serve you the best for what you're trying to do.

 

I want to offer you some other thoughts, just so you'll have them available in your mind for later. Admittedly, I don't know the structure of your map or the monsters in those closets, so these might not apply to the current situation, but they could in the future.

 

Vanilla

  • Don't discount the potential utility of having the single-use switch on a pillar that will remain in the room even after you've pressed it. Depending on what you have attacking you, the pillar can provide cover for the player.
  • The only vanilla-compatible way to have a single switch trigger two actions would involve hurting the player. You would have to have the switch lower a crusher that would detonate barrels and push a voodoo doll across walkover linedefs to trigger the switch to lower and the monster closets to open. If I remember correctly, Doom 64 for Doom II Map 02 has an example of this. However, it's a rather advanced technique that can be difficult to calibrate, so it is often simpler to use a technique such as was suggested by ViolentBeetle and Zulk RS.

 

Boom

  • While voodoo dolls on scrollers are quite versatile, you can also use the pass-through flag in Boom-compatible maps. As illustrated in BOOMEDIT.WAD, you can put two S1 linedefs close to each other (within 1 or 2 map units) and select the pass-through flag on the front linedef. That will allow you to trigger both linedefs. This only works for two actions, though.

 

Good luck with your map.

Share this post


Link to post
  • 0
48 minutes ago, ViolentBeetle said:

That depends on the format you are using.

Doom: You can't. But you can turn door into a lowering wall. Or have switch retract into ceiling like a door instead.

Boom: As @Catoptromancy pointed out, you can add a scrolling floor and an extra player start there. Open a door and the that extra player (Known as Voodoo doll in the community) will scroll through as many action lines as you want.

GZDoom: You can probably write a script. I know nothing about that.

GZDoom also supports scrolling floors

Share this post


Link to post
  • 0
1 hour ago, DTSlayer said:

I'm just starting out in UDB and after familiarizing myself with how tags work, I was able to successfully create a working switch that opens two monster closets (yay!).  However, I also want the switch to lower itself to the ground where it will be hidden since it's a one time use switch.  The problem is I can't seem to assign two different actions to the same switch.  Is this possible or are switches only capable of performing one action instead of several?  When I tried adding an extra tag for the lowering action, it completely breaks the previous monster closet door action so I'm stuck.  Help please!

 

Do you have to open the door, or would it be acceptable to make the monster closets have raised floors, so the single switch pull lowers the floor, lowering the switch and revealing the monster closets? That's what I would do, at least. Keep it simple.

Share this post


Link to post
  • 0
16 minutes ago, Zulk RS said:

No point in over-complicating things right?


Totally right. Especially if it's something the player can't see...

If you can see the closets open from the switch however, I can understand wanting to make use of multiple actions, even if it doesn't make a huge difference in practice. But personally I would avoid such shenanigans unless it's going to really jazz up my map

Share this post


Link to post
  • 0

There are some options:

1. If it is not strictly door, you can use same action for both. (vanilla)

2. Using conveyor can be used for lot of different things, including this one - basically place voodoo doll on conveyor, block its movement with door, and then use switch to open door, which lets voodoo doll scroll freely and trigger other walkover lines. (boom)

3. If you are lazy, in some situations you can use two lines (or even more) by marking some 'pass use action'. This will cause them to trigger and not block other actions. However, this is pretty volatile and you can accidentally miss some. Try to avoid this. (boom)

4. UDMF probably can just script stuff. 

 

Edited by floatRand

Share this post


Link to post
  • 0

If you are aiming for vanilla, then the only solution I can think of is, you assign one switch to lower multiple floors, which are monster closets & of course, the switch itself.

 

Other formats provide more freedom & creativity, such as scripting (UDMF only afaik) & voodoo doll trick which can be done in both Boom & UDMF with conveyor belts, silent teleports, many linedefs that trigger many actions, etc....

Share this post


Link to post
  • 0

Thanks for all the advice, these solutions are creative and I'll take your advice as far as keeping it Vanilla, although I do want to learn scripting at some point once I'm more familiar with map making.

 

Share this post


Link to post
  • 0
50 minutes ago, DTSlayer said:

Thanks for all the advice, these solutions are creative and I'll take your advice as far as keeping it Vanilla, although I do want to learn scripting at some point once I'm more familiar with map making.

 

 

Personally, I feel like that's an excellent idea. Using the limited actions possible and limit of one-action per switch helps you think creatively to figure out how to produce good effects. Thinking creatively is an important skill for a mapper. You can always pick up scripting later, and your improved creative thinking benefits there as well.

 

Even using standard (or extended) Doom actions, there's a lot of creative ways to use careful placement of lines and dummy sectors to give the appearance of multiple things happening at once.

 

Take a look at my own two-map set of Nukage Treatment Pools and Dead in Five Minutes in an editor (GZDoom format map), and I make good use of closely spaced triggers to have multiple actions happening quickly.

 

That's most notable in Di5M's final room, where in quick succession, walking forward unleashes a bunch of Spectres teleporting in behind the player, a door seals between them and the player, the room goes entirely dark - two different sectors, the floor and walls lower, and some lights come back on. In actual gameplay, it produces a kind of blink where the room changes almost instantly.



 

In Nukage Treatment Pools, I have a switch which lowers a section of floor to reveal a switch, which also does that in a dummy sector elsewhere, so that when the player passes a certain point they've already passed through, now passing through opens up a monster closet, which should be a nice unexpected surprise, since that hall had seemed safe before no matter how many times they walked back and forth through it.

 

 

Similarly, a certain door which players have activated before will, after a certain point, also open up a surprise monster closet in front of and behind the player.

 

I also take advantage of the fact that there are actions like "lower to lowest floor" and "raise to highest floor" which will do nothing if there's no different height next to the sector, so I can use the same tag on multiple sectors, but the action only ends up being performed on the specific sectors I want it to happen on.

 

Share this post


Link to post
  • 0
1 hour ago, Stabbey said:

Personally, I feel like that's an excellent idea. Using the limited actions possible and limit of one-action per switch helps you think creatively to figure out how to produce good effects.

The actually good thing about doing something like mapping with vanilla actions exclusively first is getting in the habit of actually using the linedef actions that exist before defaulting to "ah well, I guess I'll just script this, that, also that over there, and this thing over yonder in particular"...

Share this post


Link to post
  • 0

@Pegleg sorry I'm just now getting back on here and read your very informative post.  That barrel trick is pretty damn clever but I'll avoid using that method.  Thanks for the well wishes!  I'm still learning as I go so I'm finding and figuring out solutions to problems I didn't even know I would have.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...