multi-sector elevator question
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
- theDooMguy47
- Posts: 109
- Joined: Tue Apr 14, 2009 8:05 pm
- Location: Lake Titicaca, Nicaragua
multi-sector elevator question
I'm making a simple elevator, and I have 2 switches in it, 1 to go up, 1 to go down. The issue is that I have the switches in 2 seperate sectors that stick in a little from the wall - since it's an elevator, when it goes down, they go down to the floor, and to the ceiling when it goes up. since the texture I'm using has no switch texture, and I really don't want to have to make a new texture with switches, is there any way I can have the 2 sectors move up and down with the elevator, but keep the same distance from the ceiling/floor of the elevator?
Re: multi-sector elevator question
Stick it in a dummy sector, have the dummy sector move with the elevator.
- theDooMguy47
- Posts: 109
- Joined: Tue Apr 14, 2009 8:05 pm
- Location: Lake Titicaca, Nicaragua
Re: multi-sector elevator question
uhh...put what in the dummy sector?
Re: multi-sector elevator question
...Oh, I'm sorry. I think I misread it. 
What do you want to do? Make your dummy-sectored switches stay where they are?

What do you want to do? Make your dummy-sectored switches stay where they are?
Re: multi-sector elevator question
[wiki]Sector_SetLink[/wiki].
Re: multi-sector elevator question
Can anyone post a simple example wad on how this works? I can't seem to get it to link right.Xaser wrote:[wiki]Sector_SetLink[/wiki].
- theDooMguy47
- Posts: 109
- Joined: Tue Apr 14, 2009 8:05 pm
- Location: Lake Titicaca, Nicaragua
Re: multi-sector elevator question
neither can I. The likned sectors don't move at all
Re: multi-sector elevator question
I simply give all the sectors the same tag, and when you use [wiki]Floor_RaiseByValue[/wiki] and [wiki]Ceiling_RaiseByValue[/wiki], all sectors will move in synchronization.
I never bothered to learn to use setlink because this method works fine for me. "Good enough", if you will.
I never bothered to learn to use setlink because this method works fine for me. "Good enough", if you will.
- Macil
- Posts: 2529
- Joined: Mon Mar 22, 2004 7:00 pm
- Preferred Pronouns: He/Him
- Location: California, USA. Previously known as "Agent ME".
- Contact:
Re: multi-sector elevator question
If something blocks the elevator, then the sectors will desync completely with that method.
- theDooMguy47
- Posts: 109
- Joined: Tue Apr 14, 2009 8:05 pm
- Location: Lake Titicaca, Nicaragua
Re: multi-sector elevator question
well, at this point I think I'll just use ceiling/floor raise/lower. That'll do what I want.
- Macil
- Posts: 2529
- Joined: Mon Mar 22, 2004 7:00 pm
- Preferred Pronouns: He/Him
- Location: California, USA. Previously known as "Agent ME".
- Contact:
Re: multi-sector elevator question
Just use [wiki]Sector_SetLink[/wiki].
On the left is an elevator made of several sectors, and on the right is the control sector:
Tag the elevator sectors 10. Tag the control sector 15.
Put the Sector_SetLink special on one of the control sector's lines, with arguments (0, 10, 0, 1). On another line of the control sector, do the same thing, but with arguments (0, 10, 0, 2).
This ACS will work for the elevator. Note that we're only moving the floor of the control sector here. This is because we linked the elevator's ceilings and floors to the control sector's floor.
I'm not sure if this is a perfect implementation - I think it would work better if you link the floors to floors and ceilings to ceilings, and use an elevator special, but haven't tried that. I'm just focusing on showing how to get Sector_SetLink working and seeing if anyone else with more knowledge says anything.
On the left is an elevator made of several sectors, and on the right is the control sector:
Code: Select all
_________
| ___ |
| |_| | _
|_______| |_|
Put the Sector_SetLink special on one of the control sector's lines, with arguments (0, 10, 0, 1). On another line of the control sector, do the same thing, but with arguments (0, 10, 0, 2).
This ACS will work for the elevator. Note that we're only moving the floor of the control sector here. This is because we linked the elevator's ceilings and floors to the control sector's floor.
Code: Select all
bool elevatorup = TRUE; // make sure to set this correctly
script 150 (void)
{
if(elevatorup)
{
Floor_LowerByValue(15, 10, 232);
elevatorup=FALSE;
}
else
{
Floor_RaiseByValue(15, 10, 232);
elevatorup=TRUE;
}
TagWait(15);
}
Re: multi-sector elevator question
I need help about this. I made a lift with 2 windows and I added the next script to the sectors:
Sector_SetLink(11,12,0,1);
(11 is the tag of the control sector, 12 is the tag of the window sectors)
However, I've tried a lot of combination of arguments, but when I activate the elevator, the ceiling of the control sector doesn't move. The window sectors are lower and raise as I want, but the ceiling of the control sector doesn't move, only the floor. What should I do? I'll become angry...
Sector_SetLink(11,12,0,1);
(11 is the tag of the control sector, 12 is the tag of the window sectors)
However, I've tried a lot of combination of arguments, but when I activate the elevator, the ceiling of the control sector doesn't move. The window sectors are lower and raise as I want, but the ceiling of the control sector doesn't move, only the floor. What should I do? I'll become angry...
- Kappes Buur
-
- Posts: 4171
- Joined: Thu Jul 17, 2003 12:19 am
- Graphics Processor: nVidia (Legacy GZDoom)
- Location: British Columbia, Canada
- Contact:
Re: multi-sector elevator question
For examples of Sector_SetLink, several maps in Rex's PARANOID make use of it, for example map 7.
Look for
sector tag 193, the Sector_SetLink control sector
sector tags 176, 192 and 191, the 3D control sectors for the elevator platform


and the corresponding script on lines 93, 94, and 95 linking the 3D control sectors.
Activation of the platform is through script 22.
Look for
sector tag 193, the Sector_SetLink control sector
sector tags 176, 192 and 191, the 3D control sectors for the elevator platform


and the corresponding script on lines 93, 94, and 95 linking the 3D control sectors.
Activation of the platform is through script 22.