Phys pulleyconstraint
From Valve Developer Community
This point-based entity is available in all Source games.
| Table of contents |
[edit]
Description
A constraint that is essentially two length constraints and two points. Imagine it as a virtual rope connected to two pulleyed objects, specified in the Entity 1 (attach1) and Entity 2 (attach2) keyvalues, each suspended from a pulley above them.
Pulley point 1 - the pulley from which Entity 1 is always suspended from - is the origin of this constraint entity.
Pulley point 2 - the pulley from which Entity 2 is always suspended from - is the position of the "blue ball", set by altering the Pulley Position 2 (position2) keyvalue directly, or by using the Helper Tool.
The constraint keeps the sum of the distances between the pulley points and their suspended objects constant.
- See also A Counter-weighted Door (http://twhl.co.za/mapvault_map.php?id=3920).
[edit]
Keyvalues
- targetname <target_source>
- Defines the name that other entities refer to this entity by.
- hammerid [Episode Two Update]
- <integer readonly> This id is used for debugging purposes in Hammer.
- attach1
- <target_destination> Entity 1
- attach2
- <target_destination> Entity 2
- constraintsystem
- <target_destination> The name of a phys_constraintsystem that this constraint should be a part of. All constraints on a set of entities should be placed in the same system, or they will fight each other during simulation.
- forcelimit
- <float> The amount of force an impact must apply to the constraint to break it. A way of calculating this is to set it to the mass of an object that would break this constraint if it were resting on the constrainted objects. Set to zero for infinite strength.
- torquelimit
- <float> (lbs*distance) The amount of torque required to break the constraint. A way of calculating this is to multiply any reference mass by the resting distance (from the center of mass of the object) needed to break the constraint (1 lb = 453.59237 grams). Set to zero for infinite strength.
- breaksound
- <sound> A sound played when the constraint is broken.
- addlength <float>
- Add (or subtract) this amount to the rest length of the pulley rope.
- gearratio <float>
- Add (or subtract) this amount to the rest length of the pulley rope.
- position2 <vecline>
- Pulley Position 2 - The position of the pulley for Entity 2. This point can be set by using the Helper Tool.
[edit]
Flags
- 1 : No Collision until break
- 2 : Keep Rigid
[edit]
Inputs
- Kill
- Removes this entity from the world.
- Removes this entity and all its children from the world.
- AddOutput <string>
- Evaluates a keyvalue/output on this entity. It can be potentially very dangerous, use with care.
- Format:
<key> <value> - Format:
<output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire (-1 == infinite)>
- Causes this entity's OnUser1-4 outputs to be fired. See User Inputs and Outputs.
- Break
- Force the constraint to break.
- TurnOn
- Enable the constraint. Do this when the objects don't exist when the constraint spawns - or when you have deactivated the constraint. Broken constraints can NOT be turned on. They have been deleted.
- TurnOff
- Disable this constraint.
[edit]
Outputs
- Fired in response to FireUser1-4 inputs. See User Inputs and Outputs.
- !activator = activator
- OnBreak
- Fired when the constraint breaks.
