i have this code that handles the attack impact event via a redirection from the original script.
case EVENT_TYPE_ATTACK_IMPACT:
{
object oAttacker = GetEventObject(ev, 0);
object oTarget = GetEventObject(ev, 1);
int nHitResult = GetEventInteger(ev, 0);
int nEffectId = GetEventInteger(ev,1);
effect eImpactEffect = GetAttackImpactDamageEffect(oAttacker,nEffectId);
if(oAttacker == GetHero())
{
float fDistance = GetDistanceBetween(GetHero(), oTarget);
if(fDistance > 3.0)
{
nHitResult = FALSE;
}
if(Combat_GetFlankingBonus(oAttacker, oTarget) > 0.0)
{
if(GetTag(oTarget) == "gale_inquisitor")
{
Effects_ApplyInstantEffectDamage(GetObjectByTag("gale_inquisitor"), oAttacker, 20.0);
}
}
i haven't come up with any other approach to solving these problems but i don't like that this everytime something is hit all of these checks will have to be done even though they are only relevant to one encounter. is there some other way of doing the same thing but not as redudant?
something unpleasant
Débuté par
gordonbrown82
, août 27 2010 06:31





Retour en haut






