EngineImageLinkTXD: Difference between revisions
Jump to navigation
Jump to search
(Created page with "__NOTOC__ {{Client function}} {{New feature/item|4|1.6.0|21695|This function links TXD file with an IMG container.}} {{Warning|This article is incomplete and may contain errors}} ==Syntax== <syntaxhighlight lang="lua"> img engineImageLinkTXD ( img img_file, string file_path, int modelID ) </syntaxhighlight> {{OOP||EngineIMG}} ===Required Arguments=== * '''img_file''': The IMG file you want to link. * '''file_path''': Path to the TXD file you want to li...") |
TheNormalnij (talk | contribs) No edit summary |
||
Line 3: | Line 3: | ||
{{New feature/item|4|1.6.0|21695|This function links TXD file with an IMG container.}} | {{New feature/item|4|1.6.0|21695|This function links TXD file with an IMG container.}} | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
boolean engineImageLinkTXD ( img img_file, string file_path, int modelID ) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
{{OOP||[[ | {{OOP||[[img]]:linkTXD}} | ||
===Required Arguments=== | ===Required Arguments=== | ||
* '''img_file''': The [[IMG]] file you want to link. | * '''img_file''': The [[IMG]] file you want to link. | ||
Line 19: | Line 18: | ||
Returns ''true'' if [[IMG]] file was successfully linked, ''false'' otherwise. | Returns ''true'' if [[IMG]] file was successfully linked, ''false'' otherwise. | ||
==Example== | |||
== | |||
You could use the following code: | |||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
-- Load IMG | |||
local img = engineLoadIMG( "file.img" ) | |||
-- Enable streaming from this IMG | |||
engineAddImage( img ) | |||
-- Get model TXD id | |||
local infernusModelID = 411 | |||
local infernusModelTxdID = engineGetModelTXDID( infernusModelID ) | |||
-- Link DFF and TXD to IMG files | |||
engineImageLinkDFF( img, "infernus.dff", infernusModelID ) | |||
engineImageLinkTXD( img, "infernus.txd", infernusModelTxdID ) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
==See Also== | ==See Also== | ||
{{Engine_functions}} | {{Engine_functions}} |
Revision as of 20:09, 10 April 2023
Syntax
boolean engineImageLinkTXD ( img img_file, string file_path, int modelID )
OOP Syntax Help! I don't understand this!
- Method: img:linkTXD(...)
Required Arguments
- img_file: The IMG file you want to link.
- file_path: Path to the TXD file you want to link.
- modelID: ID of the model you want to link to.
Returns
Returns true if IMG file was successfully linked, false otherwise.
Example
You could use the following code:
-- Load IMG local img = engineLoadIMG( "file.img" ) -- Enable streaming from this IMG engineAddImage( img ) -- Get model TXD id local infernusModelID = 411 local infernusModelTxdID = engineGetModelTXDID( infernusModelID ) -- Link DFF and TXD to IMG files engineImageLinkDFF( img, "infernus.dff", infernusModelID ) engineImageLinkTXD( img, "infernus.txd", infernusModelTxdID )
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