#--------------------------------------------- # Start state #--------------------------------------------- state Base { Conditions { if LevelValue "Stat" != 0 goto Control } Actions { Disable } } #--------------------------------------------- # Activates the character & chooses the state #--------------------------------------------- state Control { Conditions { if LevelValue "Stat" == 0 goto Base if LevelValue "Stat" == 1 goto HoverThink if LevelValue "Stat" == 2 goto KnockedOut } Actions { Enable } } #--------------------------------------------- # Makes the character hover & decides what to do #--------------------------------------------- state HoverThink { Conditions { if LevelValue "Stat" != 1 goto Control if LevelValue "AtOp" == 1.0 goto Attack } Actions { } } #--------------------------------------------- # Chooses the attack #--------------------------------------------- state Attack { Conditions { if LevelValue "Stat" != 1 goto Control if Random < 0.5 goto Attack1 if PreviousResult < 1.1 goto Attack2 } Actions { } } #--------------------------------------------- # Performs the characters first attack move #--------------------------------------------- state Attack1 { Conditions { if LevelValue "Stat" != 1 goto Control } Actions { SetActionValue "value 1" "waitcontextfree" WaitActionFinished SetState "AttackEnd" } } #--------------------------------------------- # Performs the characters second attack move #--------------------------------------------- state Attack2 { Conditions { if LevelValue "Stat" != 1 goto Control } Actions { SetActionValue "value 2" "waitcontextfree" WaitActionFinished SetState "AttackEnd" } } #--------------------------------------------- # Performs the characters attack move #--------------------------------------------- state AttackEnd { Conditions { if LevelValue "Stat" != 1 goto Control } Actions { Idle "mintime 1.3" "maxtime 1.3" SetState "HoverThink" } } #--------------------------------------------- # Controls the character while it is knocked out #--------------------------------------------- state KnockedOut { Conditions { if LevelValue "Stat" != 2 goto Control if LevelValue "PanC" == 1 goto Recover } Actions { Idle "mintime 14.0" "maxtime 14.0" SetState "Recover" } } #--------------------------------------------- # Makes the character recover from being knocked out #--------------------------------------------- state Recover { Conditions { if LevelValue "Stat" != 2 goto Control } Actions { Idle "mintime 1.0" "maxtime 1.0" SetLevelValue "type Reco" "value 0.0" } }