M MY Multiplayer: Wiki
Side
Kind

engineSetModelTxd

Client

Puts a txd in front of a model's own, so the model finds its textures there first and falls back to its own for the rest.

bool engineSetModelTxd(string|element model, txd|string txd [, int priority = 0])

Parameters

NameTypeDescription
modelstring|elementThe model's name, or a model element from engineCreateModel. It need not be loaded yet.
txdtxd|stringA txd element or a txd's name.
priorityintAmong several txds added to the same model, the highest priority is searched first; among equals, the newest.default 0

Returns

true once the txd is added. Raises an error if no model or no txd has that name.

The added txd is kept resident while the link lives.

Example

local txd = engineLoadTxd("models/infernus_neon.ktd")
engineSetModelTxd("infernus", txd)

See also