Scriptname nDragonActorScript extends actor

actor me

Event OnLoad()

me = self
		registerForAnimationEvent(self, "DragonBiteEffect")
		registerForAnimationEvent(self, "DragonLandEffect")
		registerForAnimationEvent(self, "DragonForcefulLandEffect")
Endevent

	EVENT onAnimationEvent(objectReference dragonref, string eventName)
		If (eventName == "DragonBiteEffect")
			;debug.notification("===========DD AnimEvent=========== " + me + " bite stagger effect.")
			debug.trace("===========DD AnimEvent=========== " + me + " bite stagger effect.")
			me.docombatspellapply(xDragonBiteStagger, me.GetCombatTarget())
		elseIf (eventName == "DragonlLandEffect")
			If dKnockdownEnabled.Value > 0
				debug.trace("===========DD AnimEvent===========> " + me + " is knocking back actors.")
				xDragonLandingArea.cast(me)
			Endif
		elseIf (eventName == "DragonForcefulLandEffect")
			If dKnockdownEnabled.Value > 0
				debug.trace("===========DD AnimEvent===========> " + me + " is knocking back actors.")
				xDragonLandingArea.cast(me)
			Endif
		endif
	endEVENT

Spell Property xDragonLandingArea auto
SPELL Property xDragonBiteStagger  Auto  
GlobalVariable Property dKnockdownEnabled  Auto  