Page 1 of 1
multi-sector elevator question
Posted: Thu May 28, 2009 4:01 pm
by theDooMguy47
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
Posted: Thu May 28, 2009 4:22 pm
by Ceeb
Stick it in a dummy sector, have the dummy sector move with the elevator.
Re: multi-sector elevator question
Posted: Thu May 28, 2009 5:37 pm
by theDooMguy47
uhh...put what in the dummy sector?
Re: multi-sector elevator question
Posted: Thu May 28, 2009 5:51 pm
by Ceeb
...Oh, I'm sorry. I think I misread it.
What do you want to do? Make your dummy-sectored switches stay where they are?
Re: multi-sector elevator question
Posted: Thu May 28, 2009 7:08 pm
by Xaser
[wiki]Sector_SetLink[/wiki].
Re: multi-sector elevator question
Posted: Thu May 28, 2009 9:13 pm
by Amuscaria
Xaser wrote:[wiki]Sector_SetLink[/wiki].
Can anyone post a simple example wad on how this works? I can't seem to get it to link right.
Re: multi-sector elevator question
Posted: Thu May 28, 2009 9:46 pm
by theDooMguy47
neither can I. The likned sectors don't move at all
Re: multi-sector elevator question
Posted: Thu May 28, 2009 9:48 pm
by Ceeb
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.
Re: multi-sector elevator question
Posted: Thu May 28, 2009 10:00 pm
by Macil
If something blocks the elevator, then the sectors will desync completely with that method.
Re: multi-sector elevator question
Posted: Thu May 28, 2009 10:23 pm
by theDooMguy47
well, at this point I think I'll just use ceiling/floor raise/lower. That'll do what I want.
Re: multi-sector elevator question
Posted: Thu May 28, 2009 10:51 pm
by Macil
Just use [wiki]Sector_SetLink[/wiki].
On the left is an elevator made of several sectors, and on the right is the control sector:
Code: Select all
_________
| ___ |
| |_| | _
|_______| |_|
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.
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);
}
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.
Re: multi-sector elevator question
Posted: Fri May 06, 2011 9:40 am
by Katamori
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...
Re: multi-sector elevator question
Posted: Sat May 07, 2011 5:48 pm
by Kappes Buur
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.