12-Jul-2023
A brush entity, which can be triggered by the player by issuing his 'Use'-command on it while standing next to it and looking at it. This is a rotating variant of the func_button which can be used to create rotating interactable objects like levers or valves. The origin brush is required for this entity, around which func_rot_button rotates.
Keyvalues |
OnDestroy Function ondestroyfn : Name of the function to use from already parsed .as script files when entity is destroyed (killed) in any way. If the function belongs to namespace, you must use prefix with the namespace name (e.g. mynamespace::MyFunction) for the keyvalue.
Name targetname : Set name of func_rot_button so other entities can trigger it to press/toggle it. Every trigger use-type works uniformly. Can be kill-targeted.
Target target : Entity to trigger when func_rot_button gets pressed. Trigger use-type is defined in "Use Type" keyvalue.
Global Entity Name globalname : Global name of entity, allows to have one entity in the multiple maps (e.g. elevator in map1 and map2 have the same "Global Entity Name" which tells the engine to treat those entities as a one single entity, so all elevator settings, positions, actions e.t.c. are copied to another map in a moment of map transitions.
Inventory: Need item(s) item_name_required : Item(s) (names separated by spaces) required to use this entity. Refers to "Item name" value of item_inventory.
Inventory: Need item(s) from group(s) item_group_required : Groups (separated by spaces), in which carried items belong to, required to use this entity. Refers to "Item group name" value of item_inventory.
Inventory: Item count in group need have (0 = all) item_group_required_num : Minimal number of items, that belong to specified group, required to use this entity. Use with "Inventory: Need item(s) from group(s)" keyvalue. Value of '0' means that all items from current group are required.
Inventory: CAN'T have item item_name_canthave : Items in player inventory that will fail the test, and disallow usage of this entity. Refers to "Item name" value of item_inventory.
Inventory: CAN'T have item from group item_group_canthave : Items in player inventory, which belong to specified group, that will fail the test, and disallow usage of this entity. Refers to "Item group name" value of item_inventory.
Inventory: Item count in group CAN'T have (0 = all) item_group_canthave_num : Minimal number of items in player inventory, which belong to specified group, that will fail the test, and disallow usage of this entity. Refers to "Item group name" value of item_inventory. Value of '0' means no single item from current group should be equipped to pass the test.
On pass: Ignore item's on use triggers? pass_ignore_use_triggers : If set to 'Yes' item's trigger targets from 'Target: On use (by trigger)' will not be triggered when item is used by this entity.
On pass: Drop item(s) pass_drop_item_name : Items to force-drop when the test result is positive, and entity is used successfully. Refers to "Item name" value of item_inventory. Multiple item names are separated by spaces.
On pass: Drop item(s) from group(s) pass_drop_item_group : Items to force-drop, that belong to specified group, when the test result is positive and entity is used successfully. All items from this group will be dropped. Refers to "Item group name" value of item_inventory. Multiple item names are separated by spaces.
On pass: Ignore item's on drop triggers? pass_ignore_drop_triggers : If set to 'Yes' item's trigger targets from "Target: On drop" will not be triggered when item is dropped by this entity with "Drop items(s)" events above.
On pass: Return item(s) pass_return_item_name : Items to return to their starting positions when test result is positive. Refers to "Item name" value of item_inventory. Multiple item names are separated by spaces.
On pass: Return item(s) from group(s) pass_return_item_group : Items, that belong to specified group, to return to their starting positions when test result is positive. All items from this group will be returned. Refers to "Item group name" value of item_inventory. Multiple group names are separated by spaces.
On pass: Ignore item's on return triggers? pass_ignore_return_triggers : If set to 'Yes' item's trigger targets from "Target: On return" will not be triggered when item is returned by this entity with "Return items(s)" events above.
On pass: Destroy item(s) pass_destroy_item_name : Items to remove when test result is positive. Refers to "Item name" value of item_inventory. Multiple item names are separated by spaces.
On pass: Destroy item(s) from group(s) pass_destroy_item_group : Items, that belong to specified group, to remove when test result is positive. All items from this group will be removed. Refers to "Item group name" value of item_inventory. Multiple group names are separated by spaces.
On pass: Ignore item's on destroy triggers? pass_ignore_destroy_triggers : If set to 'Yes' item's trigger targets from "Target: On Destroy" will not be triggered when item is destroyed by this entity with "Destroy items(s)" events above.
Target: Inventory rules failed target_on_fail : Entity to trigger whenever test result is negative.
Render FX renderfx : Set custom render FX effect. Only works when "Render Mode" is set to different than 'Normal'
Render Mode rendermode : Render mode determines how this entity is rendered.
FX Amount (1 - 255) renderamt : Render amount to use when other than "Render Mode" 'Normal' is used.
FX Color (R G B) rendercolor : Used with "Render Mode" 'Color' and 'Glow' to set color. Also sets color of 'Glow Shell' "Render Mode".
Pitch Yaw Roll (X Y Z) angles : Where Z means Y and Y means Z, that is, when you're thinking Hammer-grid. (Hammer uses Z for height and Y for depth, while every other sane 3D-application does this the other way round; nonetheless this keyvalue description has the letters in the conventional order) This, technically, is a 3D-vector containing Euler-angles to describe either the entity's rotation or direction of effect. E.g. a func_door_rotating will use this as its initial rotation, while a trigger_push will keep its original alignment and use this for the direction of its push-effect instead. Euler-angles are a hierarchical system to determine an object's orientation in 3D-space. A yaw-value of 0 would mean the entity would face east. (right in top-down view) 90 would mean it would face north. (up in top-down-view) After yaw, pitch is applied. Think aiming up/down with your character in first person. At last, the roll-value is applied. Think your character falling over sideways in first person. Some entities, mostly point entities, do not use the angles keyvalue for any purpose.
ZHLT Template Model Target zhlt_usemodel : For Brush entities: sets brush model template of this entity. Set it to the name of other brush entity (now called a template) and it's brush model will be used instead. Templates might save server resources by "copying" single brush entity (template identified by name) and using it in multiple places (can be used for entities like tables, columns, barrels, cars e.t.c.). Also one template occupies only one entity slot when compiling a map, no matter how many entities refers to it. For model-based point entities: copy display model of specified entity, to use it's model instead. Using "Custom model" is more appropriate in most cases, however, when it's not possible, use "ZHLT Copy Lighting From Target".
ZHLT Copy Lighting From Target zhlt_copylight : For Brush entities: copies light info from specified entity. This can be useful when we want this entity to be light up in a similar way the other entity of the map is, e.g. we have few func_pushables on map, and they are lit differently, tough they can be moved (and lightning is not updated on dynamic entities), it may looks shabby. With this keyvalue we can prevent this making all func_pushables received light in a same way. Another example: we have few windows in corridor (e.g. func_breakables), all of them receive a light in acceptable way, but the last window receive part of the light from another room and breaking whole atmosphere. We can set this window "Copy Lightning From Target" to any other window to fix this. Note that this can be also used for completely different entities, so we copy lightning from func_door to func_breakable as well. For model-based point entities: if model lightning does not satisfy you (e.g. it's too dark) you can specify a name of entity here to copy it's lightning values- it can be other model-based entity or simply info_target.
ZHLT Disable Clipping zhlt_noclip : Enable or disable collision of entity.
ZHLT Invisible zhlt_invisible : Brush entities only. Determines if entity should be visible.
ZHLT Custom Shadow (when opaque) zhlt_customshadow : Opaque brush entities only. If "ZHLT Ligth Flags" of this entity uses any of the option with 'Opaque' word, this will allow to customize shadow dropped by this entity. Value format: [0 - 1.0] [0 - 1.0] [0 - 1.0], use three values for color or only one for transparency.
ZHLT Embed Light Map (when translucent) zhlt_embedlightmap : Transparent brush entities only. Set it to 'Yes' and this transparent entity will take a light from environment making it looks much more natural. Use it when entities (e.g. glass represented by func_wall) omits lightning from surrounding. Note that this is expensive so shouldn't be used too often, but resolution of those lightmaps can be controlled by keyvalue explained below.
ZHLT Embed Light Map Resolution zhlt_embedlightmapresolution : Value of power of two that controls the resolution of embedded lightmaps of transparent textures (see keyvalue above). Higher value for better optimization. Default and recommended value is 4.
ZHLT Light Flags zhlt_lightflags : Brush entities only. Changes light casting or receiving setting.
ZHLT Light Origin Target light_origin : Set it to the name of info_target, this entity will receive lights from specified info_target position instead of it's own position. As a lot of entites can moves and lightning is not updated dynamically you can choose how your entity will be lit in game (e.g. elevators, pushables e.t.c.). Now you don't need to put the whole entity in the well-lit room at map start to make them look desirable.
Locked Sound locked_sound : Sound to play when a player tries to use the func_rot_button but it's locked because it has a targetname or uses a multisource entity.
Unlocked Sound unlocked_sound : Sound to play if func_rot_button is pressed/touched while not locked.
Locked Sentence locked_sentence : Sentence to play when a player tries to use func_rot_button but it's locked because it has a targetname or uses a multisource entity. Sentences are picked from sound/default_sentences.txt file.
Unlocked Sentence unlocked_sentence : Sentence to play when the door is opened. Plays only few times.
Locked Sound Override locked_sound_override : Sound file to use when attempting to open locked func_rot_button. Useful when you don't want to use sound from default sound list. This overrides default "Locked Sound" sound. Note that other sounds format (AIFF, ASF, DLS, FLAC, IT, M3U, MID, MOD, MP2, MP3, OGG, S3M, VAG, WMA, XM) can be used, even if editor sound browser allows to pick only WAV files.
Unlocked Sound Override unlocked_sound_override : Sound file to use when func_rot_button opens. Useful when you don't want to use sound from default sound list. This overrides default "Unlocked Sound" sound. Note that other sounds format (AIFF, ASF, DLS, FLAC, IT, M3U, MID, MOD, MP2, MP3, OGG, S3M, VAG, WMA, XM) can be used, even if editor sound browser allows to pick only WAV files.
Locked Sentence Override locked_sentence_override : Sentence from "default_sentences.txt" or custom sentences file (which can be added in map properties) to use when attempting to open locked func_rot_button. Useful when you want to override locked sentence with your own sentence.
Unlocked Sentence Override unlocked_sentence_override : Sentence from "default_sentences.txt" or custom sentences file (which can be added in map properties) to use when func_rot_button opens. Useful when you want to override locked sentence with your own sentence.
ChangeTarget Name changetarget : Non-functional keyvalue. If specified, it supposed to change this func_rot_button's target's "Target" field to the name specified in "ChangeTarget Name" of this func_rot_button.
Master master : Name of the multisource entity that (temporary) disables this func_rot_button. If master is specified the func_rot_button won't work. When multisource entity is triggered/being triggering by all possible inputs, the func_rot_button will be enabled and ready to be pressed. When multisource lost at least one input signal, the entities becomes disabled again.
Speed speed : Speed at which the button rotates (around z axis by default) when pressed.
Health (shootable if > 0) health : If you enter here value higher than 0, the button becomes shootable only, and can be activated when it's out of health.
Sounds sounds : Set the sound to be played when the button is pressed. It will play when the button is locked, too.
Sound Override noise : Custom sound, that overrides default sound from "Sounds" list to play when the button is pressed. It will play when the button is locked, too.
Delay before reset wait : When the button is pressed, it will remain in its pressed state for this amount of time. This also affects any toggleable textures on it. If set to '-1', the button can be pressed only once, and will then remain in its pressed state forever. If a multisource entity is among the func_rot_button's targets, that multisource entity will recognize the button's input to be active only for this amount of time.
Delay before trigger delay : Delay before triggering entity specified in "Target".
Distance (deg) distance : How many degrees the button rotates around it's origin axis (z axis by default). Can be negative.
_minlight _minlight : Sets the minimum light level. Set this value if entity is too dark on compiled map. Also useful for things like computer screens or holograms. Default is 0, max 1.
Use Type use_type : Set the use-type with which the button will trigger its targets. Default is 'Toggle'.
1 : Not solid : Turns solidity of this entity off.
2 : Reverse Dir : Reverses the direction of rotation. The same effect is given by making "Distance" value negative.
32 : Toggle : If set, this func_rot_button will ignore its delay before reset and be toggleable instead, switching between the texture states whenever pressed, if such a texture is assigned on one of its faces. The delay before reset still needs to be greater than zero in order for this to work, though.
64 : X Axis : If set, this will rotate around the x-axis.
128 : Y Axis : If set, this will rotate around the y-axis.
256 : Touch Activates : If set, this func_rot_button can be activated by touching it. This disables activating per use-key.
2048 : Not in Deathmatch : Obsolete in Sven Co-op. Makes the entity don't appear in Multiplayer Games.
Using "X-axis" flag causes sparks at world origin due to conflict with flag 64 of func_button.