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
m (Robot: fixing template case.)
 
(15 intermediate revisions by 10 users not shown)
Line 1: Line 1:
{{wrongtitle|title=func_platrot}}
__NOTOC__
{{base_brush}}
{{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}}
A [[brush entity]] that moves vertically, and can rotate while doing so.
{{brushmodel}}


==Availability==
== KeyValues ==
{{in game|brush}} {{game-base}}
{{KV Targetname}}
In code it is represented by class CFuncPlatRot, defined in trains.cpp.
{{KV CBasePlatTrain sounds}}
{{KV|Speed of Rotation|intn=speed|integer|Speed at which the brush rotates, in degrees per second.}}
{{KV|Travel Altitude|intn=height|integer|The vertical distance from the starting position that this platform moves. If negative, the platform will lower.}}
{{KV|Spin amount|intn=rotation|integer|The amount this platform should rotate as it moves, in degrees.}}


==Keyvalues==
== Flags ==
*{{KV Targetname}}
{{fl|1|Toggle}}
*{{KV Parentname}}
{{fl|64|X Axis}}
*{{KV Origin}}
{{fl|128|Y Axis}}
*{{KV Angles}}
*{{KV RenderFields}}
*{{KV Shadow}}
*'''noise1'''
:<sound> The sound to play when the brush moves.
*'''noise2'''
:<sound> The sound to play when the brush stops moving.
*'''speed'''
:<integer> Speed at which the brush rotates, in degrees per second.
*'''height'''
:<integer> The vertical distance from the starting position that this platform moves. If negative, the platform will lower.
*'''rotation'''
:<integer> The amount this platform should rotate as it moves, in degrees.
*'''_minlight'''
:<string> The minimum level of ambient light that hits this brush.


==Flags==
== Inputs ==
*1 : Toggle
{{I BasePlat}}
*64 : X Axis
*128 : Y Axis


==Inputs==
== See also ==
*{{I Targetname}}
* {{ent|func_plat}}
*{{I Parentname}}
*{{I BasePlat}}
*{{I Shadow}}
 
==Outputs==
*{{O Targetname}}

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