Element/Building: Difference between revisions
Fernando187 (talk | contribs) mNo edit summary |
Fernando187 (talk | contribs) mNo edit summary |
||
Line 6: | Line 6: | ||
Buildings cannot be created with dynamic object model IDs (like a door that opens when you push it), they are meant to be used for static objects, mainly buildings as the name suggests. For example, [https://dev.prineside.com/en/gtasa_samp_model_id/model/1502-Gen_doorINT04/ object ID 1502 (Gen_doorINT04) is a dynamic object model]. On the other hand, [https://dev.prineside.com/en/gtasa_samp_model_id/model/3556-compmedhos3_LAe/ object ID 3556 (compmedhos3_LAe) is non-dynamic], you can use it with [[createBuilding]]. | Buildings cannot be created with dynamic object model IDs (like a door that opens when you push it), they are meant to be used for static objects, mainly buildings as the name suggests. For example, [https://dev.prineside.com/en/gtasa_samp_model_id/model/1502-Gen_doorINT04/ object ID 1502 (Gen_doorINT04) is a dynamic object model]. On the other hand, [https://dev.prineside.com/en/gtasa_samp_model_id/model/3556-compmedhos3_LAe/ object ID 3556 (compmedhos3_LAe) is non-dynamic], you can use it with [[createBuilding]]. | ||
Created buildings can have '''LOD models''', which is possible using [[createBuilding]] to spawn the LOD building, then [[setLowLODElement]] to associate it with the non-LOD building element. LOD model distance changed with [[engineSetModelLODDistance]] affects buildings too. | |||
==Related scripting functions== | ==Related scripting functions== |
Revision as of 10:08, 8 October 2024
The building class represents static, 3D models in the GTA world. Examples of buildings include building models, roads, and terrain. Buildings, unlike objects, can contain glass and shadows.
The element type of this class is "building".
Buildings cannot be created with dynamic object model IDs (like a door that opens when you push it), they are meant to be used for static objects, mainly buildings as the name suggests. For example, object ID 1502 (Gen_doorINT04) is a dynamic object model. On the other hand, object ID 3556 (compmedhos3_LAe) is non-dynamic, you can use it with createBuilding.
Created buildings can have LOD models, which is possible using createBuilding to spawn the LOD building, then setLowLODElement to associate it with the non-LOD building element. LOD model distance changed with engineSetModelLODDistance affects buildings too.