Revolution-Designes Posted May 23, 2009 Share Posted May 23, 2009 (edited) Hello everybod, I'm having a (little) problem with creating/adding objects in the main.scm. I'm currently developing a Total Conversion mod for GTA: San Andreas, i have almost completed a small city and i have currently 4 missions. In the fourth mission someone is blowing up a bridge, so i have made 2 models of the bridge. A destroyed bridge model an a normal/repaired bridge. First i have added my normal/repaired bridge to the IPL file of my mod: 5055, newbrug2, 0, -347.577, 128.117, 21.12, 0, 0, 0.707106, 0.707107, -1 It works perfectly and everything is fine. Now i have deleted that line in the IPL and created this line in the object.dat file: newbrug2 99999.999, 1000.0, 0.97, 0.05, 50.0, 201.0, 0.75, 1, 1, 0, 0, 2, 0.0, 0.0, 3.0, none I defined the object in the main.scm: DEFINE OBJECTS 3DEFINE OBJECT SANNY BUILDER 3.04 DEFINE OBJECT BRIEFCASEDEFINE OBJECT NEWBRUG2 And created the model in the main.scm: Model.Load(#NEWBRUG2)038B: load_requested_models and:MAIN_560wait 0 if and Model.Available(#NEWBRUG2)else_jump @MAIN_560and0107: $91 = create_object #NEWBRUGCOL2 at -347.577, 128.117, 21.12 I have the exact same coordinates as in the IPL file but my model is 3 times higher in the air as it should be. But that is not all, the draw distance of the model is very low, so i can only see it when i am near the model. Does anybody knows how i can solve this problem? Grtz RD Edited May 23, 2009 by Revolution-Designes Link to comment Share on other sites More sharing options...
james227uk Posted May 23, 2009 Share Posted May 23, 2009 For the height, lower the Z coord Link to comment Share on other sites More sharing options...
ZAZ Posted May 23, 2009 Share Posted May 23, 2009 This line dont allow comma: 0107: $91 = create_object #NEWBRUGCOL2 at -347.577, 128.117, 21.12 should be: 0107: $91 = create_object #NEWBRUGCOL2 at -347.577 128.117 21.12 only classes can have comma this version $91 = Object.Create(#A51_JETDOOR, -347.577, 128.117, 21.12) the draw distance of the model is very low, so i can only see it when i am near the model. ask for that in the map section CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
Revolution-Designes Posted May 23, 2009 Author Share Posted May 23, 2009 Thanks for the reply's, the bridge is now at the good place. But the only problem is the draw distance now, when i use the IPL to create the object the draw distance is normal and good. But if i use a code in the main.scm, then is the draw distance very low. Grtz RD Link to comment Share on other sites More sharing options...
gtasearcher Posted May 24, 2009 Share Posted May 24, 2009 But the only problem is the draw distance now, when i use the IPL to create the object the draw distance is normal and good.But if i use a code in the main.scm, then is the draw distance very low. Grtz RD I think you'll have to also create the LOD as an object standing in the same place. Link to comment Share on other sites More sharing options...
Revolution-Designes Posted May 24, 2009 Author Share Posted May 24, 2009 But the only problem is the draw distance now, when i use the IPL to create the object the draw distance is normal and good.But if i use a code in the main.scm, then is the draw distance very low. Grtz RD I think you'll have to also create the LOD as an object standing in the same place. But the question is how? Link to comment Share on other sites More sharing options...
Dutchy3010 Posted May 24, 2009 Share Posted May 24, 2009 I don't know much about modelling, so that is a bit of a problem. Perhaps you can make a script that checks if the player is outside a certain radius, and if so, you delete the normal bridge and add the col version? Never tested this tough. DYOM - Create, play, share! Link to comment Share on other sites More sharing options...
PatrickW Posted May 24, 2009 Share Posted May 24, 2009 This should be possible, as the same things happens in SA also. e.g. when the crack factory in San Fiero is blown up, the model is also replaced, and this is a model with a LOD.. There are 4 models: #CRACKFACT_SFS // The normal factory #CF_EXT_DEM_SFS // The damaged factory #LODCRACKFACT_SFS // the LOD of the normal factory #LODEXT_DEM_SFS // the LOD of the damaged factory The following pieces of code from the main.scm are accessing them Initializing the normal objects: 0776: create_objects_in_object_group "CRACK" 0363: create_object_at -2166.86 -236.5 40.86 radius 40.0 model #CRACKFACT_SFS visibility 1 0363: create_object_at -2185.49 -215.55 34.31 radius 40.0 model #CF_EXT_DEM_SFS visibility 0 0363: create_object_at -2166.86 -236.5 40.86 radius 40.0 model #LODCRACKFACT_SFS visibility 1 0363: create_object_at -2185.49 -215.55 34.31 radius 40.0 model #LODEXT_DEM_SFS visibility 0 Switching to damage objects: 0777: delete_objects_in_object_group "CRACK" 0363: create_object_at -2166.86 -236.5 40.86 radius 40.0 model #CRACKFACT_SFS visibility 0 0363: create_object_at -2185.49 -215.55 34.31 radius 40.0 model #CF_EXT_DEM_SFS visibility 1 0363: create_object_at -2166.86 -236.5 40.86 radius 40.0 model #LODCRACKFACT_SFS visibility 0 0363: create_object_at -2185.49 -215.55 34.31 radius 40.0 model #LODEXT_DEM_SFS visibility 1 Link to comment Share on other sites More sharing options...
ZAZ Posted May 24, 2009 Share Posted May 24, 2009 Or replace the model of a map object like the cement hubhole of deconstruction 03B6: replace_model_at -2049.171 250.3193 34.477 radius 20.0 from #HUBHOLE1_SFSE to #HUBHOLE2_SFSE I had tested with SF garage 03B6: replace_model_at -2049.171 250.3193 34.477 radius 20.0 from #OLDGARAGE_SFS to #MISSION_08_SFS needs to insert the exact coords of the mapobject and if the model dont fits you get holes in the col CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
james227uk Posted May 24, 2009 Share Posted May 24, 2009 I had tested with SF garage 03B6: replace_model_at -2049.171 250.3193 34.477 radius 20.0 from #OLDGARAGE_SFS to #MISSION_08_SFS needs to insert the exact coords of the mapobject and if the model dont fits you get holes in the col What change does that make? I can't remember Link to comment Share on other sites More sharing options...
ZAZ Posted May 24, 2009 Share Posted May 24, 2009 I had tested with SF garage 03B6: replace_model_at -2049.171 250.3193 34.477 radius 20.0 from #OLDGARAGE_SFS to #MISSION_08_SFS needs to insert the exact coords of the mapobject and if the model dont fits you get holes in the col What change does that make? I can't remember #OLDGARAGE_SFS was not changed in the story. Its a test to see whats possible it replace Doherty garage with an other building CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
james227uk Posted May 24, 2009 Share Posted May 24, 2009 I had tested with SF garage 03B6: replace_model_at -2049.171 250.3193 34.477 radius 20.0 from #OLDGARAGE_SFS to #MISSION_08_SFS needs to insert the exact coords of the mapobject and if the model dont fits you get holes in the col What change does that make? I can't remember #OLDGARAGE_SFS was not changed in the story. Its a test to see whats possible it replace Doherty garage with an other building Ok. Cool. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now