17.03.2014, 04:06
Code:
Problem:
I wanted to create a UFO that floats a point, and is then drive-able! My plan was to create a "RC Goblin", create the "Lil Probe Inn" sign, set its materials to nothing, then attach it to the RC...
What Happened:
Ok well, I can create the RC and UFO sign, I can also successfully attach the sign to the rc after setting the materials, and I can link the rc to another interior. All is well until the SetObjectMaterials were not working correctly... Instead of setting the indexes i specified, EVERY MATERIAL ON THE OBJECT GETS SET! What is wrong with it...
Here is the materials for the ufo:
I want to remove the 0 1 2 and 3, but when I set any of them, all of them are affected, also why is there two 0s and 1s? The only materials I wanna keep are the last two, 0 and 1...
pawn Код:
new Saucer = CreateObject (16778, 0.0, 0.0, 50.0, 0.0, 0.0, 0.0, 0.0),
Vehh = CreateVehicle(501, 0.0, 0.0, 50.0, 0.0, 0, 0, 0 );
SetObjectMaterial(Saucer, 0, 19475, "signsurf", "sign");
SetObjectMaterial(Saucer, 1, 19475, "signsurf", "sign");
SetObjectMaterial(Saucer, 2, 19475, "signsurf", "sign");
SetObjectMaterial(Saucer, 3, 19475, "signsurf", "sign");
AttachObjectToVehicle(Saucer, Vehh, 0, 0, -5.125, 0, 0, 0);
LinkVehicleToInterior(Vehh, 500);
I wanted to create a UFO that floats a point, and is then drive-able! My plan was to create a "RC Goblin", create the "Lil Probe Inn" sign, set its materials to nothing, then attach it to the RC...
What Happened:
Ok well, I can create the RC and UFO sign, I can also successfully attach the sign to the rc after setting the materials, and I can link the rc to another interior. All is well until the SetObjectMaterials were not working correctly... Instead of setting the indexes i specified, EVERY MATERIAL ON THE OBJECT GETS SET! What is wrong with it...
Here is the materials for the ufo:
Quote:
Material: 0 split: 0 Tex: Metal3_128 Material: 0 split: 0 Alp: Metal3_128 Material: 1 split: 1 Tex: electricbox256 Material: 1 split: 1 Alp: electricbox256 Material: 2 split: 2 Tex: bonyrd_skin1 Material: 2 split: 2 Alp: bonyrd_skin1 Material: 3 split: 3 Tex: des_probesign Material: 3 split: 3 Alp: des_probesign Material: 0 split: 0 Tex: banding3_64HV Material: 0 split: 0 Alp: banding3_64HV Material: 1 split: 1 Tex: dam_turbine Material: 1 split: 1 Alp: dam_turbine |