Func plat: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Linked to func_platrot, elaborated on two behaviors.)
(-added class hierarchy, cleanup)
Line 1: Line 1:
__NOTOC__
{{ent not in fgd}}
{{ent not in fgd}}
==Entity Description==
{{CD2|CFuncPlat|file1=trains.cpp}}
Similar to [[func_platrot]] in function. In multiplayer, the players will appear jerky while riding this.
{{entity|func_platrot|type=e2}} Similar to [[func_platrot]] in function. In multiplayer, the players will appear jerky while riding this.


===FGD Code===
==Keyvalues==
{{KV Targetname}}
{{KV|Movement Sound|intn=noise1|sound|The sound to play when the brush moves.}}
{{KV|Stop Sound|intn=noise2|sound|The sound to play when the brush stops moving.}}
{{KV|Speed|intn=speed|integer|Speed at which the brush moves.}}
{{KV|Travel Altitude|intn=height|integer|The vertical distance from the starting position that this platform moves. If negative, the platform will lower.}}
{{KV|lip|intn=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==
{{fl|1|Toggle}}
 
==Inputs==
{{I BasePlat}}
{{Note|Will go all the way up and all the way down. Cannot be interrupted with opposite command.}}
 
=== FGD Code ===
  @SolidClass base(BasePlat) = func_plat :
  @SolidClass base(BasePlat) = func_plat :
  "A brush entity that moves vertically, and can rotate while doing so."
  "A brush entity that moves vertically, and can rotate while doing so."
Line 19: Line 35:
  "even further into the wall."
  "even further into the wall."
  ]
  ]
==Keyvalues==
*{{KV Targetname}}
*{{KV Parentname}}
*{{KV Origin}}
*{{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 moves.
* '''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==
== See Also ==
*1 : Toggle
[[func_platrot]]
 
==Inputs==
*{{I Targetname}}
*{{I Parentname}}
*{{I BasePlat}}
''Will go all the way up and all the way down. Cannot be interrupted with opposite command.''
*{{I Shadow}}
==Outputs==
*{{O Targetname}}
[[Category:Entities]]

Revision as of 20:23, 21 May 2023

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

Template:Entity Similar to func_platrot in function. In multiplayer, the players will appear jerky while riding this.

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.000000" : "Speed at which the brush moves"
	lip(float) : "Lip" : "0.000000" :	"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."
]

See Also

func_platrot