I need to point out that this is not necessarily true, as you can have a 0 duration toggle-able or kept-until-dispelled effect. Sadly there isn't much capability to get data between scripts. It would have been great to have public accessible variables. Faction rank is a good general way for something like that. Depending on the situation you could also make use of the OnHit Event to check the projectile or spell hitting a target. Text example: For the firebolt explosion example you could have it check if an effect is on the target, if not apply a magic effect without duration or hit event. The applied magic effect would start at a hit count of 1 and when the hit event is triggered with the projectile from the firebolt (which you would want to duplicate or create your own to avoid issues) would check to see if the value is greater or equal to 3, if not, +1, Code Example: Projectile: Check for HasMagicEffect being explosion counter effect in conditions of spell. (separate effect from damage of course) Counter Effect:
Projectile Property FireboltProjectile Auto
int HitCount = 1
event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)
if akProjectile == FireboltProjectile
HitCount += 1
if HitCount >= 3
Cast Explosion
Self.Dispel()
endIf
endIf
EndEvent
Note: Untested and mostly psuedo code but should work once adjusted. This method would work for anything triggering a hit event from a specific projectile. You could also trigger it from a certain source or actor firing it, though that has other weirdness possible. Check the page on OnHit for more info.