Jump to content

enchantment magic effects script I have


silhouett

Recommended Posts

Ok here is the enchantment magic effects script I have working off the explosion of an arrow. Any one want to point to me why it is not working ?

 

Scriptname HitByAnArrow extends ObjectReference

actor victim

 

Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, \

bool abBashAttack, bool abHitBlocked)

 

Victim = (akAggressor as actor)

 

debug.trace("The Victim just got hit")

victim.ModAV("Health", -500) ; Test to see if character dieshttp://forums.nexusmods.com/public/style_emoticons/dark/thumbsup.gif

 

 

EndEvent

 

 

 

Thank you for any helphttp://forums.nexusmods.com/public/style_emoticons/dark/confused.gif

Link to comment
Share on other sites

Ok I tried something like this but could not get this to work either... (I am new to this scripting)http://forums.nexusmods.com/public/style_emoticons/dark/wallbash.gif

Perhaps an example could better help me ?http://forums.nexusmods.com/public/style_emoticons/dark/thumbsup.gif

 

 

 

ScriptName arrow extends ActiveMagicEffect

;======================================================================================;

; Knockout /

;=============/

Actor victim

bool Property gotyou Auto

 

 

bool function gothit()

 

debug.trace("The Victim just got hit")

 

victim.SetGhost(True)

 

endFunction

 

bool function undo()

 

debug.trace("undo")

 

victim.SetGhost(false)

 

endFunction

 

 

Event OnEffectStart(Actor Target, Actor Caster)

Debug.Trace("Start of gothit")

Victim = Target

if gothit== False

gothit()

gotyou = True

endif

 

 

EndEvent

 

 

 

Event OnEffectFinish(Actor Target, Actor Caster)

Debug.Trace("End of gothit")

Victim = Target

if gotyou== true

undo()

gotyou = false

endif

 

EndEvent

 

 

It's an object reference script?

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...