Static methods

@:native("DoesRopeBelongToThisScript")staticDoesRopeBelongToThisScript(ropeId:Int):Bool

Return if the rope was generated or not by the script where the native is called.

@:native("GetHasObjectFragInst")staticGetHasObjectFragInst(object:Dynamic):Bool

GET_*

@:native("SetEntityProofUnk")staticSetEntityProofUnk(entity:Dynamic, toggle:Bool):Dynamic

@:native("SetLaunchControlEnabled")staticSetLaunchControlEnabled(toggle:Bool):Dynamic

Related to the lower-end of a vehicles fTractionCurve, e.g., from standing starts and acceleration from low/zero speeds.

NativeDB Introduced: v1604

@:native("ActivatePhysics")staticactivatePhysics(entity:Dynamic):Dynamic

@:native("AddRope")staticaddRope(x:Float, y:Float, z:Float, rotX:Float, rotY:Float, rotZ:Float, maxLength:Float, ropeType:Int, initLength:Float, minLength:Float, lengthChangeRate:Float, onlyPPU:Bool, collisionOn:Bool, lockFromFront:Bool, timeMultiplier:Float, breakable:Bool, unkPtr:Dynamic):Int

Creates a rope at the specific position, that extends in the specified direction when not attached to any entities.

__

Rope does NOT interact with anything you attach it to, in some cases it make interact with the world AFTER it breaks (seems to occur if you set the type to -1).

Rope will sometimes contract and fall to the ground like you'd expect it to, but since it doesn't interact with the world the effect is just jaring.

There are 8 different rope types in the base game. Full rope data can be found in ropedata.xml.

enum ePhysicsRopeType {

    RopeThin = 0, // Verticies: 1, Radius: 0.03, Textures: rope & rope_n

    RopeWire6 = 1, // Verticies: 4, Radius: 0.015, Textures: steel_cable & steel_cable_n

    RopeWire32 = 2, // Verticies: 32, Radius: 0.025, Textures: steel_cable & steel_cable_n

    RopeMesh = 3, // Verticies: 6, Radius: 0.03, Textures: rope & rope_n

    RopeThinWire32 = 4, // Verticies: 32, Radius: 0.01, Textures: rope & rope_n

    RopeReins = 5, // Verticies: 32, Radius: 0.005, Textures: rope & rope_n

    RopeThin4 = 6, // Verticies: 4, Radius: 0.03, Textures: rope & rope_n

    RopeWire64 = 7 // Verticies: 64, Radius: 0.025, Textures: steel_cable & steel_cable_n

}

@:native("ApplyImpulseToCloth")staticapplyImpulseToCloth(posX:Float, posY:Float, posZ:Float, vecX:Float, vecY:Float, vecZ:Float, impulse:Float):Dynamic

@:native("AttachEntitiesToRope")staticattachEntitiesToRope(ropeId:Int, ent1:Dynamic, ent2:Dynamic, ent1_x:Float, ent1_y:Float, ent1_z:Float, ent2_x:Float, ent2_y:Float, ent2_z:Float, length:Float, p10:Bool, p11:Bool, boneName1:String, boneName2:String):Dynamic

Attaches entity 1 to entity 2.  

@:native("AttachRopeToEntity")staticattachRopeToEntity(ropeId:Int, entity:Dynamic, x:Float, y:Float, z:Float, p5:Bool):Dynamic

The position supplied can be anywhere, and the entity should anchor relative to that point from it's origin.  

@:native("BreakEntityGlass")staticbreakEntityGlass(entity:Dynamic, p1:Float, p2:Float, p3:Float, p4:Float, p5:Float, p6:Float, p7:Float, p8:Float, p9:Dynamic, p10:Bool):Dynamic

@:native("DeleteChildRope")staticdeleteChildRope(ropeId:Int):Dynamic

@:native("DeleteRope")staticdeleteRope(ropeId:Dynamic):Dynamic

Deletes the rope with the specified handle.

You should check if the rope exists before trying to delete it, see DOES_ROPE_EXIST.

For an example on how to use this native please refer to ADD_ROPE

@:native("DetachRopeFromEntity")staticdetachRopeFromEntity(ropeId:Int, entity:Dynamic):Dynamic

@:native("DoesRopeExist")staticdoesRopeExist(ropeId:Dynamic):Bool

For an example on how to use this native please refer to ADD_ROPE

@:native("GetCgoffset")staticgetCgoffset(entity:Dynamic):Dynamic

@:native("GetRopeLastVertexCoord")staticgetRopeLastVertexCoord(ropeId:Int):Dynamic

@:native("GetRopeVertexCoord")staticgetRopeVertexCoord(ropeId:Int, vertex:Int):Dynamic

@:native("GetRopeVertexCount")staticgetRopeVertexCount(ropeId:Int):Int

@:native("LoadRopeData")staticloadRopeData(ropeId:Int, rope_preset:String):Dynamic

Rope presets can be found in the gamefiles. One example is "ropeFamily3", it is NOT a hash but rather a string.

@:native("PinRopeVertex")staticpinRopeVertex(ropeId:Int, vertex:Int, x:Float, y:Float, z:Float):Dynamic

@:native("RopeAreTexturesLoaded")staticropeAreTexturesLoaded():Bool

@:native("RopeConvertToSimple")staticropeConvertToSimple(ropeId:Int):Dynamic

@:native("RopeDrawShadowEnabled")staticropeDrawShadowEnabled(ropeId:Dynamic, toggle:Bool):Dynamic

@:native("RopeForceLength")staticropeForceLength(ropeId:Int, length:Float):Dynamic

Forces a rope to a certain length.

@:native("RopeGetDistanceBetweenEnds")staticropeGetDistanceBetweenEnds(ropeId:Int):Float

@:native("RopeLoadTextures")staticropeLoadTextures():Dynamic

Loads rope textures for all ropes in the current scene.

@:native("RopeResetLength")staticropeResetLength(ropeId:Int, length:Float):Dynamic

Reset a rope to a certain length.  

@:native("RopeSetUpdateOrder")staticropeSetUpdateOrder(ropeId:Int, p1:Dynamic):Dynamic

@:native("RopeSetUpdatePinverts")staticropeSetUpdatePinverts(ropeId:Int):Dynamic

@:native("RopeUnloadTextures")staticropeUnloadTextures():Dynamic

Unloads rope textures for all ropes in the current scene.

@:native("SetCgAtBoundcenter")staticsetCgAtBoundcenter(entity:Dynamic):Dynamic

@:native("SetCgoffset")staticsetCgoffset(entity:Dynamic, x:Float, y:Float, z:Float):Dynamic

@:native("SetDamping")staticsetDamping(entity:Dynamic, vertex:Int, value:Float):Dynamic

@:native("SetDisableBreaking")staticsetDisableBreaking(object:Dynamic, toggle:Bool):Dynamic

@:native("SetDisableFragDamage")staticsetDisableFragDamage(object:Dynamic, toggle:Bool):Dynamic

@:native("StartRopeUnwindingFront")staticstartRopeUnwindingFront(ropeId:Int):Dynamic

@:native("StartRopeWinding")staticstartRopeWinding(ropeId:Int):Dynamic

@:native("StopRopeUnwindingFront")staticstopRopeUnwindingFront(ropeId:Int):Dynamic

@:native("StopRopeWinding")staticstopRopeWinding(ropeId:Int):Dynamic

@:native("UnpinRopeVertex")staticunpinRopeVertex(ropeId:Int, vertex:Int):Dynamic