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

Func plat: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(→‎FGD Code: clean up)
mNo edit summary
 
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{ent not in fgd}}
{{ent not in fgd}}
{{CD2|CFuncPlat|file1=trains.cpp}}
{{CD|CFuncPlat|file1=trains.cpp}}
{{this is a|brush entity|name=func_plat}} Similar to [[func_platrot]] in function. In multiplayer, the players will appear jerky while riding this. For a modernized entity included in the fgd by default, use {{ent|func_movelinear}}
{{this is a|brush entity|name=func_plat}} Similar to {{ent|func_platrot}} in function. In multiplayer, the players will appear jerky while riding this. For a modernized entity included in the fgd by default, use {{ent|func_movelinear}}
{{bug|This entity will set its angles to 0 0 0 upon spawning. This means if this entity is present inside rotated [[instance]]s, it will not be rotated correctly!}}
{{bug|This entity will set its angles to 0 0 0 upon spawning. This means if this entity is present inside rotated [[instance]]s, it will not be rotated correctly!}}


Line 35: Line 35:


== See also ==
== See also ==
[[func_platrot]]
* {{ent|func_platrot}}

Latest revision as of 19:43, 20 January 2025

Icon-NotInFGD.png
This entity is not in the FGD by default.
See below for instructions on making it available.
C++ Class hierarchy
CFuncPlat
CBasePlatTrain
CBaseToggle
CBaseEntity
C++ trains.cpp

func_plat is a brush entity available in all Source Source games. Similar to func_platrot in function. In multiplayer, the players will appear jerky while riding this. For a modernized entity included in the fgd by default, use func_movelinear

Icon-Bug.pngBug:This entity will set its angles to 0 0 0 upon spawning. This means if this entity is present inside rotated instances, it will not be rotated correctly!  [todo tested in ?]

Keyvalues

Name (targetname) <string>[ Edit ]
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 brush moves.
Stop Sound (noise2) <sound>
The sound to play when the brush stops moving.
Speed (speed) <integer>
Speed at which the brush moves.
Travel Altitude (height) <integer>
The vertical distance from the starting position that this platform moves. If negative, the platform will lower.
Lip (lip) <float>
The amount, in inches, of the button to leave sticking out of the wall it recedes into when pressed. Negative values make the button recede even further into the wall.

Flags

Toggle : [1]

Inputs

BasePlat:
Toggle
Toggles the platform's state.
GoUp
Tells the platform to go up.
GoDown
Tells the platform to go down.
Note.pngNote:Will go all the way up and all the way down. Cannot be interrupted with opposite command.

FGD Code

@SolidClass base(BasePlat) = func_plat :
	"A brush entity that moves vertically, and can rotate while doing so."
[
	spawnflags(flags) =
	[
		1: "Toggle" : 1
	]
	noise1(sound) : "Movement Sound" : : "The sound to play when the brush moves."
	noise2(sound) : "Stop Sound" : : "The sound to play when the brush stops moving."
	speed(float) : "Speed" : "50" : "Speed at which the brush moves"
	lip(float) : "Lip" : "0" : "The amount, in units, of the button to leave sticking out of the wall it recedes into when pressed. Negative values make the button recede even further into the wall."
]

See also