Jump to content

Game crashes on load object!


Hoss212

Recommended Posts

Yo, when i try to load my custom object (dff) the game totally crashes. The files only 182kb. It's basically a piece of land I modeled in 3ds. Similar to the one located below...

http://www.gtaforums.com/index.php?show ... 36&hl=Land

Here is my code...

function landSpawn () 
dff = engineLoadDFF ( "cardboardbox4.dff", 0 ) 
engineReplaceModel ( dff, 1221 ) 
createObject ( 1221, -2320.8413085938, -1630.1979980469, 483.3268737793 ) 
end 
addCommandHandler ( "island", landSpawn ) 

META

<meta> 
    <script src="main.lua" type="client"/> 
    <file src="cardboardbox4.dff"/> 
</meta> 

Link to comment

Tried a small box and it definitely still fails. I'm modeling in 3ds max and using Kam's DFF export. Could it possibly be something wrong with the collision file? I made a blank collision file and exported the .dff with it so yeah... but maybe I need the collision file somewhere in the resource or code?

Link to comment

well anyone knows with basic GTA editing for a custom model to work it needs a .txd and a .col to function proply.

so you will need to add this

  
txd = engineLoadTXD ( "cardboardbox4.txd" ) 
engineImportTXD ( txd, 1221 ) 
col= engineLoadCOL ( "cardboardbox4.col" ) 
engineReplaceCOL ( col, 1221 ) 
  

Link to comment
well anyone knows with basic GTA editing for a custom model to work it needs a .txd and a .col to function proply.

[/code]

You don't need a collision file or a txd, you can import a dff on it's own creating an untextured model.

Hoss this is very strange because I've recently created a model in gmax, not got 3DS yet :P, and used Kams scripts and it worked fine....

Link to comment

Well, in Kams 3ds Max one you can't export the model as a dff without 'specefying' a col (collision) file. And all I did was just make a blank collision file just to export it. Possibly somthing wrong with the code? Because my friend put it all together...

Link to comment

Try to open .col file (which you created) with CollEditor (also available on gtaforums.com) and see if collision exist.

If 'Skip Col' doesn't help, try to export the object mesh to .col and then attach it to dff while exporting to .dff.

I tried with a simple box and it works, but couldn't load the textures. I've posted about it somewhere in other topic.

Link to comment

Wow Twig thanks! Definitely worked now! Would you please mind telling me what you did or sending me that plug in you have for 3ds max or w/e? I got 3ds Max 2008. Thanks a lot! Just make a quick tutorial starting from 1) Make your 3d model, and then after that so on! :) Thanks again!

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...