Jump to content
  • 0

Multi-action lever


Lowy-♥

Question

So, i have this part of the level where i want that when the player presses "use" on a wall (with a lever texture... yeah well just a lever) i want it to make 2 walls go down (there is monsters behind them). that was essy, now the problem is that i also want it to block the entrance where the player came from instantly when he preses "use" + unlock when all the monsterst on the room has been kill...

 

oh yeah, forget to say that i want to the lever to ALSO open a door (its more complicated: i actually want the player to press 3 levers in different locations once to open a single door)

 

PD1: this my 1st (2nd) doom map/wad, i worked on one long time ago but drop it because i think it was a waste of time, but whatever...

PD2: i dont want to attach images because that would spoil the map

 

Edit/update: well thanks to the scrips i could get to that a door open only if 3 switchers are pressed, but i still need to figure out all the other stuff

Edited by Lowy-♥

Share this post


Link to post

5 answers to this question

Recommended Posts

  • 0

When you create a new map in UDB, the first thing it asks is "Game Configuration." There's a pull-down list, that's the map format. If you want the map to use scripts, then you want the thing in parenthesis to be (Hexen format) or (UDMF) (I'd recommend UDMF).

 

There are tutorials on how to write scripts for UDMF.

Share this post


Link to post
  • 0

You can either do it with scripting if you're mapping in UDMF, or, nevermind. If you want it to open up after all the monsters are dead, you have to use Hexen or UDMF format and a script.

Edited by Stabbey

Share this post


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

You can either do it with scripting if you're mapping in UDMF, or, nevermind. If you want it to open up after all the monsters are dead, you have to use Hexen or UDMF format and a script.

mmh, well i will look for it, but anyways it sounds very complicated mostly because i never did any code for a doom map, the only thing that i did was a code that make a text appear in front of you when you kill a specific enemy

 

also i have no idea what Hexen or UDMF is lol, i am only working on UDB and SLADE rn, anyways, like i said, i will look for it thx

Share this post


Link to post
  • 0

There are two ways to do this, depending on what source ports you want to target.

 

Boom: you create a hallway separate from the map with a scrolling floor. Put a voodoo doll (extra player 1 start) at one end, and several obstructions such as doors or high floors in front of the voodoo doll such that the floor moves the doll and it gets stuck.

 

Each switch that triggers whatever it is you want opens one of those doors or lowers a floor, allowing the voodoo doll to move past them eventually. After the obstructions, you put however many linedefs you need where each one triggers an action when the player walks over.

 

This method allows you to have one switch trigger multiple different actions. One switch in the basic game can open multiple doors that share a tag, but this Boom method allows one switch to open a door, raise some stairs, and lower a different floor. You can also have multiple switches required to do one action, such as flipping three switches to open a door. You can combine those in a many-to-many relationship where you need to hit three switches in order to perform multiple actions all at once.

 

There are many, many examples of this method out there. Open up pretty much any non-trivial Boom map and look for hallways that are not reachable from the main area of the map, and see what triggers sectors inside of them and what their linedefs trigger elsewhere. Copy this method in your map if you want to use the Boom approach.

 

GZDoom: if you create a new map using UDMF+GZDoom configuration in UDB3, you can write an ACS script to do whatever complex actions you want. It is a bit more intuitive because you can simply write the ACS action specials in your function one after another, making it nice and easy to read what it does instead of the Boom method that requires looking around the level and paying attention to the activation arrows which can get messy. The disadvantage is this only works in ZDoom-derived ports: basically anything that understands ACS and the "zcommon.acs" import.

 

In both cases, Stabbey meant when you create a new map, UDB3 presents a dialog box that asks what configuration you want to use, like this:

 

image.png.306748a6c83c455fc12c81477dc8baad.png

 

The first element in each list item is the source port target such as Boom, DSDADoom, GZDoom, MBF21. Some of those are specific ports (GZDoom), others are categories of ports that support a common feature set (MBF21). The part in parenthesis is the file format and new levels should generally either use Doom or UDMF format depending on what source ports you want to support.

 

Based on what option you select here, UDB3 presents different capabilities when you edit the map especially with regards to action specials.

Share this post


Link to post
  • 0
On 2/20/2024 at 6:28 AM, Lowy-♥ said:

So, i have this part of the level where i want that when the player presses "use" on a wall (with a lever texture... yeah well just a lever) i want it to make 2 walls go down (there is monsters behind them). that was essy, now the problem is that i also want it to block the entrance where the player came from instantly when he preses "use" + unlock when all the monsterst on the room has been kill...

 

oh yeah, forget to say that i want to the lever to ALSO open a door (its more complicated: i actually want the player to press 3 levers in different locations once to open a single door)

 

PD1: this my 1st (2nd) doom map/wad, i worked on one long time ago but drop it because i think it was a waste of time, but whatever...

PD2: i dont want to attach images because that would spoil the map

 

Edit/update: well thanks to the scrips i could get to that a door open only if 3 switchers are pressed, but i still need to figure out all the other stuff



You *could* achieve this with a switch that requires shooting... so long as you aren't set on them being required to physically hit the switch   Here are some screen caps from one I set up in my wad.   In the image you can see the two line defs that make up the switch, then what each one points to.    I'm just uploading a short clip to show how it works and looks in game... I'll post the link with an edit in a moment.

 
 

setup1.jpg

 

 

EDIT:   This isn't going to solve the needs for things that Gun triggers can't do, but for opening a door whilst raising floor to block another section is totally doable.   Just stack your linedefs one in front of the other and when the player shoots, their bullet will trigger all of them as they pass through. 
 



 

Edited by Makros_the_Black

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...