Garry's Mod Wiki

Revision Difference

constraint.CreateKeyframeRope#560649

<function name="CreateKeyframeRope" parent="constraint" type="libraryfunc"> <description>Creates a rope without any constraint.</description> <realm>Server</realm> <file line="296-L346">lua/includes/modules/constraint.lua</file> <args> <arg name="pos" type="Vector">Starting position of the rope.</arg> <arg name="pos" type="Vector">Position for the rope entity. Unknown effect, probably none.</arg> <arg name="width" type="number">Width of the rope.</arg> <arg name="material" type="string">Material of the rope.</arg> <arg name="Constraint" type="Entity">Constraint for the rope.</arg> <arg name="Ent1" type="Entity">First entity.</arg> <arg name="LPos1" type="Vector">Position of first end of the rope. Local to Ent1.</arg> <arg name="Bone1" type="number">Bone of first entity (0 for non-ragdolls)</arg>⤶ <arg name="Ent2" type="Entity">Second entity.</arg> <arg name="LPos2" type="Vector">Position of second end of the rope. Local to Ent2.</arg>⤶ <arg name="Bone2" type="number">Bone of second entity (0 for non-ragdolls)</arg> <arg name="kv" type="table" default="nil">Any additional key/values to be set on the rope.</arg> <arg name="material" type="string" default="nil">Material of the rope. If unset, will be solid black.</arg> <arg name="constraint" type="Entity" default="nil">Constraint for the rope. If set, the rope will be deleted when the constraint entity is.</arg> <arg name="ent1" type="Entity">First entity.</arg> <arg name="localPos1" type="Vector">Position relative to the the first physics object to constrain to.</arg> <arg name="bone1" type="number"><page>PhysObj</page> number of first entity to constrain to. (0 for non-ragdolls).⤶ ⤶ See <page>Entity:TranslateBoneToPhysBone</page>.</arg> <arg name="ent2" type="Entity">Second entity.</arg> <arg name="localPos2" type="Vector">Position relative to the the second physics object to constrain to.</arg> <arg name="bone2" type="number"><page>PhysObj</page> number of second entity to constrain to. (0 for non-ragdolls).⤶ ⤶ See <page>Entity:TranslateBoneToPhysBone</page>.</arg>⤶ <arg name="keyValues" type="table" default="nil">Any additional key/values to be set on the rope.</arg>⤶ </args> <rets> <ret name="" type="Entity">The created rope (`keyframe_rope`), or `nil` or failure.</ret> <ret name="" type="Entity">The created rope ([keyframe_rope](https://developer.valvesoftware.com/wiki/Keyframe_rope)), or `nil` or failure.</ret> </rets> </function>