ents.CreateClientRope
Entity ents.CreateClientRope( Entity ent1, number or Vector ent1attach, Entity ent2, number or Vector ent2attach, table extra = nil )
Description
Creates a clientside only rope, similar to those used by the Dog and Fast Zombie models from Half-Life 2.
Created ropes will be automatically cleaned up when one of the attached entities is removed.
It doesn’t work exactly the same way as constraint.CreateKeyframeRope or constraint.Rope, you can see it when you try to use Slack with constraint.CreateKeyframeRope or addlength on constraint.Rope.
Arguments
2 number or Vector ent1attach
The attachment ID on the first entity to attach the rope to, or a local Vector relative to the first entity.
4 number or Vector ent2attach
The attachment ID on the second entity to attach the rope to, or a local Vector relative to the second entity.
5 table extra = nil
Extra optional settings for the rope. Possible values are:
- slack - How much extra rope to add to the length. (default: 0)
- width - Width of the rope. (default: 2)
- segments - How many segments the rope should have (default: 8, valid range is [2,10])
- material - Which material should the rope have. (default:
"cable/cable") - nogravity - If set, the rope should have no gravity. (default: 0)
Returns
Example
Sample usage, creates a clientside rope between the player entity, and the entity the player is looking at.
Example
Sample usage: stores the entity you’re looking at as the first endpoint, then on a second command creates a client-side rope like what we can got with constraint.CreateKeyframeRope or constraint.Rope server side.
Garry's Mod
Rust
Steamworks
Wiki Help