EngineRequestTXD: Difference between revisions
Jump to navigation
Jump to search
TheNormalnij (talk | contribs) (Created page with "__NOTOC__ {{Client function}} {{New feature/item|3.0160|1.6.0|22190|This function is used to register the next available TXD ID.}} ==Syntax== <syntaxhighlight lang="lua"> int engineRequestTXD ( string name ) </syntaxhighlight> ===Required Arguments=== *'''name''': TXD name string up to 24 characters. ===Returns=== {{New feature/item|3.0160|1.6.0|22190| Returns an ''integer'' of the TXD ID that was available to be assigned to game models, ''false'' if no free TXD ID avai...") |
Fernando187 (talk | contribs) (Remove obsolete Requirements section) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Client function}} | {{Client function}} | ||
{{New feature/item|3. | {{New feature/item|3.0161|1.6.0|22190|This function is used to register the next available TXD ID.}} | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
Line 29: | Line 29: | ||
-- Assign TXD to game models | -- Assign TXD to game models | ||
engineSetModelTXDID(17697, newTxdId) | |||
engineSetModelTXDID(17925, newTxdId) | |||
engineSetModelTXDID(3646, newTxdId) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
==See Also== | ==See Also== | ||
{{Engine functions}} | {{Engine functions}} |
Latest revision as of 17:33, 7 November 2024
Syntax
int engineRequestTXD ( string name )
Required Arguments
- name: TXD name string up to 24 characters.
Returns
Returns an integer of the TXD ID that was available to be assigned to game models, false if no free TXD ID available. Do not rely on the id numbers returned being consistent across multiple clients or multiple runs of resources. There is no guarantee for the order of the numbers.
Example
This example replaces textures for some Grove Street buildings.
-- Load IMG archive local img = engineLoadIMG('worldmod.img') -- Enable streaming from this IMG engineAddImage(img) -- Allocate a new TXD local newTxdId = engineRequestTXD("WESTERNHOUSES01") -- Link IMG files to TXD engineImageLinkTXD(img, "western.txd", newTxdId) -- Assign TXD to game models engineSetModelTXDID(17697, newTxdId) engineSetModelTXDID(17925, newTxdId) engineSetModelTXDID(3646, newTxdId)
See Also
- engineAddImage
- engineApplyShaderToWorldTexture
- engineFreeModel
- engineGetModelFlags
- engineGetModelIDFromName
- engineGetModelLODDistance
- engineGetModelNameFromID
- engineGetModelPhysicalPropertiesGroup
- engineGetModelTextureNames
- engineGetModelTextures
- engineGetModelTXDID
- engineGetModelVisibleTime
- engineGetObjectGroupPhysicalProperty
- engineGetSurfaceProperties
- engineGetVisibleTextureNames
- engineImageGetFilesCount
- engineImageGetFiles
- engineImageGetFile
- engineImageLinkDFF
- engineImageLinkTXD
- engineImportTXD
- engineLoadCOL
- engineLoadDFF
- engineLoadIMG
- engineLoadIFP
- engineLoadTXD
- engineRemoveImage
- engineRemoveShaderFromWorldTexture
- engineReplaceAnimation
- engineReplaceCOL
- engineReplaceModel
- engineRequestModel
- engineResetModelFlags
- engineResetModelLODDistance
- engineResetSurfaceProperties
- engineRestoreAnimation
- engineRestoreCOL
- engineRestoreDFFImage
- engineRestoreModel
- engineRestoreModelPhysicalPropertiesGroup
- engineRestoreObjectGroupPhysicalProperties
- engineRestoreTXDImage
- engineRestreamWorld
- engineSetAsynchronousLoading
- engineSetModelFlag
- engineSetModelFlags
- engineSetModelLODDistance
- engineSetModelPhysicalPropertiesGroup
- engineSetModelVisibleTime
- engineSetObjectGroupPhysicalProperty
- engineSetSurfaceProperties
- engineStreamingFreeUpMemory
- engineStreamingGetUsedMemory