Rotating Button: Difference between revisions
Jump to navigation
Jump to search
Confirm:Is this part unfinished ? This section shouldn't have any purpose at its current stage.
Gaijinviking (talk | contribs) (Created page with "Image:Button Normal2.png ---- ==Introduction== In HL2, EP1, EP2; players occasionally encounter a scenario, where they must toggle a (rotating) button to achieve an effe...") |
Le Glaconus (talk | contribs) (formatting) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
[[ | {{Multiple issues| | ||
{{Orphan|date=May 2025}} | |||
}} | |||
[[File:Button Normal2.png]] | |||
{{toc-right}} | |||
==Introduction== | ==Introduction== | ||
In | In {{hl2|4}}, {{ep1|4}}, {{ep2|4}}; players occasionally encounter a scenario, where they must toggle a (rotating) button to achieve an effect or progress in the game. | ||
toggle a (rotating) button to achieve an effect or progress in the game. | This page will describe steps on how to build a functional '''Rotating Button''' prop for use in your custom map, where: | ||
This page will describe steps on how to build a functional '''Rotating Button''' prop for | |||
use in your custom map, where: | |||
* The player can + | * The player can {{mono|[[Use|+use]]}} the button object and it will turn to the ON position. | ||
* With the ''Toggle'' flag option | * With the '''Toggle''' flag option ''checked'', the player can repeat the {{mono|+use}} action and the button object will turn back to the OFF position. | ||
* With the ''Toggle'' flag option | * With the '''Toggle''' flag option ''unchecked'', the button object will automatically return to the OFF position. | ||
== Required entities and objects == | == Required entities and objects == | ||
A) '''{{ent|func_rot_button}}''' (''This is a [[brush entity]].'') | |||
: | :# Create a new texture brush on your map. | ||
: | :# Use your editor's 'MOVE SELECTED TO:' feature to convert the brush from ''World'' to ''Entity''. | ||
: | :# Set the entity's class as a {{ent|func_rot_button}}. | ||
: | :# Name the entity "{{code|func_for_bttn}}". | ||
: | :# Select and apply the brush-texture: "{{code|tools/toolsinvisible}} to the entity. | ||
: | :# Set the following flags | ||
::* '''Not Solid''' ''Checked'' | ::* '''Not Solid''' ''Checked'' | ||
::* '''Toggle''' ''Unchecked (optional)'' | ::* '''Toggle''' ''Unchecked (optional)'' | ||
Line 27: | Line 29: | ||
::* '''Use Activates''' ''Checked'' | ::* '''Use Activates''' ''Checked'' | ||
B) '''{{ent|prop_dynamic}}''' (''This is a [[point entity]] (Button prop).') | |||
: | :# Place a new {{ent|prop_dynamic}} entity on your map. | ||
: | :# Select its world model as: {{path|props_citizen_tech/firetrap_button01a|mdl|icon=file}} | ||
: | :# Name the entity "{{code|bttn}}" | ||
: | :# Select its Parent as "{{code|func_for_bttn}}" | ||
C) '''{{ent|prop_static}}''' (''This is a [[point entity]] (Button pad prop)'') | |||
: | :# Place a new {{ent|prop_static}} entity on your map. | ||
: | :# Select its world model as: {{path|props_citizen_tech/firetrap_buttonpad|mdl|icon=file}}. | ||
== Set Inputs/Outputs (I/O) == | == Set Inputs/Outputs (I/O) == | ||
# Set the following output trigger(s) in the "{{code|func_for_bttn}}" brush's [[Inputs and Outputs|I/O]]. | |||
:{| border=1 cellpadding="2" cellspacing="1" | |||
|- align=left style="background:#DCDCDC; color:black" | |||
! | |||
! My Output > !! Target Entity !! Target Input !! Parameter !! Delay !! Only Once | |||
|- | |||
| [[File:Io11.png]] || OnPressed || {{mono|bttn}} || SetAnimation || || 0 || No | |||
|} | |||
{{confirm|Is this part unfinished ? This section shouldn't have any purpose at its current stage.}} | |||
==Place, Align, and Group the objects== | ==Place, Align, and Group the objects== | ||
Follow these steps: | Follow these steps: | ||
*Center the origin of the prop_static entity ( the button pad). | *Center the origin of the {{ent|prop_static}} entity (the button pad). | ||
*Place the prop_dynamic entity | *Place the {{ent|prop_dynamic}} entity "{{code|bttn}}" into the desired position on the button pad. | ||
*Place " | *Place "{{code|bttn}}" and button pad into the desired position on the map (i.e equipment console or a wall). | ||
*Set the desired Pitch Yaw Roll | *Set the desired [[Pitch Yaw Roll]] values for entity "{{code|bttn}}". | ||
*Center the origin for | *Center the origin for '{{code|bttn}}". | ||
*Align " | *Align "{{code|bttn}}"'s origin with the {{ent|prop_static}}'s origin ''as close as possible''. | ||
*Place the momentary_rot_button brush entity | *Place the {{ent|momentary_rot_button}} brush entity "{{code|func_for_bttn}}" over "{{code|bttn}}", making sure that "{{code|func_for_bttn}}" completely encloses "{{code|bttn}}". Allow enough extension of "{{code|func_for_bttn}}" for the player to ''touch'' it. | ||
*Center the origin for " | *Center the origin for "{{code|func_for_bttn}}". | ||
*Align " | *Align "{{code|func_for_bttn}}"'s origin with "{{code|bttn}}"'s origin ''as close as possible''. | ||
*Set the | *Set the X and Y values for "{{code|func_for_bttn}}" equal to the X and Y values of "{{code|bttn}}". | ||
*Group all the objects. (You can also save the finished group as a | :{{note|If you move and/or re-orient these objects to a different position in the map, repeat this step.}} | ||
*Group all the objects. (You can also save the finished group as a [[prefab]] or [[instance]]) | |||
---- | |||
Credits : '''''"The PaperDog"''''' | |||
[[Category:Level Design]] | [[Category:Level Design]] |
Latest revision as of 17:33, 27 May 2025

This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages)

This article is an orphan, meaning that few or no articles link to it.
You can help by
adding links to this article from other relevant articles.
May 2025
You can help by

May 2025
Introduction
In Half-Life 2,
Half-Life 2: Episode One,
Half-Life 2: Episode Two; players occasionally encounter a scenario, where they must toggle a (rotating) button to achieve an effect or progress in the game.
This page will describe steps on how to build a functional Rotating Button prop for use in your custom map, where:
- The player can +use the button object and it will turn to the ON position.
- With the Toggle flag option checked, the player can repeat the +use action and the button object will turn back to the OFF position.
- With the Toggle flag option unchecked, the button object will automatically return to the OFF position.
Required entities and objects
A) func_rot_button (This is a brush entity.)
- Create a new texture brush on your map.
- Use your editor's 'MOVE SELECTED TO:' feature to convert the brush from World to Entity.
- Set the entity's class as a func_rot_button.
- Name the entity "func_for_bttn".
- Select and apply the brush-texture: "tools/toolsinvisible to the entity.
- Set the following flags
- Not Solid Checked
- Toggle Unchecked (optional)
- X Axis Checked
- Y Axis Checked
- Use Activates Checked
B) prop_dynamic (This is a point entity (Button prop).')
- Place a new prop_dynamic entity on your map.
- Select its world model as:
props_citizen_tech/firetrap_button01a.mdl
- Name the entity "bttn"
- Select its Parent as "func_for_bttn"
C) prop_static (This is a point entity (Button pad prop))
- Place a new prop_static entity on your map.
- Select its world model as:
props_citizen_tech/firetrap_buttonpad.mdl
.
Set Inputs/Outputs (I/O)
- Set the following output trigger(s) in the "func_for_bttn" brush's I/O.

Place, Align, and Group the objects
Follow these steps:
- Center the origin of the prop_static entity (the button pad).
- Place the prop_dynamic entity "bttn" into the desired position on the button pad.
- Place "bttn" and button pad into the desired position on the map (i.e equipment console or a wall).
- Set the desired Pitch Yaw Roll values for entity "bttn".
- Center the origin for 'bttn".
- Align "bttn"'s origin with the prop_static's origin as close as possible.
- Place the momentary_rot_button brush entity "func_for_bttn" over "bttn", making sure that "func_for_bttn" completely encloses "bttn". Allow enough extension of "func_for_bttn" for the player to touch it.
- Center the origin for "func_for_bttn".
- Align "func_for_bttn"'s origin with "bttn"'s origin as close as possible.
- Set the X and Y values for "func_for_bttn" equal to the X and Y values of "bttn".
Note:If you move and/or re-orient these objects to a different position in the map, repeat this step.
Credits : "The PaperDog"