void main() { effect eVis = EffectVisualEffect(VFX_FNF_ELECTRIC_EXPLOSION); effect eKnock = EffectKnockdown(); effect eDamg = EffectDamage((d100()), DAMAGE_TYPE_ELECTRICAL); object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, 10.0f, GetLocation(OBJECT_SELF)); while(GetIsObjectValid(oTarget)) { if(GetLocalInt(oTarget, "Has_Been_Hit") != 1) { float fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20 + 0.5f; ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF); SetLocalInt(GetNearestObjectByTag("hal_catoma"), "Device_Broken", TRUE); DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamg, oTarget)); DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eKnock, oTarget, 10.0f)); SetLocalInt(oTarget, "Has_Been_Hit", 1); DelayCommand(0.5f, SetLocalInt(oTarget, "Has_Been_Hit", 0)); } oTarget = GetNextObjectInShape(SHAPE_SPHERE, 10.0f, GetLocation(OBJECT_SELF)); } object oBall1 = GetNearestObjectByTag("hal_catoba1"); object oBall2 = GetNearestObjectByTag("hal_catoba2"); object oBall3 = GetNearestObjectByTag("hal_catoba3"); object oBody = GetNearestObjectByTag("hal_catoma"); effect eElec; DelayCommand(1.5f, DestroyObject(oBall1)); DelayCommand(1.5f, DestroyObject(oBall2)); DelayCommand(1.5f, DestroyObject(oBall3)); DestroyObject(oBody); if(GetTag(GetArea(OBJECT_SELF)) == "haq_smca1") { CreateObject(OBJECT_TYPE_CREATURE, "hal_otmftm", GetLocation(GetWaypointByTag("hal_spotm1"))); } else if(GetTag(GetArea(OBJECT_SELF)) == "haq_smca2") { CreateObject(OBJECT_TYPE_CREATURE, "hal_otmftm", GetLocation(GetWaypointByTag("hal_spotm2"))); } else if(GetTag(GetArea(OBJECT_SELF)) == "haq_smca3") { CreateObject(OBJECT_TYPE_CREATURE, "hal_otmftm", GetLocation(GetWaypointByTag("hal_spotm3"))); } else if(GetTag(GetArea(OBJECT_SELF)) == "haq_smca4") { CreateObject(OBJECT_TYPE_CREATURE, "hal_otmftm", GetLocation(GetWaypointByTag("hal_spotm4"))); } }