Difference between revisions of "Func rot button"

From Sven Co-op
Jump to navigation Jump to search
(Import of converted entguide pages from Sven Manor.)
 
(Note about world origin sparks for flag 64)
 
(One intermediate revision by one other user not shown)
Line 5: Line 5:
  
 
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. 
 
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.  
+
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.
 
The origin brush is required for this entity, around which func_rot_button rotates.
  
Line 23: Line 23:
 
{{Entity_keyvalue|Distance (deg)|distance|How many degrees the button rotates around it's origin axis (z axis by default). Can be negative.}}
 
{{Entity_keyvalue|Distance (deg)|distance|How many degrees the button rotates around it's origin axis (z axis by default). Can be negative.}}
 
{{Entity_keyvalue|Locked Sound Override|locked_sound_override|Sound file to use when attempting to open locked entity. Useful when you don't want to use sound from default sound list.
 
{{Entity_keyvalue|Locked Sound Override|locked_sound_override|Sound file to use when attempting to open locked entity. Useful when you don't want to use sound from default sound list.
 
 
This overrides default "Locked Sound" sound.}}
 
This overrides default "Locked Sound" sound.}}
 
{{Entity_keyvalue|Unlocked Sound Override|unlocked_sound_override|Sound file to use when entity is unlocked. Useful when you don't want to use sound from default sound list.
 
{{Entity_keyvalue|Unlocked Sound Override|unlocked_sound_override|Sound file to use when entity is unlocked. Useful when you don't want to use sound from default sound list.
 
 
This overrides default "Locked Sound" sound.}}
 
This overrides default "Locked Sound" sound.}}
 
{{Entity_keyvalue|Locked Sentence Override|locked_sentence_override|Sentence from sentences.txt to use when attempting to open locked entity. Useful when you want to override locked sentence with your own sentence.}}
 
{{Entity_keyvalue|Locked Sentence Override|locked_sentence_override|Sentence from sentences.txt to use when attempting to open locked entity. Useful when you want to override locked sentence with your own sentence.}}
 
{{Entity_keyvalue|Unlocked Sentence Override|unlocked_sentence_override|Sentence from sentences.txt to use when entity is unlocked. Useful when you want to override unlocked sentence with your own sentence.}}
 
{{Entity_keyvalue|Unlocked Sentence Override|unlocked_sentence_override|Sentence from sentences.txt to use when entity is unlocked. Useful when you want to override unlocked sentence with your own sentence.}}
{{Entity_keyvalue|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.
+
{{Entity_keyvalue|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.}}
 +
{{Entity_keyvalue|Use Type|use_type|Set the use-type with which the button will fire its targets. Default is 'Toggle'.}}
  
Inventory Rules, InventoryRules @BaseClass:
+
{{Entity_item_inventory_keyvalues}}
List of inventory-related keyvalues used with item_inventory entity. Whenever player is attempting to use an entity, the inventory test runs. If test result is negative, the entity won't work. In other case, entity can be used as normal, but only by player who passed the test with required inventory conditions:"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.}}
 
{{Entity_keyvalue|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.}}
 
{{Entity_keyvalue|Inventory: Item count in group need have|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.}}
 
{{Entity_keyvalue|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.}}
 
{{Entity_keyvalue|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.}}
 
{{Entity_keyvalue|Inventory: Item count in group CAN'T have|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.}}
 
{{Entity_keyvalue|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 fired when item is used by this entity.}}
 
{{Entity_keyvalue|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.}}
 
{{Entity_keyvalue|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.}}
 
{{Entity_keyvalue|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 fired when item is dropped by this entity with 'Drop items(s)' events above.}}
 
{{Entity_keyvalue|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.}}
 
{{Entity_keyvalue|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.}}
 
{{Entity_keyvalue|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 fired when item is returned by this entity with 'Return items(s)' events above.}}
 
{{Entity_keyvalue|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.}}
 
{{Entity_keyvalue|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.}}
 
{{Entity_keyvalue|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 fired when item is destroyed by this entity with 'Destroy items(s)' events above.}}
 
{{Entity_keyvalue|Target: Inventory rules failed|target_on_fail|Entity to trigger whenever test result is negative.}}
 
{{Entity_keyvalue|Use Type|use_type|Set the use-type with which the button will fire its targets. Default is 'Toggle'.}}
 
  
 
== Flags ==
 
== Flags ==
  
 
{{Entity_flag|1|Not solid|Turns solidity of this entity off.}}
 
{{Entity_flag|1|Not solid|Turns solidity of this entity off.}}
{{Entity_flag|2|Reverse Dir|Reverses the direction of rotation. Only makes sense when "One-way" is selected. The same effect is given 
+
{{Entity_flag|2|Reverse Dir|Reverses the direction of rotation. Only makes sense when "One-way" is selected. The same effect is given by making "Distance" value negative.}}
 
 
by making "Distance" value negative.}}
 
 
{{Entity_flag|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.}}
 
{{Entity_flag|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.}}
{{Entity_flag|64|X-axis|If set, this will rotate around the x-axis.}}
+
{{Entity_flag|64|X-axis|If set, this will rotate around the x-axis. (Will cause sparks at world origin if set due to conflict with flag 64 of func_button.)}}
 
{{Entity_flag|128|Y-axis|If set, this will rotate around the y-axis.}}
 
{{Entity_flag|128|Y-axis|If set, this will rotate around the y-axis.}}
 
{{Entity_flag|256|Touch activates|If set, this func_rot_button can be activated by touching it. This disables activating per use-key.}}
 
{{Entity_flag|256|Touch activates|If set, this func_rot_button can be activated by touching it. This disables activating per use-key.}}
Line 71: Line 44:
 
== Changes ==
 
== Changes ==
  
5.0 Steam Release: Added 'Inventory Rules', 'Sound Override', 'Locked Sound Override', 'Unlocked Sound Override',
+
* 5.0 Steam Release: Added 'Inventory Rules', 'Sound Override', 'Locked Sound Override', 'Unlocked Sound Override', 'Locked Sentence Override' and 'Unlocked Sentence Override' keyvalues.
 
+
* 5.11: Added 'Use Type' keyvalue.
'Locked Sentence Override' and 'Unlocked Sentence Override' keyvalues.5.11: Added 'Use Type' keyvalue.
 
 
 
  
 
{{entity_title}}
 
{{entity_title}}

Latest revision as of 22:25, 14 January 2023

func_rot_button
Type

brush

Status

supported

 


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.

1 Keyvalues

Target : target

The func_rot_button triggers its target when used or triggered by another entity. You can add 'killtarget' manually.

Locked Sound : locked_sound

Sound to play if the button is pressed while locked.

Unlocked Sound : unlocked_sound

Sound to play if the button is pressed while not locked.

Locked Sentence : locked_sentence

Sentence to be heard if the button is pressed while locked. It is spoken with the voice of Half-Life's Black Mesa announcer.

Unlocked Sentence : unlocked_sentence

Sentence to be heard if the button is pressed while not locked. It is spoken with the voice of Half-Life's Black Mesa announcer.

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

Allows you to specify the name of a multisource entity to lock/unlock this button.

Speed : speed

Speed at which the button rotates (around z axis by default) when pressed, unless 'Don't move' is set. The button rotates counter-clockwise.

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

The set of sounds for this button to use whenever it's pressed/locked e.t.c.

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.

Distance (deg) : distance

How many degrees the button rotates around it's origin axis (z axis by default). Can be negative.

Locked Sound Override : locked_sound_override

Sound file to use when attempting to open locked entity. Useful when you don't want to use sound from default sound list. This overrides default "Locked Sound" sound.

Unlocked Sound Override : unlocked_sound_override

Sound file to use when entity is unlocked. Useful when you don't want to use sound from default sound list. This overrides default "Locked Sound" sound.

Locked Sentence Override : locked_sentence_override

Sentence from sentences.txt to use when attempting to open locked entity. Useful when you want to override locked sentence with your own sentence.

Unlocked Sentence Override : unlocked_sentence_override

Sentence from sentences.txt to use when entity is unlocked. Useful when you want to override unlocked sentence with your own sentence.

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.

Use Type : use_type

Set the use-type with which the button will fire its targets. Default is 'Toggle'.

Item Inventory Rules

List of inventory-related keyvalues used with item_inventory entity. Whenever player is attempting to use an entity, the inventory test runs. If test result is negative, the entity won't work. In other case, entity can be used as normal, but only by player who passed the test with required inventory conditions:

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 : 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 : 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 fired 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 fired 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 fired 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 fired 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.

2 Flags

1 : Not solid

Turns solidity of this entity off.

2 : Reverse Dir

Reverses the direction of rotation. Only makes sense when "One-way" is selected. 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. (Will cause sparks at world origin if set due to conflict with flag 64 of func_button.)

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.

3 Changes

  • 5.0 Steam Release: Added 'Inventory Rules', 'Sound Override', 'Locked Sound Override', 'Unlocked Sound Override', 'Locked Sentence Override' and 'Unlocked Sentence Override' keyvalues.
  • 5.11: Added 'Use Type' keyvalue.