func_button
< Ru
Jump to navigation
Jump to search
![]() |
---|
CBaseButton |
![]() |
func_button
- это брашевая энтити , доступно для всех игр на движке Source.
This translated page needs to be updated.
You can help by updating the translation.
Also, please make sure the article tries to comply with the alternate languages guide.Она разработана, чтобы создавать используемые игроком кнопки. При использовании игроком она принимает вид нажатой кнопки. Для примера, func_button используется для создания клавишной панели .

Нужно сделать: This template is currently using deprecated suf or {{Lang}}-based translations. Please use the main {{Code class}} instead, which uses {{Autolang}}.
Keyvalues
- Move Direction (Pitch Yaw Roll) (movedir) <angle >
- Specifies the direction of motion to move when the button is used.
- Speed (speed) <целое число >
- The speed that the button moves, in units per second.
- Health (Obsolete) (health) <целое число >
- Legacy method of specifying whether or not the button can be shot to activate it. Use the Damage Activates spawnflag instead.
- Lip (lip) <целое число >
- The amount, in inches, of the button to leave sticking out of the wall it recedes into when pressed. Negative values make the button recede even further into the wall.
- Master (Obsolete) (master) <строка >
- Legacy support: The name of a master entity. If the master hasn't been activated, this button cannot be pressed.
- Sounds (sounds) <варианты выбора>
- Make this button emit a sound when pressed.
Примечание:The list below was made for Half-Life 2. All games support this keyvalue, but some don't have a number of these sound files. To edit these sounds, look for
Buttons.snd
(followed by a number from the Value column in this table) inhl2/scripts/game_sounds_world.txt
or your game's appropriate Soundscript file.
Значение Описание ExpandЗвук по умолчанию
- Delay Before Reset (-1 stay) (wait) <целое число >
- Amount of time, in seconds, after the button has been pressed before it returns to the starting position. Once it has returned, it can be used again. If the value is set to -1, the button never returns.
- Locked Sound (locked_sound) <варианты выбора>
- Sound played when the player tries to use the button, and fails because it's locked.
Значение Описание ExpandЗвук по умолчанию
- Unlocked Sound (unlocked_sound) <варианты выбора>
- Sound played when the button is unlocked.
Подтвердить:doesn't seem to work?
Значение Описание ExpandЗвук по умолчанию
- Locked Sentence (locked_sentence) <варианты выбора>
- A sentence played when the player tries to use the button, and fails because it's locked.
Значение ExpandОписание
- Unlocked Sentence (unlocked_sentence) <варианты выбора>
- A sentence played when the button is unlocked.
Значение ExpandОписание
- Glow Entity (glow) <целевой объект > (Во всех играх начиная с
)
- The name of an entity that will get a +use glow for this button.

- Use Look-At Limit (min_use_angle) <строка > (Во всех играх начиная с
)
- Limit the usable look-at angle. -1 is looking directly away, 0 is looking perpendicular, 1 is looking directly at. To allow a deviation of at most 45°, insert cos(45°) ≈ 0.7071 or for 5° use cos(5°) ≈ 0.9962 (see dot product ).
См. также: Generic Keyvalues, Inputs and Outputs available to all entities
- Name (targetname) <объект источник >
- Имя энтити, по которому другие энтити могут ссылаться на этот объект.
Flags
Don't move : [1]
Toggle : [32]
Touch Activates : [256]
Damage Activates : [512]
Use Activates : [1024]
Starts locked : [2048]
Sparks : [4096]
Non-solid : [16384]
Template:CSGO add Template:GMOD also
Inputs
- Lock
- Lock the button, preventing it from functioning.
- Unlock
- Unlock the button, allowing it to function.
- Press
- Activate the button as if it was pressed.
- PressIn
- Activate the button as if it was pressed, sending it to the bottom position.
- PressOut
- Unpress the button, sending it to the top position.
Outputs
- OnDamaged
- Fired when the button is damaged.
- OnPressed
- Fired when the button is pressed.
- OnUseLocked
- Fired when the button is used while locked.
- OnIn
- Fired when the button reaches the in/pressed position.
- OnOut
- Fired when the button reaches the out/released position.