EngineReplaceModel notes: Difference between revisions
Jump to navigation
Jump to search
(Created page with "=Replacing models in the original GTA map= Replacing models in the original GTA map may not work correctly. There are two work arounds: ==Work around 1:== Move camera away du...") |
(No difference)
|
Revision as of 06:33, 12 June 2014
Replacing models in the original GTA map
Replacing models in the original GTA map may not work correctly. There are two work arounds:
Work around 1:
Move camera away during replace process:
local modelId = 12853 setCameraMatrix( 10000, 0, 0 ) -- Move camera far away col = engineLoadCOL( "garage.col" ) txd = engineLoadTXD( "garage.txd" ) dff = engineLoadDFF( "garage.dff", 0 ) engineReplaceCOL( col, modelId ) engineImportTXD( txd, modelId ) engineReplaceModel( dff, modelId ) setTimer( function() setCameraTarget( localPlayer ) -- Move camera back after a delay end ,50,1 )
Work around 2:
Create custom object and hide original:
(Requires col, txd and dff)
local modelId = 12853 local x,y,z = 661, -561, 17 obj = createObject( modelId, x,y,z ) removeWorldModel( modelId, 100, x,y,z ) -- Hide original col = engineLoadCOL( "garage.col" ) txd = engineLoadTXD( "garage.txd" ) dff = engineLoadDFF( "garage.dff", 0 ) engineReplaceCOL( col, modelId ) engineImportTXD( txd, modelId ) engineReplaceModel( dff, modelId )