Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!
Difference between revisions of "func button"
From Quake Wiki
m (→Settings: settings to attributes) |
Gorgsenegger (talk | contribs) m (Improved todo comment) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:func_button}} | {{DISPLAYTITLE:func_button}} | ||
+ | |||
+ | {{Infobox_entity | ||
+ | | classname = func_button | ||
+ | | commonname = Button | ||
+ | | type = solid | ||
+ | | class = [[Func (entity class)|func]] | ||
+ | | dimensions = variable | ||
+ | | quakec = [[buttons.qc]] | ||
+ | | precaches = | ||
+ | * buttons/airbut1.wav | ||
+ | * buttons/switch21.wav | ||
+ | * buttons/switch02.wav | ||
+ | * buttons/switch04.wav | ||
+ | }} | ||
The '''func_button''' is a solid entity that is used to create a physical button in the level that triggers events when the player touches it. Unlike the trigger_once and trigger_multiple entities, the func_button is visible and normally used in situations where the designer wants the player to see the button, such as for an elevator button. However, func_button is sometimes used in places that it's difficult for the player to see, such as on the floor to trigger [[traps]], or quite commonly as a means to open a [[secret area]] where it must be shot. | The '''func_button''' is a solid entity that is used to create a physical button in the level that triggers events when the player touches it. Unlike the trigger_once and trigger_multiple entities, the func_button is visible and normally used in situations where the designer wants the player to see the button, such as for an elevator button. However, func_button is sometimes used in places that it's difficult for the player to see, such as on the floor to trigger [[traps]], or quite commonly as a means to open a [[secret area]] where it must be shot. | ||
+ | |||
+ | ==Usage== | ||
+ | The [[Button tutorial]] has some examples of the creation and use of the func_button entity. | ||
+ | {{todo|user=Gorgsenegger|todo=Create a func_button tutorial!}} | ||
==Attributes== | ==Attributes== | ||
Line 7: | Line 25: | ||
===Keys=== | ===Keys=== | ||
− | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
− | | ! bgcolor="#eeeeee" width=" | + | | ! bgcolor="#eeeeee" width="100" | ''targetname'' |
+ | | The targetname of the button. Since the button is a trigger itself, this is generally used for killing the button from another trigger. | ||
|- | |- | ||
− | | ! bgcolor="#eeeeee" | ''target'' | + | | ! bgcolor="#eeeeee" | ''target'' |
+ | | The targetname of the entity that will be triggered when the button is pressed. | ||
|- | |- | ||
− | | ! bgcolor="#eeeeee" | ''killtarget'' | + | | ! bgcolor="#eeeeee" | ''killtarget'' |
+ | | The targetname of the entity that will be killed when the button is pressed. | ||
|- | |- | ||
− | | ! bgcolor="#eeeeee" | ''wait'' | + | | ! bgcolor="#eeeeee" | ''wait'' |
+ | | Time after pressing the button for it to reset and be pushable again. Setting this to -1 will cause the button to stay pressed. | ||
|- | |- | ||
− | | ! bgcolor="#eeeeee" | ''delay'' | + | | ! bgcolor="#eeeeee" | ''delay'' |
+ | | Time after pressing the button before triggering its targets. | ||
|- | |- | ||
− | | ! bgcolor="#eeeeee" | ''speed'' | + | | ! bgcolor="#eeeeee" | ''speed'' |
+ | | The movement speed of the button. | ||
|- | |- | ||
− | | ! bgcolor="#eeeeee" | ''lip'' | + | | ! bgcolor="#eeeeee" | ''lip'' |
+ | | An offset added to the default movement distance that allows the designer to adjust the amount the button sticks in or out after being pressed. | ||
|- | |- | ||
− | | ! bgcolor="#eeeeee" | ''health'' | + | | ! bgcolor="#eeeeee" | ''health'' |
+ | | If set to any value above 0, the button will only be activated by shooting it or hitting it with the axe. Often used for buttons that open secrets. | ||
|- | |- | ||
− | | ! bgcolor="#eeeeee" | ''message'' | + | | ! bgcolor="#eeeeee" | ''message'' |
+ | | A message to display when the button triggers. | ||
|} | |} | ||
===Spawnflags=== | ===Spawnflags=== | ||
− | + | func_button supports standard [[Entity#Spawnflags|spawnflags]] for difficulty and deathmatch presence. | |
+ | {{Template:Mode_spawnflags | ||
+ | | entity = The button | ||
+ | }} | ||
+ | |||
+ | ==Definitions== | ||
+ | |||
+ | ===FGD Definition=== | ||
+ | This is the format used by [[TrenchBroom]] and [[Worldcraft]]. Note that the model(...) parameter is not supported by Worldcraft. This does not include the base class definition, which may also be required. | ||
+ | <pre> | ||
+ | [ code from entity entry in an .fgd file goes in here ] | ||
+ | </pre> | ||
+ | ===DEF Definition=== | ||
+ | This is the definition format used for most old Quake editors, including the original [[QuakeEd]]. | ||
+ | <pre> | ||
+ | [ code from entity entry in a .def file goes in here ] | ||
+ | </pre> | ||
+ | |||
+ | [[Category:Quake entities]] |
Latest revision as of 09:57, 10 October 2020
func_button | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
The func_button is a solid entity that is used to create a physical button in the level that triggers events when the player touches it. Unlike the trigger_once and trigger_multiple entities, the func_button is visible and normally used in situations where the designer wants the player to see the button, such as for an elevator button. However, func_button is sometimes used in places that it's difficult for the player to see, such as on the floor to trigger traps, or quite commonly as a means to open a secret area where it must be shot.
Contents
Usage[edit]
The Button tutorial has some examples of the creation and use of the func_button entity.
Gorgsenegger added a To-Do; Create a func_button tutorial!. |
Attributes[edit]
In addition to the settings listed below, the func_button can be made to move up or down by setting its angle to -1 (up) or -2 (down).
Keys[edit]
targetname | The targetname of the button. Since the button is a trigger itself, this is generally used for killing the button from another trigger. |
target | The targetname of the entity that will be triggered when the button is pressed. |
killtarget | The targetname of the entity that will be killed when the button is pressed. |
wait | Time after pressing the button for it to reset and be pushable again. Setting this to -1 will cause the button to stay pressed. |
delay | Time after pressing the button before triggering its targets. |
speed | The movement speed of the button. |
lip | An offset added to the default movement distance that allows the designer to adjust the amount the button sticks in or out after being pressed. |
health | If set to any value above 0, the button will only be activated by shooting it or hitting it with the axe. Often used for buttons that open secrets. |
message | A message to display when the button triggers. |
Spawnflags[edit]
func_button supports standard spawnflags for difficulty and deathmatch presence.
Flag | Common Name | Description |
---|---|---|
256 | Not on Easy | The button will not spawn on Easy difficulty. |
512 | Not on Normal | The button will not spawn on Normal difficulty. |
1024 | Not on Hard | The button will not spawn on Hard difficulty. |
2048 | Not in Deathmatch | The button will not spawn in Deathmatch mode. |
Definitions[edit]
FGD Definition[edit]
This is the format used by TrenchBroom and Worldcraft. Note that the model(...) parameter is not supported by Worldcraft. This does not include the base class definition, which may also be required.
[ code from entity entry in an .fgd file goes in here ]
DEF Definition[edit]
This is the definition format used for most old Quake editors, including the original QuakeEd.
[ code from entity entry in a .def file goes in here ]