engineReplaceCOL | Multi Theft Auto: Wiki Skip to content

engineReplaceCOL

Client-side
Server-side
Shared

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


This function replaces the collision file of the given model id to the collision file passed. Use engineLoadCOL to load the collision file first.

Note

Follow loading order ( COL -> TXD -> DFF ) which is used in the example - as other orders can cause collisions, textures or the DFF not to load due to technical limitations. Collision libraries (.col files containing multiple collision models) are not supported. See COL for details. Object models are supported only (no vehicles or players).

OOP Syntax Help! I don't understand this!

  • Method: col:replace(...)

Syntax

bool engineReplaceCOL ( col theCol, int modelID )
Required Arguments
  • theCol: The collision file to replace with
  • modelID: The model ID whose collision file you want to replace

Returns

  • bool: value

Returns true if the collision was successfully replaced, false or nil if the collision could not be replaced for a reason.

Code Examples

Script Example Missing

Function engineReplaceCOL needs a script example. Help out by writing one.

Contribution guidelines

See Also

Engine Functions
Engine Elements