Jump to content

Home

Buttons


B0MBER II

Recommended Posts

I know how to make simple buttons but all the tutorials I have looked at didn't show me how to make the buttons that light up instead of getting pushed in.

 

Can anyone TEACH me how to make those buttons are is this post gonna have 4 replys, 56 views and 2 replys by me bumpin it up?

Link to comment
Share on other sites

This is how I create buttons for doors and force fields.

This method can likely work with lifts too.

 

 

Basic door with button:

Step 1:

Create your walls and door with brushes

Assigned 'func_door' to the brush you want as the door

CHECK the 'TOGGLE' checkbox

Give the door brush a texture

Create a 'targetname' key with a 'door1' value

 

Step 2:

Create a new brush for your "off state button"

Set the button brush to a 'func_usable'

Size and position the button on the wall (or wherever)

Give the button a 'kejim/switch' texture

Press "S" to edit the texture, use the 'Fit' button near 'Axial'

Create a 'targetname' key with a 'door1' value (like door brush)

 

Step 3:

Select your "off" state button and clone it

Place the new "on" state button in the exact same place as the "off" state button

Give the new "on" state button a 'kejim/switch_on'

Press "S" to edit the texture, use the 'Fit' button near 'Axial'

CHECK the 'STARTOFF' checkbox

Create a 'targetname' key with a 'door1' value (like door and off state brush)

 

Step 4:

Create a new brush slightly overlap and near the switch brushes

Set the classname to 'trigger_multiple'

Give the new brush a 'system/trigger' texture

Position and size the brush where you'd stand to press switch

Set the angle of the brush; like 180, 90 etc. so the angle arrow points some direction in the XY Top view

CHECK the 'PLAYERONLY' checkbox

CHECK the 'FACING' checkbox

CHECK the 'USE_BUTTON' checkbox

Create a 'target' key with a 'door1' value

Create a 'wait' key with a '1' value

 

 

Compile map and test.

 

This is just one basic framework of a door and button. It can be used on force fields too, and 'func_wall' brushes as well. And one can of course change the settings to obtain different results from a door/field/lift. But if you use a 'wait' key on the 'func_door' brush, the door will close after it is opened automatically. To keep a door up till the button is pressed again, do not use a 'wait' key on the door brush.

 

To use a supply key on a door with a button, just use the checkbox 'LOCKED' and 'GOODIE'. If the door texture supports it, it will change colors on use. The 'GOODIE' will check if you have a supply key from a Commander/Officer NPC. That NPC you want to have a supply key would have a key of 'message' and a value of 'goodie'. I think, but am not sure, but once a goodie key is used on a goodie door, another supply key (goodie) must be obtained for the next closed 'GOODIE' door(s) on a map.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...