Skip to content

e2 docs custom constraintcore

DerelictDrone edited this page May 28, 2025 · 6 revisions

Jump to table of contents

Custom/constraintcore

enableConstraintUndo(Number State)

(1 ops)

axis(Entity Ent1, Vector V1, Entity Ent2, Vector V2)

Creates an axis constraint between two entities at vectors local to each entity (30 ops)

axis(Entity Ent1, Vector V1, Entity Ent2, Vector V2, Number Friction)

Creates an axis constraint between two entities at vectors local to each entity with friction (30 ops)

axis(Entity Ent1, Vector V1, Entity Ent2, Vector V2, Number Friction, Vector Localaxis)

Creates an axis constraint between two entities at vectors local to each entity with friction and local rotation axis (30 ops)

ballsocket(Entity Ent1, Vector V, Entity Ent2)

(30 ops)

ballsocket(Entity Ent1, Vector V, Entity Ent2, Number Friction)

(30 ops)

ballsocket(Entity Ent1, Vector V, Entity Ent2, Vector Mins, Vector Maxs, Vector Frictions)

Creates an AdvBallsocket constraint between two entities at a vector local to ent1, using the specified mins, maxs, and frictions (30 ops)

ballsocket(Entity Ent1, Vector V, Entity Ent2, Vector Mins, Vector Maxs, Vector Frictions, Number Rotateonly)

Creates an AdvBallsocket constraint between two entities at a vector local to ent1, using the specified mins, maxs, frictions, rotateonly (30 ops)

weldAng(Entity Ent1, Vector V, Entity Ent2)

(30 ops)

hydraulic(Number Index, Entity Ent, Vector V1, Bone Bone, Vector V2, Number Width)

Creates a hydraulic constraint with a referenceid, between an entity and a bone, at vectors local to each (30 ops)

hydraulic(Number Index, Entity Ent, Vector V1, Bone Bone, Vector V2, Number Constant, Number Damping, Number Rdamping, String Mat, Number Width, Number Stretch)

Creates a hydraulic constraint with a referenceid, between and entity and a bone, at vectors local to each, with constant, damping, relative damping material, width, and stretch only (30 ops)

hydraulic(Number Index, Entity Ent, Vector V1, Bone Bone, Vector V2, Number Constant, Number Damping, Number Rdamping, String Mat, Number Width, Number Stretch, Vector Color)

Creates a hydraulic constraint with a referenceid, between an entity and a bone, at vectors local to each, with constant, damping, relative damping, material, width, stretch only, and color (30 ops)

hydraulic(Number Index, Bone Bone1, Vector V1, Bone Bone2, Vector V2, Number Width)

Creates a hydraulic constraint with a referenceid, between two bones, at vectors local to each (30 ops)

hydraulic(Number Index, Bone Bone1, Vector V1, Bone Bone2, Vector V2, Number Constant, Number Damping, Number Rdamping, String Mat, Number Width, Number Stretch)

Creates a hydraulic constraint with a referenceid, between two bones, at vectors local to each, with constant, damping, relative damping material, width, and stretch only (30 ops)

hydraulic(Number Index, Bone Bone1, Vector V1, Bone Bone2, Vector V2, Number Constant, Number Damping, Number Rdamping, String Mat, Number Width, Number Stretch, Vector Color)

Creates a hydraulic constraint with a referenceid, between two bones, at vectors local to each, with constant, damping, relative damping, material, width, stretch only, and color (30 ops)

hydraulic(Number Index, Entity Ent1, Vector V1, Entity Ent2, Vector V2, Number Constant, Number Damping, Number Rdamping, String Mat, Number Width, Number Stretch, Vector Color)

Creates a hydraulic constraint with a referenceid, between two entities, at vectors local to each, with constant, damping, relative damping, material, width, stretch only, and color (30 ops)

winch(Number Index, Entity Ent1, Vector V1, Entity Ent2, Vector V2, Number Width)

(30 ops)

hydraulic(Number Index, Entity Ent1, Vector V1, Entity Ent2, Vector V2, Number Width)

Creates a hydraulic constraint with a referenceid, between two entities, at vectors local to each (30 ops)

hydraulic(Number Index, Entity Ent1, Vector V1, Entity Ent2, Vector V2, Number Constant, Number Damping, String Mat, Number Width, Number Stretch)

Creates a hydraulic constraint with a referenceid, between two entities, at vectors local to each, with constant, damping, and stretch only (30 ops)

hydraulic(Number Index, Entity Ent1, Vector V1, Entity Ent2, Vector V2, Number Constant, Number Damping, Number Rdamping, String Mat, Number Width, Number Stretch)

Creates a hydraulic constraint with a referenceid, between two entities, at vectors local to each, with constant, damping, relative damping material, width, and stretch only (30 ops)

rope(Number Index, Entity Ent1, Vector V1, Entity Ent2, Vector V2, Number Addlength, Number Width, String Mat, Number Rigid, Vector Color)

Creates a rope constraint with a referenceid, between two entities, at vectors local to each with add length, width, material, rigidity, and color (30 ops)

rope(Number Index, Entity Ent, Vector V1, Bone Bone, Vector V2)

Creates a rope constraint with a referenceid, between an entity and a bone, at vectors local to each (30 ops)

rope(Number Index, Entity Ent, Vector V1, Bone Bone, Vector V2, Number Addlength, Number Width, String Mat, Number Rigid, Vector Color)

Creates a rope constraint with a referenceid, between an entity and a bone, at vectors local to each with add length, width, material, rigidity, and color (30 ops)

rope(Number Index, Bone Bone1, Vector V1, Bone Bone2, Vector V2)

Creates a rope constraint with a referenceid, between two bones, at vectors local to each (30 ops)

rope(Number Index, Bone Bone1, Vector V1, Bone Bone2, Vector V2, Number Addlength, Number Width, String Mat, Number Rigid, Vector Color)

Creates a rope constraint with a referenceid, between two bones, at vectors local to each with add length, width, material, rigidity, and color (30 ops)

rope(Number Index, Entity Ent1, Vector V1, Entity Ent2, Vector V2)

Creates a rope constraint with a referenceid, between two entities, at vectors local to each (30 ops)

rope(Number Index, Entity Ent1, Vector V1, Entity Ent2, Vector V2, Number Addlength, Number Width, String Mat)

Creates a rope constraint with a referenceid, between two entities, at vectors local to each with add length, width, and material (30 ops)

rope(Number Index, Entity Ent1, Vector V1, Entity Ent2, Vector V2, Number Addlength, Number Width, String Mat, Number Rigid)

Creates a rope constraint with a referenceid, between two entities, at vectors local to each with add length, width, material, and rigidity (30 ops)

Entity:setLength(Number Index, Number Length)

Sets the length of a winch/hydraulic/rope stored in this entity at a referenceid (5 ops)

Entity:setConstant(Number Index, Number Constant)

(5 ops)

Entity:setConstant(Number Index, Number Constant, Number Damping)

(5 ops)

Entity:setDamping(Number Index, Number Damping)

(5 ops)

slider(Entity Ent, Vector V1, Bone Bone, Vector V2)

(30 ops)

slider(Entity Ent, Vector V1, Bone Bone, Vector V2, Number Width, String Mat, Vector Color)

(30 ops)

slider(Bone Bone1, Vector V1, Bone Bone2, Vector V2)

(30 ops)

slider(Bone Bone1, Vector V1, Bone Bone2, Vector V2, Number Width, String Mat, Vector Color)

(30 ops)

slider(Entity Ent1, Vector V1, Entity Ent2, Vector V2, Number Width, String Mat, Vector Color)

(30 ops)

slider(Entity Ent1, Vector V1, Entity Ent2, Vector V2)

(30 ops)

slider(Entity Ent1, Vector V1, Entity Ent2, Vector V2, Number Width)

(30 ops)

Entity:noCollide(Entity Target)

(30 ops)

Entity:noCollide(Bone Target)

(30 ops)

Bone:noCollide(Entity Target)

(30 ops)

Bone:noCollide(Bone Target)

(30 ops)

noCollide(Entity Ent1, Entity Ent2)

(30 ops)

noCollideAll(Entity Ent, Number State)

(30 ops)

Entity:weld(Entity Target)

(30 ops)

Entity:weld(Entity Target, Number Forcelimit, Number Nocollide)

Creates a weld constraint between two entities with force limit (0 for unbreakable) and no collide (30 ops)

Entity:weld(Bone Target)

(30 ops)

Entity:weld(Bone Target, Number Forcelimit, Number Nocollide)

Creates a weld constraint between two entities with force limit (0 for unbreakable) and no collide (30 ops)

Bone:weld(Entity Target)

(30 ops)

Bone:weld(Entity Target, Number Forcelimit, Number Nocollide)

Creates a weld constraint between two entities with force limit (0 for unbreakable) and no collide (30 ops)

Bone:weld(Bone Target)

(30 ops)

Bone:weld(Bone Target, Number Forcelimit, Number Nocollide)

Creates a weld constraint between two bones with force limit (0 for unbreakable) and no collide (30 ops)

weld(Entity Ent1, Entity Ent2)

(30 ops)

Entity:constraintBreak()

Breaks all constraints of all types on an entity (5 ops)

Entity:constraintBreak(Entity Ent2)

Breaks all constraints between two entities (5 ops)

Entity:constraintBreak(String Constype)

Breaks all constraints of a type (weld, axis, nocollide, ballsocket) on an entity (5 ops)

Entity:constraintBreak(String Constype, Entity Ent2)

Breaks a constraint of a type (weld, axis, nocollide, ballsocket) between two entities (5 ops)

Expression 2 ⚙️

Getting Started 🕊

Guides (In learning order) 🎓

Tools 🛠️

Click To Expand

Advanced

Beacon 💡

Control 🎛️

Data 💿

Detection 👀

Display 💻

Render 🖌

I/O 🔌

Physics 🚀

Utilities 🛠️

RFID 💳

Wireless 🛜

Gates 🚥

Click To Expand

TBD

Extras 🔭

Clone this wiki locally