Jump to content
Sign in to follow this  
Thrash

config variables??

Recommended Posts

OK, I've got a small question relating to variables in the config of a model.

for example, I've got a rock which i want to use on my island with different textures around the map. Is it possible to specify somewhere/somehow in the config, multiple objects using the same p3d file (of the rock), but somehow references a different texture depending on the object parameters.... like maybe some kind of 'texture_name' variable???

...Rather than having multiple p3d files with different textures mapped to each...

Share this post


Link to post
Share on other sites

Unfortunately, the config class name for island objects is hard-coded to use the p3d model name. So, no, you can't have multiple "land_" classes, and have them all point to the same model. You basically need to duplicate the model, with different textures each time.

Share this post


Link to post
Share on other sites

@fabiantronc

Fortunately tanks and other vehicles are not 'island objects' and do not require the classname to be preceded by Land_, so GB is quite correct.

Planck

Share this post


Link to post
Share on other sites

^ nice... but i believe that video is only demonstrating the ability to change texture using a script and setObjectTexture.

What i'm looking for is the ability to  define more than 1 class of object using the same p3d and each class uses different textures....

Eg: Rock_Blue, Rock_Red, Rock_Green all use 1 p3d file but the textures (or path to textures) are defined in the config.

By watching that video i can see that it is possible to change textures using code... i just need to somehow code that into the config.

Edit: ahh, Planck posted while i was writing...it's starting to look like it's not possible...

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×