12-Jul-2023
A brush entity, which rotates constantly. Can be disabled and enabled, at which it may accelerate/decelerate. Requires origin brush around which entity 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_rotating so other entities can trigger it to start or stop it. Behaviour, when triggered, depends on "Obey Trigger Mode" value. See "Obey Trigger Mode" for more details on how func_rotating behaves depending on selected mode. Can be kill-targeted.
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.
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.
Rotation Speed speed : Rotation speed in degrees per second. E.g., '360' would make it do one whole turn per second, regardless of its size.
Volume (10 = loudest) volume : Set the volume of the sound emitted by the func_rotating. Volume value ranges from 0 to 10.
Friction (0 - 100%) fanfriction : Set the friction to be used when the "Acc/Dcc" flag is set. Ranges from 0 to 100. Avoid 0 and 100. Theoretically, greater friction means longer spin-up time and shorter spin-down time. However, in game, greater friction means faster spin-up time and faster spin-down time.
Fan Sounds sounds : Set the sound to be played while the func_rotating is activated.
WAV Name message : Allows you to specify a custom rotation-sound.
Obey Trigger Mode m_iObeyTriggerMode : Controls how func_rotating behave when triggered with different use-types.
_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.
X Y Z - Move here after lighting spawnorigin : This will move func_rotating to specified position on map start, preserving the lightning from original position.
Damage inflicted when blocked dmg : Set the amount of damage to inflict on the object blocking the func_rotation's rotation.
1 : Start ON : If set, this func_rotating starts enabled.
2 : Reverse Direction : If set, this inverts the rotation direction.
4 : X Axis : If set, this will rotate around the x-axis.
8 : Y Axis : If set, this will rotate around the y-axis.
16 : Acc/Dcc : If set, the func_rotating will smoothly accelerate and decelerate when turned on/off, based on the friction value.
32 : Fan Pain : If set, the func_rotating will inflict damage when touched, instead of only when blocked by something.
64 : Not Solid : Removes solidity from this func_rotating, making it harmless.
128 : Small Radius : Small sound radius, about ~384 units. Can be combined with "Medium radius" and "Large radius".
256 : Medium Radius : Medium sound radius, about ~768 units. Can be combined with "Small radius" and "Large radius".
512 : Large Radius : Large sound radius, about ~1536 units. Can be combined with "Small radius" and "Medium radius".
2048 : Not in Deathmatch : Obsolete in Sven Co-op. Makes the entity don't appear in Multiplayer Games.
Func_rotating won't react to frequent triggering properly. It might stay in whatever state it is when triggered consecutively.
The entity might start to behave unexpectedly after many rotations. You can fix this by performing a modulo 360.0 operation on it's angles using a trigger_copyvalue.