Hej, mam taki stary skrypt od chickena, który jest nawet okej tyle, że kurczaczek mi go kazał wywoływać w złym miejscu chyba. No to zacząłem go przenosić i wywołuję go w:
func int ZS_MM_Attack_Loop ()
{
PrintDebugNpc (PD_MST_LOOP, "ZS_MM_Attack_Loop");
if (other.attribute[ATR_HITPOINTS] <= 0)
{
B_MM_AssessBody(); // springt in ZS_EatBody, wenn Monster Beute mag
return 1; // oder beendet Loop
};
Npc_GetTarget(self); //other = target
if (Hlp_IsValidNpc(other) && !C_NpcIsDown(other))
{
PrintDebugNpc (PD_MST_LOOP, "...Ziel vorhanden!");
if C_BodyStateContains(other,BS_RUN)
|| C_BodyStateContains(other,BS_JUMP)
{
PrintDebugNpc (PD_MST_LOOP, "...Ziel läuft oder springt!");
if (Npc_GetStateTime (self) > self.aivar[AIV_MM_FollowTime]) // x Sekunden verfolgen
{
PrintDebugNpc(PD_MST_CHECK, "...Ziel schon zu lange verfolgt!");
return 1;
};
}
else if (C_BodystateContains(other,BS_SWIM) || C_BodystateContains(other,BS_DIVE))
{
if (self.aivar[AIV_MM_FollowInWater] == FALSE)
{
return 1;
};
}
else
{
Npc_SetStateTime (self,0);
};
if (other.aivar[AIV_INVINCIBLE]==FALSE) // Nur NSCs angreifen, die NICHT im Talk sind
{
AI_Attack (self);
//////////////////
//////////////////////////////
////////////////////////////
////////////////////////
////////////TUUUUUU
///////////////
CheckPoison(self);
//////////////////
//////////////////////
//////////////
////////////////
/////////////////////
};
}
else // GetTarget = FALSE
{
PrintDebugNpc (PD_ZS_CHECK, "...Ziel ist ungültig oder kampf-unfähig!");
if (self.aivar[AIV_MM_Behaviour] == HUNTER)
{
Npc_ClearAIQueue(self);
AI_StartState (self, ZS_MM_EatBody, 0, "");
}
else // Monster NICHT auf der Jagd - weitere Feinde Attacken
{
Npc_PerceiveAll (self); // nötig, da Npc_GetNextTarget() auf der Liste der zuletzt Wahrgenommenen VOBs beruht
Npc_GetNextTarget (self);
PrintGlobals (PD_ZS_DETAIL);
if (Hlp_IsValidNpc(other) && !C_NpcIsDown(other))
{
PrintDebugString (PD_MST_CHECK, "...neues Ziel gefunden: ", other.name);
}
else
{
PrintDebugNpc (PD_MST_CHECK, "...kein Neues Ziel vorhanden!");
return LOOP_END;
};
};
};
return LOOP_CONTINUE;
};
Jednak problem jest takowy, że potwór mnie nie trafi a i tak już bohater jest zatruty. Tak jakby się to w momencie celowania aktywowało. Poradzicie gdzie to wsadzić?