I am on the progress of making the pushaway to have area effect via the activator
(using the idea of Call Lightning spell in CS Wiki tutorial) which
I make a spell(with area effect 10 ) to let activator cast on the creature and push other actor away.
But from this I encounter few problems. Here are the script that I used
CODE
ScriptName NKKMagicalMeleeScript
;This script makes the actor push the combat target away
;and activate the area effect spell
Ref HitTarget ; the reference for combat target
Ref Hitter ; the reference for actor
Ref Source ;the reference for activator
begin GameMode
if IsInCombat == 1
Set HitTarget to GetCombatTarget
Set Hitter to GetSelf
if Hitter.IsAttacking == 1
source.MoveTo hitter, 0, 0, 1
Hitter.PushActorAway HitTarget 100
source.cast NKKStompSpell Hitter
StopCombat ; To make the creature seek for another
closer actor, not chasing the flying one
endif
endif
End
CODE
scriptname NKKStompSpellScript
;The script for the spell which the activator cast
ref me ;holds a reference to the actor who affected by this spell
ref source ;holds a reference to the activator
Begin ScriptEffectStart
;get a reference to this actor
set me to GetSelf
;have the activator cast the at the affected actor
source.pushactoraway me 50
End
The problem is that I dunno way to get the hitter reference in
MeleeScript and use it in the StompSpellScript. So I can't make s
ome code on preventing the spell script affects on the the creature
(if I add a damage effect on the spell, it will kill the creature real quick)
The other problem is the positioning on activator(I think).
Since I am actually using the activator to push actor away,
so even when I stand very far from the creature, I still got pushed away sometime.
Please give me some advice,