Jump to content

Home

"func_usable" - gah!


AKPiggott

Recommended Posts

Now, I can't remember who posted this little tutorial and I can't find the thread, so they'll just have to live with it....

 

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

A 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 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 angle of the brush (180, 90 etc) so angle arrow points 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.

 

Only thing is, the TOGGLE does not exist in JK2radient. Plus, each button only switches between the 'off' state and the 'on' state when the button is pressed; I'm trying to find out how to make it switch automatically from 'on' to 'off' after the button is used....

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...