Moderator elections are being held. See Valve Developer Community:Moderator elections for more details.
Users who would like to run for moderator must be autoconfirmed and have at least 100 edits. Users can check their own edit count at Special:Preferences.
This article's documentation is for anything that uses the Source engine. Click here for more information.

phys_ragdollmagnet

From Valve Developer Community
Jump to: navigation, search
class hierarchy
CRagdollMagnet defined in CRagdollMagnet.cpp
CPointEntity
CBaseEntity

phys_ragdollmagnet is a point entity available in all Source Source games. It acts like a magnet for ragdolls. Useful for crafting exaggerated ragdoll behavior (i.e. guys falling over rails on death). If the Bar Magnet spawnflag is set, the magnet works like it was a cylindrical magnet i.e. it attracts ragdolls to the nearest point on a line.

Keyvalues

Targetname:

Name (targetname) <string>
The targetname that other entities refer to this entity by.
Bar Magnet Axis (axis) <vector>
Axis of the bar magnet, if the spawnflag is active.
Effective Radius (radius) <float>
Radius in which ragdolls are affected around this entity's origin.
Force (force) <float>
Magnetic force to apply to ragdolls within the radius. Expressed as kilograms per inch per second. So a force of 1000 will add 10 inches/second to a 100kg man. It will add 100 inches per second to a 10kg headcrab.
Tip.pngTip:Using a negative value will propel ragdolls away from the magnet.
Entity to affect (target) <string>
If specified, the phys_ragdollmagnet will only affect the target entity.

EnableDisable:

Start Disabled (StartDisabled) <boolean>
Stay dormant until activated (with theEnableinput).

Flags

  •  [2] : Bar Magnet (use axis helper)

Inputs

EnableDisable:

Enable
Disable
Enable/disable this entity from performing its task. It might also disappear from view.