Button/Switch

Status
Not open for further replies.

TheDoctor

Member
I tried searching the wiki, but found nothing on this topic. A button/switch that moves things, such as F.O.Fs or sectors.

This button can be found in Techno Hill Zone act 2, but I don't know how to open that map file (When I open srb2.srb then I can only open map01). The same buttons can be found in the SRB1 remake maps. I am wondering how to make such a button that changes the height of a FOF or sector, or how to make such a button that changes the position of a FOF or sector.
 
If you want to look at the stage, open zones.dta, otherwise you'll have to wait before someone who knows 'bout this stuff comes along.
 
I opened the zones.dta and found the map that was needed and found how how to do it. Like Ice posted, thats basically how to do it. The only problem with those links are that they don't explain how to make the button move another sector along with the button (which I figured out how to do just right before Ice posted [thanks anyways btw, it would have helped if I didn't figure it out by then]). So, here is a mini-torial in case others are also wondering:

Make a normal sector with the sector type 80 applied to it and give it a sector tag (for this mini-torial I will use 1.) then make the sector that you want the button to move and give it a sector tag (2). Make two sectors outside the thok barrier and make one of them have linedef 302 (once) and make the linedef be applied to sector tag 1 (in this case). Then make another linedef of 403 (Move tagged Sector to floor). This will make it (as stated in the link ice posed) make the button go up/down to the control sector's floor height. Now to make the button affect another sector along with the button, repeat the same step to make the button go up/down but change the sector tag applied to the linedef 302 (once) to 2 (to make the sector taged with 2 to change it's height to that sector's floor).
 
Here's an explanation:
My way of making the buttons.
1) You make a button sector and add the sector effect 80 "Trigger Line Ex.(Floor Touch)" and add a new tag to it. This will be the target sector.
vqk42e.png

302t05c.png

igi8h0.png


2) Then you create a control sector and add the linedef effect 302 "Linedef Executor: Once" (you only need this to use the button once if you want it to serve for first and final purpose) then tag this to the target sector (the red button sector).
29vmjp3.png

On another linedef on the control sector, add the linedef effect 403 "Linedef Executor (plane movement): Move Tagged Sector's Floor" and tag this to the same red button, if you want this linedef to work you must adjust the floor height of the control sector to what you want the height to be when it is stepped on - since it's a button you're making you will decrease the floor height so make the control sector floor height less than the target sector floor height. (I don't think you need anymore images for this)

3) Now create an invisible intangible FOF control sector and tag the linedef to the red button target sector, make the top height of the FOF the same height of the target sector (the bottom height doesn't really matter but make it lower than the top height by at least 16 fracunits or more). Now add a new tag to the fof control sector (not the linedef, the sector) and add the sector effect 64 "Trigger Line Ex.(Anywhere in Sector)", this can be used by any trigger to create an effect when the player touches this FOF in-game, this is what makes the button have a action when it's going down. However in this case it will be used by the trigger linedef 403 "Linedef Executor (plane movement): Move Tagged Sector's Floor". This trigger linedef will be set up on the another control sector it will be tagged to this GFZ block (this is a new sector I created by the way also make sure that you set the floor height to this block when using linedef 403):
qq3ixj.png

(the gfz block where the cursor is pointing)
The plan is to make the GFZ block go down when you step on the button so we will add another lindef executor to one of the free linedefs on the new trigger control sector: 302 "Linedef Executor: Once", tag this to the FOF itself.

Now the whole thing should work, try testing it out (if you followed what I said) and take a look at...
This
 
Yeah I learned how to make a button when I posted the message above yours that was posted a week ago, but thanks anyways, love the pictures :P.
 
Yeah I learned how to make a button when I posted the message above yours that was posted a week ago, but thanks anyways, love the pictures :P.
Whoops, oh well this is just the way I make the basic ones. (although the button itself is usually a fof)
 
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top