Phys ragdollmagnet: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Added it to the newly created Category:Forces.)
m (Added tip on using negative force.)
Line 4: Line 4:
{{KV|Bar Magnet Axis|vecline|Axis of the bar magnet, if the spawnflag is active.}}
{{KV|Bar Magnet Axis|vecline|Axis of the bar magnet, if the spawnflag is active.}}
{{KV|Effective Radius|float|Radius in which ragdolls are affected around this entity's origin.}}
{{KV|Effective Radius|float|Radius in which ragdolls are affected around this entity's origin.}}
{{KV|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.}}
{{KV|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|Using a negative value will propel ragdolls away from the magnet.}}}}
{{KV|Entity to affect|string|If specified, the phys_ragdollmagnet will only affect the target entity.}}
{{KV|Entity to affect|string|If specified, the phys_ragdollmagnet will only affect the target entity.}}
{{KV Targetname}}
{{KV Targetname}}

Revision as of 10:05, 20 June 2017

Template:Base point 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

Bar Magnet Axis ([todo internal name (i)]) <vector>
Axis of the bar magnet, if the spawnflag is active.
Effective Radius ([todo internal name (i)]) <float>
Radius in which ragdolls are affected around this entity's origin.
Force ([todo internal name (i)]) <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 ([todo internal name (i)]) <string>
If specified, the phys_ragdollmagnet will only affect the target entity.
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

Start Disabled (StartDisabled) <boolean>
Stay dormant until activated (with theEnableinput).
Parentname:
Parent (parentname) <targetname>
Specifies a movement parent. An entity will maintain its initial offset from its parent. An attachment point can be added to the end of the name, separated by a comma.
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.

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.
Parentname:
SetParent <stringRedirectInput/string>
Move with this entity. See Entity Hierarchy (parenting).
SetParentAttachment <stringRedirectInput/string>
Change this entity to attach to a specific attachment point on its parent. The entity will teleport so that the position of its root bone matches that of the attachment. Entities must be parented before being sent this input.
SetParentAttachmentMaintainOffset <stringRedirectInput/string>
As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
ClearParent
Removes this entity from the the movement hierarchy, leaving it free to move independently.

Outputs