Scriptname _00E_A2_ChaosruneSC extends ObjectReference  

Import _00E_TalentLibrary
Import Utility

;=====================================================================================
;              							EVENTS                   					 
;=====================================================================================

Event OnInit()

	float fZDifference = Math.abs(Self.GetPositionZ() - PlayerREF.GetPositionZ())

	Debug.MessageBox(fZDifference)
	
	If !((fZDifference) > fMaximumZDifference)
		Dash()
	Else
		; Debug.MessageBox("Difference too great!")
	EndIf
	
EndEvent

;=====================================================================================
;              							FUNCTIONS                   					 
;=====================================================================================

Function Dash()

	MAGShoutSprint03.Apply()
	MAGShoutSprintFire.Play(PlayerREF)
	PlayerREF.SplineTranslateToRef(Self, 1.0, 2750.0, 1.0)
	
EndFunction

;=====================================================================================
;              							PROPERTIES                   					 
;=====================================================================================

float fMaximumZDifference = 250.0

Sound Property MAGShoutSprintFire Auto

Actor Property PlayerREF Auto

ImageSpaceModifier Property MAGShoutSprint03 Auto