Garry's Mod Wiki

Revision Difference

constraint.Find#518258

<function name="Find" parent="constraint" type="libraryfunc"> <description>Returns the constraint of a specified type between two entities, if it exists</description> <realm>Server</realm> <file line="246">lua/includes/modules/constraint.lua</file> <args> <arg name="ent1" type="Entity">The first entity to check</arg> <arg name="ent2" type="Entity">The second entity to check</arg> <arg name="type" type="string">The constraint type to look for (eg. &quot;Weld&quot;, &quot;Elastic&quot;, &quot;NoCollide&quot;)</arg> <arg name="type" type="string">The constraint type to look for (eg. "Weld", "Elastic", "NoCollide")</arg> <arg name="bone1" type="number">The bone number for the first entity (0 for monoboned entities)</arg> <arg name="bone2" type="number">The bone number for the second entity</arg> </args> <rets> <ret name="" type="Entity">constraint</ret> </rets> </function>