SetObjectMaterial Question and Discussion
#5

SetObjectMaterial has the following variables:

1. ObjectID = The object you want to change the textures of.
2. MaterialIndex = Most objects have more than 1 texture. It's likely that you just want to change 1 particular texture. If you take a piece of road, for example, you'll see in Jernel's Map Editor that it has a texture for the road and a texture for the pavement next to the road.
Material 0: pave256
Material 1: road128
If you want to change the texture of the road, in this case you'd use material index 1.
3. ModelID = The object that contains the texture you want to use for ObjectID.
4. Texture = Doubleclick the ModelID in Jernel's Map Editor, and you'll see 1 name next to "Texture:", enter that name in this variable.
5. TXD Textures = Just like the original object, the object that has the texture you want to use usually also has more than 1 texture. To make sure you get the right texture from the object, type the proper texture you want to use from the list in Jernel's Map Editor.
6. If you want to change the color of the texture you're using to replace another texture, enter the color code here in the ABGR format. If you don't want to change the color, just enter 0.

Hope this helps, took me some time to figure out as well
Reply


Messages In This Thread
SetObjectMaterial Question and Discussion - by Ballu Miaa - 07.04.2012, 04:45
Re: SetObjectMaterial Question and Discussion - by Faisal_khan - 07.04.2012, 06:42
Re: SetObjectMaterial Question and Discussion - by HuSs3n - 07.04.2012, 07:57
Re: SetObjectMaterial Question and Discussion - by Ballu Miaa - 07.04.2012, 09:31
Re: SetObjectMaterial Question and Discussion - by Manuel_P - 07.04.2012, 10:11
Re: SetObjectMaterial Question and Discussion - by Ballu Miaa - 07.04.2012, 14:00

Forum Jump:


Users browsing this thread: 1 Guest(s)