native
physics
Methods
add_rope
There are 19 types of rope, from type = 0 to type = 18
Rope definitions are stored in ropedata.xml
Rope types 0, 15 and 18 have proper physics for hanging objects (taut, do not sag, small to medium diameter, good aspect for a rope)
function native.physics.add_rope(x: float, y: float, z: float, rot_x: float, rot_y: float, rot_z: float, length: float, rope_type: int, max_length: float, min_length: float, p10: float, p11: bool, p12: bool, rigid: bool, p14: float, break_when_shot: bool, unk_ptr: ptr int, p17: bool): int
_add_rope_2
function native.physics._add_rope_2(x: float, y: float, z: float, rot_x: float, rot_y: float, rot_z: float, length: float, rope_type: int, is_networked: bool, p9: int, p10: float): int
delete_rope
function native.physics.delete_rope(rope_id: ptr int): void
_release_rope
function native.physics._release_rope(rope_id: int): void
delete_child_rope
function native.physics.delete_child_rope(rope_id: int): void
_break_rope
ropeTop returns top half of rope, ropeBottom returns bottom half of rope
function native.physics._break_rope(rope_id: ptr int, rope_top: ptr int, rope_bottom: ptr int, offset_x: float, offset_y: float, offset_z: float, p6: int): void
does_rope_exist
function native.physics.does_rope_exist(rope_id: int): bool
_is_rope_broken
function native.physics._is_rope_broken(rope_id: int): bool
_rope_change_visibility
function native.physics._rope_change_visibility(rope_id: ptr int, visible: bool): void
rope_draw_shadow_enabled
function native.physics.rope_draw_shadow_enabled(rope_id: ptr int, toggle: bool): void
get_rope_vertex_count
function native.physics.get_rope_vertex_count(rope_id: int): int
_0xe54bf2ce6c7d23a9
function native.physics._0xe54bf2ce6c7d23a9(rope_id: int, p1: int, x: float, y: float, z: float): void
_0x9c24846d0a4a2776
function native.physics._0x9c24846d0a4a2776(p0: int): void
_0x0cb16d05e03fb525
function native.physics._0x0cb16d05e03fb525(p0: int): void
_0xf27f1a8de4f50a1b
function native.physics._0xf27f1a8de4f50a1b(p0: int, p1: int, p2: int, p3: int, p4: int, p5: int, p6: int): void
_0x21d0890d88dfb0b0
function native.physics._0x21d0890d88dfb0b0(rope_id: int, p1: bool, p2: float, p3: float, p4: float, p5: float, p6: float, p7: float, p8: float, p9: float, p10: int): void
attach_entities_to_rope
Attaches entity 1 to entity 2.
If you use a boneName (p12/p13) make sure boneId (p15/p16) is set to -1.
function native.physics.attach_entities_to_rope(rope_id: int, entity1: int, entity2: int, ent1_x: float, ent1_y: float, ent1_z: float, ent2_x: float, ent2_y: float, ent2_z: float, length: float, always_zero1: int, always_zero2: int, bone_name1: string, bone_name2: string, p14: bool, bone_id1: int, bone_id2: int, always_zero3: int, always_zero4: int, p19: bool, p20: bool): void
_attach_entities_to_rope_2
Attaches a rope to two entities: binds two bones from two entities; one entity can be an object, i.e. a suspension point, the other an NPC bone
function native.physics._attach_entities_to_rope_2(rope_id: int, entity1: int, entity2: int, ent1_x: float, ent1_y: float, ent1_z: float, ent2_x: float, ent2_y: float, ent2_z: float, bone_name1: string, bone_name2: string): void
_attach_entites_to_rope_3
function native.physics._attach_entites_to_rope_3(rope_id: int, entity1: int, entity2: int, p3: float, p4: float, p5: float, p6: float, p7: float, p8: float, p9: int, p10: int): void
_0x69c810b72291d831
function native.physics._0x69c810b72291d831(p0: int, p1: int, p2: int, p3: int, p4: int, p5: int, p6: int): void
_0xb7469cb9ac3c0fd4
function native.physics._0xb7469cb9ac3c0fd4(p0: int, p1: int, p2: int, p3: int, p4: int, p5: int, p6: int, p7: int): void
_0xc64e7a62632ad2fe
function native.physics._0xc64e7a62632ad2fe(rope_id: int, p1: int, p2: int, p3: int, p4: int, p5: int, p6: int, p7: int): void
_is_rope_attached_to_entity
function native.physics._is_rope_attached_to_entity(rope_id: int, entity: int): bool
detach_rope_from_entity
function native.physics.detach_rope_from_entity(rope_id: int, entity: int): void
_hitch_horse
function native.physics._hitch_horse(horse: int, x: float, y: float, z: float): void
_unhitch_horse
function native.physics._unhitch_horse(horse: int): void
_0x6ea0e93cffa472cc
function native.physics._0x6ea0e93cffa472cc(p0: int): void
_0xbdda142759307528
function native.physics._0xbdda142759307528(p0: int): void
_0x32f4dbfdfcccc735
function native.physics._0x32f4dbfdfcccc735(p0: int, p1: int, p2: int): void
_0xf8ca39d5c0d1d9a1
function native.physics._0xf8ca39d5c0d1d9a1(p0: int, p1: int): void
_0xeaf529446488eb18
function native.physics._0xeaf529446488eb18(p0: int): void
_0x31160ec47e7c9549
function native.physics._0x31160ec47e7c9549(p0: int, p1: int): void
_0x5e981c764df33117
function native.physics._0x5e981c764df33117(p0: int, p1: int): void
rope_set_update_order
function native.physics.rope_set_update_order(rope_id: int, p1: int): void
_0xfb9153a54ac713e8
function native.physics._0xfb9153a54ac713e8(rope_id: int, p1: bool): void
_0xd699e688b49c0fd2
function native.physics._0xd699e688b49c0fd2(rope_id: int, p1: float, p2: float, p3: float, p4: bool): void
_0xbb3e9b073e66c3c9
function native.physics._0xbb3e9b073e66c3c9(rope_id: int, p1: bool, p2: bool, p3: bool, p4: bool): void
_0x522fa3f490e2f7ac
function native.physics._0x522fa3f490e2f7ac(rope_id: int, p1: int, p2: int): void
_0x3900491c0d61ed4b
function native.physics._0x3900491c0d61ed4b(p0: int, p1: int): void
_0xc89e7410a93ac19a
function native.physics._0xc89e7410a93ac19a(rope_id: int, p1: float): void
_0x1d97da8acb5d2582
function native.physics._0x1d97da8acb5d2582(rope_id: int, p1: int): void
_create_rope_winding_ability
Combining this with ADD_ROPE enables winding
p1: mostly empty (0)
ropeModelType: RB_L_Wrist02, RB_R_Wrist02, ropeAttach, noose01x_Rope_03, SKEL_Neck0, SKEL_L_FOOT, SKEL_Neck1, Root_s_meatbit_Chunck_Xlarge01x
CREATE*
function native.physics._create_rope_winding_ability(rope_id: int, p1: string, rope_model_type: string, length: float, p4: bool): void
get_rope_last_vertex_coord
function native.physics.get_rope_last_vertex_coord(rope_id: int): vec3
get_rope_vertex_coord
function native.physics.get_rope_vertex_coord(rope_id: int, vertex: int): vec3
start_rope_winding
function native.physics.start_rope_winding(rope_id: int): void
stop_rope_winding
function native.physics.stop_rope_winding(rope_id: int): void
start_rope_unwinding_front
function native.physics.start_rope_unwinding_front(rope_id: int): void
stop_rope_unwinding_front
function native.physics.stop_rope_unwinding_front(rope_id: int): void
_start_rope_unwinding_back
function native.physics._start_rope_unwinding_back(rope_id: int): void
_stop_rope_unwinding_back
function native.physics._stop_rope_unwinding_back(rope_id: int): void
_0x461fcbdeb4d06717
function native.physics._0x461fcbdeb4d06717(rope_id: int, p1: bool): void
_0x423c6b1f3786d28b
function native.physics._0x423c6b1f3786d28b(p0: int, p1: int): void
_0x76bad9d538bca1aa
function native.physics._0x76bad9d538bca1aa(rope_id: int, p1: float): void
_0xb40ea9e0d2e2f7f3
function native.physics._0xb40ea9e0d2e2f7f3(rope_id: int, p1: float): void
_rope_get_forced_length
function native.physics._rope_get_forced_length(rope_id: int): float
_0x751df00eeff122e3
function native.physics._0x751df00eeff122e3(p0: int): void
rope_force_length
Forces a rope to a certain length.
function native.physics.rope_force_length(rope_id: int, length: float): void
_0x8d59079c37c21d78
ROPE_SET*
function native.physics._0x8d59079c37c21d78(rope_id: int, p1: float): void
_0x814d453fcfdf119f
function native.physics._0x814d453fcfdf119f(p0: int, p1: int, p2: int): void
_0x1fc92bdba1106bd2
function native.physics._0x1fc92bdba1106bd2(rope_id: int, p1: float): void
_0xdede679ed29dd4e7
function native.physics._0xdede679ed29dd4e7(rope_id: int, p1: bool): void
_0xf1ea2a881eb7f2cd
function native.physics._0xf1ea2a881eb7f2cd(rope_id: int, p1: bool): void
_0x5a989b7ee3672a56
function native.physics._0x5a989b7ee3672a56(p0: int, p1: int): void
_0x483d4e917b0d35a9
function native.physics._0x483d4e917b0d35a9(p0: int, p1: int): void
_rope_get_breaker_of_rope
function native.physics._rope_get_breaker_of_rope(rope_id: int): int
set_damping
function native.physics.set_damping(entity: int, vertex: int, value: float): void
activate_physics
function native.physics.activate_physics(entity: int): void
break_entity_glass
function native.physics.break_entity_glass(entity: int, p1: float, p2: float, p3: float, p4: float, p5: float, p6: float, p7: float, p8: float, p9: int, p10: bool): void
_0x8eedfd8921389928
function native.physics._0x8eedfd8921389928(p0: int, p1: int, p2: int, p3: int, p4: int, p5: int, p6: int, p7: int, p8: int, p9: int): void
set_disable_breaking
function native.physics.set_disable_breaking(object: int, toggle: bool): void
set_disable_frag_damage
function native.physics.set_disable_frag_damage(object: int, toggle: bool): void
_0x5bd7457221cc5ff4
function native.physics._0x5bd7457221cc5ff4(p0: int, p1: int): void