This article's documentation is for anything that uses the Source engine. Click here for more information.

Func platrot: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
 
(13 intermediate revisions by 8 users not shown)
Line 1: Line 1:
{{base_brush|func_platrot}}  
__NOTOC__
{{subpage|[[Trains]]}}
{{TabsBar|main=gs|base=func_platrot}}
{{CD|CFuncPlatRot|file1=trains.cpp}}
{{this is a|brush entity|name=func_platrot}} It moves vertically, and can rotate while doing so.


==Entity description==
{{moving brush tip}}
It moves vertically, and can rotate while doing so.
In code it is represented by class CFuncPlatRot, defined in trains.cpp.


== Keyvalues ==
== KeyValues ==
{{KV|Movement Sound|sound|The sound to play when the brush moves.}}
{{KV|Stop Sound|sound|The sound to play when the brush stops moving.}}
{{KV|Speed of Rotation|integer|Speed at which the brush rotates, in degrees per second.}}
{{KV|Travel Altitude|integer|The vertical distance from the starting position that this platform moves. If negative, the platform will lower.}}
{{KV|Spin amount|integer|The amount this platform should rotate as it moves, in degrees.}}
{{KV|Minimum Light Level|string|The minimum level of ambient light that hits this brush.}}
{{KV Targetname}}
{{KV Targetname}}
{{KV Parentname}}
{{KV CBasePlatTrain sounds}}
{{KV Origin}}
{{KV|Speed of Rotation|intn=speed|integer|Speed at which the brush rotates, in degrees per second.}}
{{KV Angles}}
{{KV|Travel Altitude|intn=height|integer|The vertical distance from the starting position that this platform moves. If negative, the platform will lower.}}
{{KV RenderFields}}
{{KV|Spin amount|intn=rotation|integer|The amount this platform should rotate as it moves, in degrees.}}
{{KV Shadow}}


== Flags ==
== Flags ==
* 1 : Toggle
{{fl|1|Toggle}}
* 64 : X Axis
{{fl|64|X Axis}}
* 128 : Y Axis
{{fl|128|Y Axis}}


== Inputs ==
== Inputs ==
{{I Targetname}}
{{I Parentname}}
{{I RenderFields}}
{{I BasePlat}}
{{I BasePlat}}
{{I Shadow}}


== Outputs ==
== See also ==
{{O Targetname}}
* {{ent|func_plat}}

Latest revision as of 07:53, 8 December 2025

C++ Class hierarchy
CFuncPlatRot
CFuncPlat
CBasePlatTrain
CBaseToggle
CBaseEntity
C++ trains.cpp

func_platrot is a brush entity available in all Source Source games. It moves vertically, and can rotate while doing so.

Tip.pngTip:As brush entities are lit using static lightmaps, lighting on this entity may look weird when it moves from its original position. If this is an issue, consider converting the brushes to a prop, changing the brushes to clip or skip, and parenting the converted model to this entity.

KeyValues

Name (targetname) <string>
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also: Generic Keyvalues, Inputs and Outputs available to all entities
Movement Sound (noise1) <sound>
The sound to play when the train moves.
Stop Sound (noise2) <sound>
The sound to play when the train stops moving.
Move Sound index (movesnd) <integer choices> (only in Half-Life: SourceHalf-Life Deathmatch: Source)
The sound to play when the train moves. Overrides noise1, even if absent.
Choices
  • 0: Plat.DefaultMoving
  • 1: Plat.BigElev1
  • 2: Plat.BigElev2
  • 3: Plat.TechElev1
  • 4: Plat.TechElev2
  • 5: Plat.TechElev3
  • 6: Plat.FreightElev1
  • 7: Plat.FreightElev2
  • 8: Plat.HeavyElev
  • 9: Plat.RackElev
  • 10: Plat.RailElev
  • 11: Plat.SqueakElev
  • 12: Plat.OddElev1
  • 13: Plat.OddElev2
Stop Sound index (movesnd) <integer choices> (only in Half-Life: SourceHalf-Life Deathmatch: Source)
The sound to play when the train stops moving. Overrides noise2, even if absent.
Choices
  • 0: Plat.DefaultArrive
  • 1: Plat.BigElevStop1
  • 2: Plat.BigElevStop2
  • 3: Plat.FreightElevStop
  • 4: Plat.HeavyElevStop
  • 5: Plat.RackStop
  • 6: Plat.RailStop
  • 7: Plat.SqueakStop
  • 8: Plat.QuickStop
Sound Volume 0.0 - 1.0 (volume) <string>
Sound volume
Speed of Rotation (speed) <integer>
Speed at which the brush rotates, in degrees per second.
Travel Altitude (height) <integer>
The vertical distance from the starting position that this platform moves. If negative, the platform will lower.
Spin amount (rotation) <integer>
The amount this platform should rotate as it moves, in degrees.

Flags

Toggle : [1]
X Axis : [64]
Y Axis : [128]

Inputs

BasePlat:
Toggle
Toggles the platform's state.
GoUp
Tells the platform to go up.
GoDown
Tells the platform to go down.

See also