func_pendulum

From Valve Developer Community
Revision as of 14:47, 10 November 2025 by SirYodaJedi (talk | contribs) (Created page with "{{tabsBar|main=func_pendulum}} {{stub}} {{this is a|brush entity|name=func_pendulum|game=Half-Life: Source|game1=Garry's Mod|game2=Jabroni Brawl: Episode 3}} It creates an object that moves in the manner of a pendulum. == Keyvalues == {{KV Targetname}} {{KV Angles}} {{KV|intn=speed|Speed|float|Speed at which the pendulum swings, in degrees/second.}} {{KV|intn=pendistance|Distance (deg)|float|Maximum distance the pendulum swings, in degrees.}} {{KV|intn=damp|Dampening (0...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Edit Tabs

Stub

This article or section is a stub. You can help by expanding it.

func_pendulum is a brush entity available in Half-Life: Source Half-Life: Source, Garry's Mod Garry's Mod, and Jabroni Brawl: Episode 3 Jabroni Brawl: Episode 3. It creates an object that moves in the manner of a pendulum.

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
Pitch Yaw Roll (Y Z X) (angles) <QAngle>
This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.
Speed (speed) <float>
Speed at which the pendulum swings, in degrees/second.
Distance (deg) (pendistance) <float>
Maximum distance the pendulum swings, in degrees.
Dampening (0-1000) (damp) <float>
Damage inflicted if blocked (dmg) <float>

Spawnflags

Start ON : [1]
Passable : [8]
Auto-return : [16]
If this is enabled, it will cause the pendulum to return to the start position when it is triggered. This may produce unexpected results.
X Axis : [64]
Y Axis : [128]

Inputs

Use
Toggle swinging on/off.
Activate
Start swinging, if it isn't already.

FGD code

@SolidClass base(Targetname, Parentname, Origin, Angles, RenderFields, Global) = func_pendulum :
	"A brush entity that swings on an axis like a pendulum."
[
	speed(integer) : "Speed" : 10
	distance(integer) : "Distance (deg)" : 90
	damp(integer) : "Damping (0-1000)" : 0
	dmg(integer) : "Damage inflicted when blocked" : 0
	spawnflags(flags) =
	[
		1: "Start ON" : 0
		8: "Passable" : 0
		16: "Auto-return" : 0
		64: "X Axis" : 0
		128: "Y Axis" : 0
	]

	input Use(void) : "Toggles the swing"
	input Activate(void) : "Starts the swing"
]