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

How do I make a special door?

Question

I want to make a door that is two separate sectors. I want one of them to go up, while the other one goes down. All at the push of a tagged button.

 

I am not apposed to trying to script this.

 

The format I'm using is GZDoom: Doom2 (Doom Format)

 

Any help?

Edited by ThatOneDoomer : Added new line.

Share this post


Link to post

14 answers to this question

Recommended Posts

  • 0

Well, depends which format this is. If BooM, you could do some conveyor belt shenanigans, and if not ... well not sure how you would do this vanilla. Two close walkoverlines would work, but you mentioned buttons so IDK.

Share this post


Link to post
  • 0
13 minutes ago, Pechudin said:

Well, depends which format this is. If BooM, you could do some conveyor belt shenanigans, and if not ... well not sure how you would do this vanilla. Two close walkoverlines would work, but you mentioned buttons so IDK.

The format I'm using is GZDoom: Doom2 (Doom Format). If that's of any help.

Share this post


Link to post
  • 0

Doom format? That sounds like vanilla, in which case I know of no switch action that could open the door in that way. You could use automatic doors with two walk-over lines close next to each other, one raising ceiling to highest ceiling and other lowering floor to lowest floor. Not sure how you'd make them close in the same way though.

Share this post


Link to post
  • 0
2 minutes ago, Pechudin said:

Doom format? That sounds like vanilla, in which case I know of no switch action that could open the door in that way. You could use automatic doors with two walk-over lines close next to each other, one raising ceiling to highest ceiling and other lowering floor to lowest floor. Not sure how you'd make them close in the same way though.

Hmmm, alright. I may try this in a different format(I.e doom in hexen, heritic.)

Share this post


Link to post
  • 0
3 hours ago, ThatOneDoomer said:

I want one of them to go up, while the other one goes down.

I'm not an UDMF expert, but I'm pretty sure something like door generic should do it, and applied it to door A to go up, while lift action is applied to B go down. it should be easy considering how much crazy things you can pull off in UDMF

Share this post


Link to post
  • 0

If you switch to Doom-in-Hexen or UDMF for your map format, you can use ACS, which would make this a cinch. You can write a simple set of two scripts like this:

#Include "zcommon.acs"

script 1 (door1, door2, switchID)
{
	ClearLineSpecial();
	Generic_Door(door1, 64, 1, 0, 0);
	Generic_Door(door2, 64, 3, 0, 0);
	Delay(32);
	SetLineSpecial(switchID, ACS_Execute, 2, 0, door1, door2, switchID);
}

script 2 (door1, door2, switchID)
{
	ClearLineSpecial();
	Generic_Door(door1, 64, 3, 0, 0);
	Generic_Door(door2, 64, 1, 0, 0);
	Delay(32);
	SetLineSpecial(switchID, ACS_Execute, 1, 0, door1, door2, switchID);
}

You'll have three tags relevant to your script:

1. The first door's sector

2. The second door's sector

3. The switch line's tag (You can directly assign tags to lines in UDMF. It's also possible in Doom-in-Hexen, but it's mildly annoying there.)

 

What you'll do from here is give your switch the action "80: Script Execute", then for the five arguments below, you'll set "Script Number" to 1 or 2 (shouldn't really matter), "Map Number" to 0 (this indicates that the script will be executed on the current map), and the last three to the tags mentioned above.

 

What the scripts do is open one door and close the other, then sets the switch to perform the opposite action the next time it's pressed.

Share this post


Link to post
  • 0
On 1/24/2022 at 10:26 AM, SMG_Man said:

If you switch to Doom-in-Hexen or UDMF for your map format, you can use ACS, which would make this a cinch. You can write a simple set of two scripts like this:


#Include "zcommon.acs"

script 1 (door1, door2, switchID)
{
	ClearLineSpecial();
	Generic_Door(door1, 64, 1, 0, 0);
	Generic_Door(door2, 64, 3, 0, 0);
	Delay(32);
	SetLineSpecial(switchID, ACS_Execute, 2, 0, door1, door2, switchID);
}

script 2 (door1, door2, switchID)
{
	ClearLineSpecial();
	Generic_Door(door1, 64, 3, 0, 0);
	Generic_Door(door2, 64, 1, 0, 0);
	Delay(32);
	SetLineSpecial(switchID, ACS_Execute, 1, 0, door1, door2, switchID);
}

You'll have three tags relevant to your script:

1. The first door's sector

2. The second door's sector

3. The switch line's tag (You can directly assign tags to lines in UDMF. It's also possible in Doom-in-Hexen, but it's mildly annoying there.)

 

What you'll do from here is give your switch the action "80: Script Execute", then for the five arguments below, you'll set "Script Number" to 1 or 2 (shouldn't really matter), "Map Number" to 0 (this indicates that the script will be executed on the current map), and the last three to the tags mentioned above.

 

What the scripts do is open one door and close the other, then sets the switch to perform the opposite action the next time it's pressed.

Not saying I'm a pro at this kind of stuff or anything, but, I don't think this is supposed to happen. (Sorry for the terrible picture quality)

Builder_wQBytVxtrC.png

Share this post


Link to post
  • 0
On 1/24/2022 at 12:39 PM, ThatOneDoomer said:

I want one of them to go up, while the other one goes down

The question is: do you want a part of the door to open while the other closes, or both open up, but 1 goes up and 1 goes down?

 

(I'm betting on the second one

Share this post


Link to post
  • 0
Just now, Kan3 said:

The question is: do you want a part of the door to open while the other closes, or both opens up but 1 goes up and 1 goes down?

The second one. I think it would be neat for a map I'm making.

Share this post


Link to post
  • 0
Just now, ThatOneDoomer said:

The second one. I think it would be neat for a map I'm making.

Spoiler

Cool fact is that I've seen this type of door in a Decino's video today x)

 

Ok, there are tons of ways to do it surely, but the first that comes to mind as the easiest one is using "Door_Raise" for the one that goes up and "Plat_DownWaitStay".

 

  1. Give the first sector a tag and the other another tag
  2. Open the script editor and make a script (you can give the script a number "script 1 (void)" for example or a name "script "CoolDoor" (void)"
  3. In this script write "Door_Raise" and set as tag, the tag of the sector you want to go up, then the speed and the delay you want
  4. Right below that, write "Plat_DownWaitStay" (use CTRL + SPACE for the hints) and set as tag, the tag of the other sector, then same speed and delay of the previous.

That's it.

 

A note though: raising doors will reach a height of the nearest ceiling - 4 units, while platforms will go down to the nearest floor + 8 units, so they won't be perfectly synchronized with this script.

If you want them to be in sync, you have to use "Plat_DownByValue", but since this takes in the height parameter 8 times the value you set, you'll have to set your door's height to be divisible by 4, but not by 8.

Share this post


Link to post
  • 0
3 hours ago, ThatOneDoomer said:

Not saying I'm a pro at this kind of stuff or anything, but, I don't think this is supposed to happen. (Sorry for the terrible picture quality)

 

Ah, my bad. I fucked up part of the script (the "int" that goes in front of "Door1" and so on). Try this instead:

#Include "zcommon.acs"

script 1 (int door1, int door2, int switchID)
{
	ClearLineSpecial();
	Generic_Door(door1, 64, 1, 0, 0);
	Generic_Door(door2, 64, 3, 0, 0);
	Delay(32);
	SetLineSpecial(switchID, ACS_Execute, 2, 0, door1, door2, switchID);
}

script 2 (int door1, int door2, int switchID)
{
	ClearLineSpecial();
	Generic_Door(door1, 64, 3, 0, 0);
	Generic_Door(door2, 64, 1, 0, 0);
	Delay(32);
	SetLineSpecial(switchID, ACS_Execute, 1, 0, door1, door2, switchID);
}

You should just leave the scripts like this, though. You'll put in your actual tags when you give the switch the script action, like this:

image.png.b9f09b2f8c0f0aed93abf475addef916.png

 

Share this post


Link to post
  • 0
On 1/25/2022 at 4:56 PM, SMG_Man said:

 

Ah, my bad. I fucked up part of the script (the "int" that goes in front of "Door1" and so on). Try this instead:


#Include "zcommon.acs"

script 1 (int door1, int door2, int switchID)
{
	ClearLineSpecial();
	Generic_Door(door1, 64, 1, 0, 0);
	Generic_Door(door2, 64, 3, 0, 0);
	Delay(32);
	SetLineSpecial(switchID, ACS_Execute, 2, 0, door1, door2, switchID);
}

script 2 (int door1, int door2, int switchID)
{
	ClearLineSpecial();
	Generic_Door(door1, 64, 3, 0, 0);
	Generic_Door(door2, 64, 1, 0, 0);
	Delay(32);
	SetLineSpecial(switchID, ACS_Execute, 1, 0, door1, door2, switchID);
}

You should just leave the scripts like this, though. You'll put in your actual tags when you give the switch the script action, like this:

image.png.b9f09b2f8c0f0aed93abf475addef916.png

 

its doing this

Screenshot_Doom_20220614_095851.png

Share this post


Link to post
  • 0
On 1/24/2022 at 3:39 AM, ThatOneDoomer said:

The format I'm using is GZDoom: Doom2 (Doom Format)

Any help?

 

Since you are already using GZDoom, why not go one step further and use UDMF?

Then you could use the linedef special for Pillar.

Share this post


Link to post
  • 0

You can make a door like this using a voodoo doll on a conveyor belt with a layout like this

 

image.png.0d3cb1a158fb290fd0b7e3b551e98b3d.png

 

Pressing the switch lowers the red triangle sector which was blocking the voodoo doll from moving, so then it starts moving forward and activates the two linedefs at the same time which raises the ceiling and lowers the floor of the door, then further on it activates a linedef which raises the red triangle sector, blocking the doll from moving again until the switch is pressed a second time. The other two linedefs close up the door and then the doll teleports back to the start. Then raising the red triangle sector, blocking the doll once again ready for the switch to be pressed.

 

If you only want the door to open and not close up again afterwards then you only need up to the first red triangle sector. All you really need is something blocking a voodoo doll from moving on a conveyor, and then pressing the switch un-blocks the voodoo doll, allowing it to pass over two linedefs at once to raise the ceiling and lower the floor.

 

Doing it with voodoo dolls like this would also make it Boom compatible as long as you haven't used any GZDoom exclusive features in your map.

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
×