func_rotating

From Source Entities
Jump to navigation Jump to search

Code classes:

func_rotating is a brush entity present in all Source games. It can rotate indefinitely.

Flags[edit | edit source]

  • 1: Start on - Rotates immediately after spawning.
  • 2: Reverse Direction - Rotates in opposite direction.
  • 4: X Axis - Brush will spin on the X Axis. (Default axis is Z)
  • 8: Y Axis - Brush will spin on the Y Axis.
  • 16: Acc/Dcc - Brush will accelerate and decelerate when enabled and disabled, as opposed to changing speed instantly. The acceleration/deceleration speed is determined by Friction.
  • 16: Client-side Rotation (Not in FGD) (only available in Tf2.png) - Confirm: Makes the client end do the simulation for this entity. May cut down on server lag.
  • 32: Fan Pain - If something touches the brush, it will be hurt by an amount equal to the current rotation speed divided by 10.
  • 64: Not solid
  • 128: Small Sound Radius - Sets Rotating sound WAV's radius to SNDLVL_IDLE. (Default radius is SNDLVL_NORM)
  • 256: Medium Sound Radius - Sets Rotating sound WAV's radius to SNDLVL_STATIC.
  • 512: Large Sound Radius - Effectively does nothing. (Sets Rotating sound WAV's radius to SNDLVL_NORM, which is already the default.)
  • 1024: Client-side Animation (only available in L4d.pngL4d2-small.pngAsw.png) - Confirm: Makes the client end do the simulation for this entity. May cut down on server lag.

Keyvalues[edit | edit source]

Max Rotation Speed (maxspeed) <float>
How fast the brush can rotate in degrees per second.
Rotating sound WAV (message) <sound>
Sound to play while rotating.
Friction (1 - 100%) (fanfriction) <float>
If Acc/Dcc is checked, this number will determine how fast the brush accelerates and decelerates. Higher = faster. Note: The FGD says 0 is a valid value, but setting it to 0 forces it back to 1 in order to avoid a division by 0 error.
Volume (10 = loudest) (volume) <float>
Volume of Rotating sound WAV.
Blocking Damage (dmg) <integer>
How much to damage an entity which blocks this brush from rotating. Bug: This variable may be affected by the code run by Fan Pain.
Solid Type (solidbsp) <bool>
How the engine processes this entity's solidity. Try changing this to BSP if players move oddly while touching the brush.
Shadows (Not in FGD) (vrad_brush_cast_shadows) <choices>
Determines if this entity will cast lightmap shadows.
  • 0: No shadows
  • 1: Cast shadows
Render Mode (rendermode) <choices>
A special rendering mode to use on this entity.
Render Amount/Transparency (renderamt) <integer>
Transparency amount, requires a Render Mode (rendermode) other than Normal. 0 is invisible, 255 is fully visible.
Render Color (R G B) (rendercolor) <color255>
Color channel filter to add to this entity's texture(s). Bug: P2.pngCsgo-small.pngBroken for brush entities.
Render FX (renderfx) <choices>
Preset appearance effects. Partially supported in Asw.png, completely non-functional in P2.pngCsgo-small.png. Bug: Sometimes functions incorrectly if changed with AddOutput, but is the only way to change effects other than making multiple versions of the object.
Minimum Light (_minlight) <float>
Minimum amount of light to hit this brush. 0 is none, 1 is "fullbright". Useful because the lightmaps will not update as the entity moves.
Render in Fast Reflections (drawinfastreflection) <boolean> (available in all games since P2.png)
Makes the entity be rendered in reflections from water materials using $reflectonlymarkedentities.

Inputs[edit | edit source]

SetSpeed <float>
Sets the target speed of the brush. 0.0 means stop, 1.0 means go at Max Rotation Speed, and 0.5 would mean go at half max speed. Negative values are allowed.
Start
Makes the brush start rotating.
Stop
Makes the brush stop rotating.
Toggle
If rotating, stop. If stopped, start rotating.
Reverse
Reverses the rotation direction.
StartForward
Makes the brush rotate in the non-reversed direction.
StartBackward
Makes the brush rotate in the reversed direction.
StopAtStartPos
Tells the brush to quit rotating once it rotates back to its original orientation.
Alpha <integer>
Sets Render Amount/Transparency (renderamt).
Color <color255>
Sets the Render Color (rendercolor).
EnableDrawInFastReflection  (available in all games since P2.png)
Sets Render in Fast Reflections to true.
DisableDrawInFastReflection  (available in all games since P2.png)
Sets Render in Fast Reflections to false.
SnapToStartPos  (only available in L4d2-small.png)
Tells the brush to quit rotating and snap back to its original orientation.
GetSpeed  (available in all games since P2.png)
Fires OnGetSpeed.

Outputs[edit | edit source]

OnGetSpeed <float> (available in all games since P2.png)
Fires when the GetSpeed input is sent. Automatically puts the brush's current speed as the input parameter, unless overridden by the mapper.

See Also[edit | edit source]