; Helper States
;---------------------------------------------------------------------------
; Hawk Intro - Idle
[Statedef 8000]
type = S
movetype = I
anim = 8000
sprpriority = 5

[State 8000, BindToParent]
type = BindToParent
trigger1 = Time < 45
facing = 1
pos = 55,-115
time = 2

[State 8000, PlaySnd]
type = PlaySnd
trigger1 = Time = 40
value = 10, 20
channel = 1

[State 8000, 1]
type = ChangeState
trigger1 = Time = 50
value = 8001

;---------------------------------------------------------------------------
; Hawk Intro - Flying
[Statedef 8001]
type = A
movetype = I
anim = 8001
velset = 4,-1
sprpriority = 5

[state 8000, 1]
type = PosAdd
trigger1 = Time = 0
y = -10

[state 8000, 2]
type = DestroySelf
trigger1 = Time = 100

;---------------------------------------------------------------------------
; Hawk Win - Flying
[Statedef 8010]
type = A
movetype = I
anim = 8010
velset = 1.5,7
sprpriority = 5

[State 8010, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = 10, 20
channel = 1

[State 8010, VelAdd]
type = VelAdd
trigger1 = Time < 50
y = -.2

[State 8010, VelSet]
type = VelSet
trigger1 = Time >= 52
x = 0
y = 0

[State 8010, VarSet]
type = ParentVarSet
trigger1 = Time >= 70
v = 0
value = 1

[State 8010, State]
type = ChangeState
trigger1 = Time >= 70
value = 8011

;---------------------------------------------------------------------------
; Hawk Win - Idle
[Statedef 8011]
type = S
movetype = I
velset = 0,0
sprpriority = 5

[State 8010, Anim]
type = ChangeAnim
trigger1 = Time = 1
value = 8011

[State 8010, BindToParent]
type = BindToParent
trigger1 = Anim = 8011
trigger1 = AnimElem = 1 < 5
facing = -1
pos = 60,-110
time = 2

[State 8010, BindToParent]
type = BindToParent
trigger1 = Anim = 8011
trigger1 = AnimElem = 1 >= 5
facing = -1
pos = 55,-100
time = 2

[State 8010, BindToParent]
type = BindToParent
trigger1 = Anim = 8011
trigger1 = AnimElem = 2, >= 0
facing = -1
pos = 55,-103
time = 2

;---------------------------------------------------------------------------
; Hawk Win 2 - Flying
[Statedef 8020]
type = A
movetype = I
anim = 8010
velset = 0,0
sprpriority = 5

[State 8020, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = 10, 20
channel = 1

[State 8020, PosAdd X]
type = PosAdd
trigger1 = RootDist X > 40
x = 2

[State 8020, PosAdd Y]
type = PosAdd
trigger1 = RootDist Y > 115
y = 2

[State 8020, PosAdd X]
type = PosAdd
trigger1 = RootDist X < 40
x = -1

[State 8020, PosAdd Y]
type = PosAdd
trigger1 = RootDist Y < 115
y = -1

[State 8020, State]
type = ChangeState
trigger1 = Time >= 50
value = 8021

;---------------------------------------------------------------------------
; Hawk Win 2 - Idle
[Statedef 8021]
type = S
movetype = I
anim = 8012
velset = 0,0
sprpriority = 5

[State 8020, BindToParent]
type = BindToParent
trigger1 = 1
facing = 1
pos = -30,-110
time = 2

;---------------------------------------------------------------------------
