21.08.2014, 16:24
Hey guys, I'm working on a map which needs a lot of retexturing, about 10x of this;
I don't know much about scripting. Can someone teach me a way around this torture? Is there a way to avoid having to enter a setobjectmaterial for each and ever object? I'm talking about something like this;
Код:
new obj1 = CreateDynamicObject(1937, 116.01868, -176.79443, 14.21660, 0.00000, 0.00000, 90.00000); new obj2 = CreateDynamicObject(1949, 1928.37769, -170.45520, 14.21660, 0.00000, 0.00000, 0.00000); new obj3 = CreateDynamicObject(1944, 119.32312, -175.06409, 12.15660, 0.00000, 0.00000, 90.00000); new obj4 = CreateDynamicObject(1937, 16.01868, -16.79443, 1.21660, 0.00000, 0.00000, 90.00000); new obj5 = CreateDynamicObject(1949, 198.37769, -10.45520, 1.21660, 0.00000, 0.00000, 0.00000); new obj6 = CreateDynamicObject(1944, 19.32312, -17.06409, 1.15660, 0.00000, 0.00000, 90.00000); SetObjectMaterial(obj1, 0, 18237, "cuntwbtzzcs_t", "corugwallnew6_128", 0); SetObjectMaterial(obj2, 0, 18237, "cuntwbtzzcs_t", "corugwallnew6_128", 0); SetObjectMaterial(obj3, 0, 18237, "cuntwbtzzcs_t", "corugwallnew6_128", 0); SetObjectMaterial(obj4, 0, 18237, "cuntwbtzzcs_t", "corugwallnew6_128", 0); SetObjectMaterial(obj5, 0, 18237, "cuntwbtzzcs_t", "corugwallnew6_128", 0); SetObjectMaterial(obj6, 0, 18237, "cuntwbtzzcs_t", "corugwallnew6_128", 0);
Код:
store (orwtfevernativefunction) myobjects; { CreateDynamicObject(1937, 116.01868, -176.79443, 14.21660, 0.00000, 0.00000, 90.00000); CreateDynamicObject(1949, 1928.37769, -170.45520, 14.21660, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1944, 119.32312, -175.06409, 12.15660, 0.00000, 0.00000, 90.00000); CreateDynamicObject(1937, 16.01868, -16.79443, 1.21660, 0.00000, 0.00000, 90.00000); CreateDynamicObject(1949, 198.37769, -10.45520, 1.21660, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1944, 19.32312, -17.06409, 1.15660, 0.00000, 0.00000, 90.00000); } SetObjectMaterial(myobjects, 0, 18237, "cuntwbtzzcs_t", "corugwallnew6_128", 0);