Chciałem żeby, po wpisaniu w skrypcie postaci czegoś innego niż MALE/FEMALE w płeć, Postać wyglądała jak owca (Ten kod to ostatni eksperyment, było ich wiele innych ale najczęściej kończyły się syntax errorem)
// ***********************************************
// B_SetNpcVisual
// --------------
// die Hautfabe wird hier ÜBERGANGEN (ist immer 0)
// und muß manuell korrekt gesetzt werden!
// Ausserdem gibt es nur EIN Nacktmesh für Männer
// und EINS für Frauen
// ***********************************************
func void B_SetNpcVisual (var C_NPC slf, var int gender, var string headMesh, var int faceTex, var int bodyTex, var int armorInstance)
{
slf.aivar[AIV_Gender] = gender;
//Mdl_SetVisual (self, "Sheep.mds");
//Mdl_SetVisual (slf,"HUMANS.MDS");
if (gender == MALE)
{
// ------ Visual ------ "body_Mesh", bodyTex SkinColor headMesh, faceTex, teethTex, armorInstance
Mdl_SetVisualBody (slf, "hum_body_Naked0", bodyTex, 0, headMesh, faceTex, 0, armorInstance);
// ------ schwache NSCs sind schmal ------
if (slf.attribute[ATR_STRENGTH] < 50)
{
Mdl_SetModelScale (slf, 0.9, 1, 1); //BREITE / Höhe / Tiefe
};
// ------ starke NSCs sind breit ------
if (slf.attribute[ATR_STRENGTH] > 100)
{
Mdl_SetModelScale (slf, 1.1, 1, 1); //BREITE / Höhe / Tiefe
};
}
else //gender == FEMALE
{
if(gender == FEMALE)
{
if (bodyTex >= 0) && (bodyTex <= 3) //MännerBodyTex angegeben
{
//bodyTex = bodyTex + 4; // Females haben Variation 4-7 (Males 0-3)
};
// ------ Visual ------ "Bab_body_Mesh", bodyTex SkinColor headMesh, faceTex, teethTex, armorInstance
//Mdl_SetVisualBody (slf, "Hum_Body_Babe0", bodyTex, 0, headMesh, faceTex, 0, armorInstance);
}
else
{
// Body-Mesh Body-Tex Skin-Color Head-MMS Head-Tex Teeth-Tex ARMOR
Mdl_SetVisualBody (slf, "Sheep_Body", DEFAULT, DEFAULT, "", DEFAULT, DEFAULT, -1);
};
};
};