#--------------------------------------------- # Start state #--------------------------------------------- state Base { Conditions { if LevelValue "Stat" != 0 goto Activate } Actions { NoRingSeg Disable } } #--------------------------------------------- # Activates the character #--------------------------------------------- state Activate { Conditions { if LevelValue "Stat" == 0 goto Base if LevelValue "Stat" == 1 goto GoToGuardPoint if LevelValue "Stat" == 2 goto SmashFloor } Actions { Enable SetLevelValue "type OTim" "value 0.0" } } #--------------------------------------------- # Returns to the main guarding point #--------------------------------------------- state GoToGuardPoint { Conditions { if LevelValue "Stat" != 1 goto Activate } Actions { GotoLocator SetState "Think" } } #--------------------------------------------- # Decides how to attack the opponenet #--------------------------------------------- state Think { Conditions { if LevelValue "Stat" != 1 goto Activate if GotOpponent == 0.0 goto Patrol if LevelValue "OTim" > 10.0 and if BossOpponentRange < 4.0 goto GoToSmashFloorPoint if BossOpponentRange > 5.0 goto MoveToOpponenet if BossOpponentRange < 3.0 goto Attack if Random < 0.1 goto CircleClockwise if PreviousResult < 0.2 goto CircleAntiClockwise if PreviousResult < 1.0 goto Attack } Actions { # Face the opponent for 10 years (New consol will be out by then, so will switch this one off) FaceOpponent "314496000.0" } } #--------------------------------------------- # Looks for an opponent #--------------------------------------------- state Patrol { Conditions { if LevelValue "Stat" != 1 goto Activate if GotOpponent == 1.0 goto Think } Actions { FollowPlayer "WALK" } } #--------------------------------------------- # Moves towards the opponent #--------------------------------------------- state MoveToOpponenet { Conditions { if LevelValue "Stat" != 1 goto Activate if BossOpponentRange < 3.0 goto Attack if LevelValue "OTim" > 10.0 goto GoToSmashFloorPoint } Actions { FollowOpponent "RUN" "2.0" } } #--------------------------------------------- # Attacks the opponent #--------------------------------------------- state Attack { Conditions { if LevelValue "Stat" != 1 goto Activate if Timer > 1.5 goto Think } Actions { ResetTimer #EngageOpponent "goalrange 2.5" "firerange 5.5" "instant" PressActionButton } } #--------------------------------------------- # Cicles around the opponenet clockwise #--------------------------------------------- state CircleClockwise { Conditions { if LevelValue "Stat" != 1 goto Activate if Timer > 1.0 goto Think } Actions { ResetTimer CircleOpponent "1.6" "walk" "facing" "CLOCKWISE" } } #--------------------------------------------- # Cicles around the opponenet anticlockwise #--------------------------------------------- state CircleAntiClockwise { Conditions { if LevelValue "Stat" != 1 goto Activate if Timer > 1.0 goto Think } Actions { ResetTimer CircleOpponent "1.6" "walk" "facing" "ANTICLOCKWISE" } } #--------------------------------------------- # Smashes the floor with his club #--------------------------------------------- state GoToSmashFloorPoint { Conditions { } Actions { SetLevelValue "type Stat" "value 2.0" GotoLocator SetState "SmashFloor" } } #--------------------------------------------- # Smashes the floor with his club #--------------------------------------------- state SmashFloor { Conditions { if LevelValue "Stat" != 2 goto Activate if LevelValue "OHit" > 4.0 goto SmashEnd } Actions { PressActionButton Idle "mintime 2.0" "maxtime 3.0" SetState "SmashFloor" } } #--------------------------------------------- # Ends the floor smashing #--------------------------------------------- state SmashEnd { Conditions { if LevelValue "Stat" != 2 goto Activate } Actions { Idle "mintime 2.0" "maxtime 3.0" SetLevelValue "type Stat" "value 1.0" SetLevelValue "type OTim" "value 0.0" SetState "Think" } } #--------------------------------------------- # The ogre has been hit #--------------------------------------------- state TakenHit { Conditions { } Actions { SetState "SmashEnd" } }