Difference between revisions of "Distinguishing Between Physical and Magickal Hits"

Moved to Solutions category
imported>Diablerie
m (How to determine what hit an actor? moved to How to distinguish between weapon and spell hits?)
imported>Diablerie
(Moved to Solutions category)
Line 32: Line 32:
From what I saw, if the actor is hit by a spell, it will trigger both [[OnMagicEffectHit]] and [[OnHit]]. I'm not sure if the block ordering in the script makes any difference, but in my experiments, the ''OnHit'' block always saw the ''bMagicEffect'' variable set in the ''OnMagicEffectHit'' block. Hopefully, the ''GameMode'' block won't cause a performance hit.
From what I saw, if the actor is hit by a spell, it will trigger both [[OnMagicEffectHit]] and [[OnHit]]. I'm not sure if the block ordering in the script makes any difference, but in my experiments, the ''OnHit'' block always saw the ''bMagicEffect'' variable set in the ''OnMagicEffectHit'' block. Hopefully, the ''GameMode'' block won't cause a performance hit.
-- [[User:Diablerie|Diablerie]] 22:11, 15 April 2006 (EDT)
-- [[User:Diablerie|Diablerie]] 22:11, 15 April 2006 (EDT)
== Solution ==


I think I've found a more elegant solution:
I think I've found a more elegant solution:
Line 47: Line 49:
</pre>
</pre>


It looks like the [[Return]] command terminates the entire ''script'', and not just the block that it's called from. This can be used to have one trigger override another.
It looks like the [[Return]] command terminates the entire ''script'', and not just the block that it's called from. This can be used to have one trigger override another if they are triggered at the same time.
-- [[User:Diablerie|Diablerie]] 23:34, 15 April 2006 (EDT)
-- [[User:Diablerie|Diablerie]] 23:34, 15 April 2006 (EDT)


[[Category:Questions]]
[[Category:Solutions]]
Anonymous user