Scriptname BaboFollowerBrawlingPlayerRef extends ReferenceAlias  

Event OnEnterBleedOut()

If BleedOutMechanism == True
	If GetOwningQuest().GetStage() == LastStage
		FaintOut()
	EndIf
EndIf
EndEvent

Function FaintOut()
		If GetOwningQuest().GetStage() == StartStage
			If	FoeSwitch == False || (Foe01.getref() as actor).isdead() == False
				Debug.Notification("No..! I cant be defeated like this..!")
				BFMQuest.NPCFactionSwap(GetActorReference(), None, None, None, BaboBattlePlayer, None)
				Game.ForceThirdPerson()
				Game.GetPlayer().RestoreActorValue("health", 100)
				BFMQuest.FaintMotionPlay(Game.getplayer())
				If NexStage01Switch == True
					GetOwningQuest().SetStage(NextStage01)
				EndIf
				
				If FaintSwitch
					BFMQuest.BFFaintCount()
				EndIf

				If  NextScene01Switch == True
					NextScene01.Start()
				EndIf

				If BacktoNormal
					Utility.Wait(5.0)
					PlayerEssential.clear()
					Game.EnablePlayerControls(abmenu =true)
				Endif
			Endif
		EndIf

EndFunction


Int Property StartStage auto
Int Property NextStage01 auto
Int Property LastStage auto
bool Property RotatedAnimationFixEnabled = false Auto Hidden
Function ResetThirdPersonCamera() Native Global

Scene Property NextScene01 Auto
Scene Property NextScene02 Auto

Bool Property NexStage01Switch Auto
Bool Property NextScene01Switch Auto

Bool Property BleedOutMechanism = False Auto
Bool Property FaintSwitch  = false Auto

Bool Property FoeSwitch = false Auto
Bool Property BacktoNormal = false Auto

Referencealias property Foe01 Auto
Referencealias property PlayerRefrence Auto

GlobalVariable Property BaboCombatEssentialSwitch Auto

Quest Property BaboSetEssentialScript Auto
Referencealias Property PlayerEssential Auto

BaboFollowerMasterScript Property BFMQuest Auto

Idle Property staggerStart  Auto

Faction Property BaboBattlePlayer Auto