//====================================================================================================================

event HudHealthBonusPulse
{
	Animate PlayerStatusHealthBonusImage   Alpha   "255"   Linear   0.0    0.2
	
    Animate PlayerStatusHealthValueShadow             FgColor        "BlackTransparent"                       Linear      0.0        0.8
    Animate PlayerStatusHealthValueShadow             FgColor        "86 133 201 255"                              Linear      0.8        0.8
    Animate PlayerStatusHealthValueShadow             FgColor        "BlackTransparent"                          Linear      1.6        0.8
    Animate PlayerStatusHealthValueShadowExtra       Alpha         "255"                                Accel     0.0     0.0

    Animate PlayerStatusHealthValueTargetShadow 			FgColor		"BlackTransparent"					Linear 	0.0		0.8
  	Animate PlayerStatusHealthValueTargetShadow 			FgColor		"86 133 201 255"					Linear 	0.8		0.8
  	Animate PlayerStatusHealthValueTargetShadow 			FgColor		"BlackTransparent"					Linear 	11.6		0.8
  	Animate PlayerStatusHealthValueTargetShadow 			FgColor		"86 133 201 255"					Linear 	2.4 	0.8

	Animate Health_Spectator					FgColor 	"White" 			Linear 	0.0		0.0
	Animate Health_Spectator_Bar_Buff			Alpha		"255"								Linear 	0.0 	0.0
	Animate Health_Spectator_BG					BgColor 	"0 207 210 255" 						Linear 	0.0		0.0

    RunEvent HudHealthBonusPulseLoop    1.6
}

// call to loop HudHealthBonusPulse
event HudHealthBonusPulseLoop
{
    RunEvent HudHealthBonusPulse 0.0
}

event HudHealthBonusPulseStop
{
    Animate PlayerStatusHealthValueShadow             FgColor        "0 0 0 245"                     Linear      0.0        0.0
	Animate PlayerStatusHealthValueTargetShadow             FgColor        "0 0 0 245"                     Linear      0.0        0.0
	StopEvent PlayerStatusHealthValueTargetShadow 0.0
    StopEvent HudHealthBonusPulse 0.0
    StopEvent HudHealthBonusPulseLoop 0.0
}

//====================================================================================================================

event HudHealthDyingPulse
{
	Animate PlayerStatusHealthBonusImage   Alpha   "235"   Linear   0.0    0.2
	Animate PlayerStatusHealthBonusImage   Alpha    "0"   Linear   0.2   0.0

	Animate PlayerStatusHealthValueTarget		FgColor 	"White" 				Linear 	0.0		0.0

	Animate Health_Spectator					FgColor 	"White" 			Linear 	0.0		0.0
	Animate Health_Spectator_Bar_Buff			Alpha		"255"								Linear 	0.0 	0.0
	Animate Health_Spectator_BG					BgColor 	"255 94 0 255" 						Linear 	0.0		0.0

	RunEvent HudHealthDyingPulseLoop			0.4
}

event HudHealthDyingPulseLoop
{
	RunEvent HudHealthDyingPulse				0.0
}

event HudHealthDyingPulseStop
{
	StopEvent HudHealthDyingPulse				0.0
	StopEvent HudHealthDyingPulseLoop 			0.0
	
	Animate PlayerStatusHealthValue 			FgColor 	"White" 							Linear 	0.0 	0.0

	Animate PlayerStatusHealthValueTarget 		FgColor 	"White" 							Linear 	0.0 	0.0

	Animate Health_Spectator					FgColor 	"White" 					Linear 	0.0		0.0
	Animate Health_Spectator_Bar_Buff			Alpha		"0"									Linear 	0.0 	0.0
	Animate Health_Spectator_BG					BgColor 	"Black" 			Linear 	0.0		0.0
}

//====================================================================================================================

event HudLowAmmoPulse
{
	Animate AmmoInClip     				FgColor     "WhiteTransparent"     				Linear 0.0 0.3
	Animate AmmoInClip    					FgColor     "RedLight"									Linear 0.3 0.6

	Animate AmmoInReserve     				FgColor     "NeonGreen"     				Linear 0.0 0.3
	Animate AmmoInReserve    					FgColor     "RedLight"									Linear 0.3 0.6

  Animate AmmoNoClip     				FgColor     "NeonGreen"     				Linear 0.0 0.3
  Animate AmmoNoClip    					FgColor     "RedLight"									Linear 0.3 0.6

	RunEvent HudLowAmmoPulseLoop				0.9
}

event HudLowAmmoPulseLoop
{
	RunEvent HudLowAmmoPulse					0.1
}

event HudLowAmmoPulseStop
{
	StopEvent HudLowAmmoPulse 					0.0
	StopEvent HudLowAmmoPulseLoop 				0.0

	Animate AmmoInClip 							FgColor 	"WhiteTransparent" 						Linear 	0.0 	0.0

	Animate AmmoInReserve 					FgColor 	"NeonGreen" 					Linear 	0.0 	0.0

	Animate AmmoNoClip 							FgColor 	"WhiteTransparent" 						Linear 	0.0 	0.0
}

//====================================================================================================================
event HudMedicCharged
{
	Animate chargeamount 						FgColor 	"UberBlue" 					Linear 	0.0 	0.8
	Animate chargeamount						FgColor 	"UberGreen" 					Linear 	0.8 	0.8
	
	Animate ChargeLabel 						FgColor 	"UberBlue" 					Linear 	0.0 	0.8
	Animate ChargeLabel						FgColor 	"UberGreen" 					Linear 	0.8 	0.8

	Animate	ChargeMeter 						FgColor		"UberBlue"							Linear 	0.0		0.8
	Animate	ChargeMeter 						FgColor		"UberGreen"						Linear 	0.8		0.8

	//Vaccinator
	Animate	ChargeMeter1 						FgColor		"255 000 000 255"					Linear 	0.0		0.8
	Animate	ChargeMeter1 						FgColor		"255 255 000 255"					Linear 	0.8		0.8
	Animate	ChargeMeter1 						FgColor		"000 255 000 255"					Linear 	1.6		0.8

	Animate	ChargeMeter2 						FgColor		"255 000 000 255"					Linear 	0.0		0.8
	Animate	ChargeMeter2 						FgColor		"255 255 000 255"					Linear 	0.8		0.8
	Animate	ChargeMeter2 						FgColor		"000 255 000 255"					Linear 	1.6		0.8

	Animate	ChargeMeter3 						FgColor		"255 000 000 255"					Linear 	0.0		0.8
	Animate	ChargeMeter3 						FgColor		"255 255 000 255"					Linear 	0.8		0.8
	Animate	ChargeMeter3 						FgColor		"000 255 000 255"					Linear 	1.6		0.8

	Animate	ChargeMeter4 						FgColor		"255 000 000 255"					Linear 	0.0		0.8
	Animate	ChargeMeter4 						FgColor		"255 255 000 255"					Linear 	0.8		0.8
	Animate	ChargeMeter4 						FgColor		"000 255 000 255"					Linear 	1.6		0.8


	RunEvent HudMedicChargedLoop				1.6
}

event HudMedicChargedLoop
{
	RunEvent HudMedicCharged 					0.0
}

event HudMedicChargedStop
{
	StopEvent HudMedicCharged 					0.0
	StopEvent HudMedicChargedLoop 				0.0

	Animate	ChargeLabel 						FgColor		"200 220 243 200"						Linear 	0.0 	0.0001

	Animate	ChargeMeter 						FgColor		"200 220 243 200"						Linear 	0.0		0.0001
}

//====================================================================================================================

event HudTournamentSetupPanelOpen
{
	Animate HudTournamentSetup					Position	"c-41 -100"							Linear 	0.0 	0.001
	Animate HudTournamentSetup					Position	"c-41 35"							Spline 	0.001 	0.2
}

event HudTournamentSetupPanelClose
{
	Animate HudTournamentSetup					Position	"c-41 35"							Linear 	0.0 	0.001
	Animate HudTournamentSetup					Position	"c-41 -100"							Spline 	0.001 	0.2
}

//====================================================================================================================

event FlagOutline
{
	RunEvent FlagOutlineHide 					0.0
	Animate OutlineImage						Alpha		"0"									Linear 	0.1 	0.2

	Animate OutlineImage						Position	"c-200 140"							Linear 	0.1 	0.2
	Animate OutlineImage						Size		"400 200"							Linear 	0.1 	0.2

	Animate OutlineImage						Position	"c-50 r137"							Linear 	0.7 	0.2
	Animate OutlineImage						Position	"c-50 r158"							Linear 	0.7 	0.2
	Animate OutlineImage						Size		"100 50"							Linear 	0.7 	0.2

	Animate OutlineImage						Alpha		"0"									Linear 	0.9 	0.1
}

//====================================================================================================================

event HudSpyDisguiseChanged
{
	Animate PlayerStatusSpyOutlineImage		Alpha		"255"		Linear 0.0 0.2

	Animate PlayerStatusSpyOutlineImage		Position	"c-284 r125"	Linear 0.0 0.2
	Animate PlayerStatusSpyOutlineImage		Size		"130 130"	Linear 0.0 0.2

	RunEvent HudSpyDisguiseHide	0.7
}

event HudSpyDisguiseHide
{
	Animate PlayerStatusSpyOutlineImage		Position	"c-190 r36"	Linear 0.0 0.2
	Animate PlayerStatusSpyOutlineImage		Size		"37 37"		Linear 0.0 0.2

	Animate PlayerStatusSpyOutlineImage		Alpha		"0"		Linear 0.2 0.1
}

event HudSpyDisguiseFadeIn
{
	RunEvent HudSpyDisguiseChanged	0
	Animate PlayerStatusSpyImage			Alpha		"255"			Linear 0.9 0.1

}

event HudSpyDisguiseFadeOut
{
	RunEvent HudSpyDisguiseChanged	0
	Animate PlayerStatusSpyImage			Alpha		"0"				Linear 0.9 0.1
}

//===========================================
//====================================================================================================================

event ActiveTimerHighlight
{
	Animate TimePanelValue 						FgColor		"WhiteTransparent"					Linear 	0.1 	0.1
	Animate TimePanelValue 						FgColor		"WhiteTransparent"					Linear 	0.3 	0.1

	Animate TimePanelValue							FgColor		"WhiteTransparent"					Linear 	0.5 	0.1
	Animate TimePanelValue 						FgColor		"WhiteTransparent"					Linear 	0.7 	0.1

	Animate TimePanelValue 						FgColor		"WhiteTransparent"					Linear 	0.9 	0.1
	Animate TimePanelValue 						FgColor		"WhiteTransparent"					Linear 	1.1 	0.1

	Animate TimePanelValue 						FgColor		"WhiteTransparent"					Linear 	1.3 	0.3
}

event ActiveTimerDim
{
	Animate TimePanelValue 						FgColor		"WhiteTransparent"					Linear 	0.0 	0.4
}
event QuestMap_Start
{
	FireCommand	0.0 "switch_off"
	FireCommand	0.4 "switch_on"

	StopEvent QuestMap_StaticBarOverlayLoop 0
	StopEvent QuestMap_StaticBarOverlayBrighten 0
	StopEvent QuestMap_StaticBarOverlayDarken 0
	StopEvent QuestMap_StaticFadeOut 0
	StopEvent QuestMap_StaticBar1Loop 0
	StopEvent QuestMap_StaticBar2Loop 0

	// Reset
	Animate StaticBar1		ypos -50 Linear 0 0
	Animate StaticBar2		ypos -10 Linear 0 0
	Animate StaticOverlay	alpha 255 Linear 0 0
	Animate StaticOverlay	xpos 270 Linear 0 0
	Animate StaticOverlay	ypos 160 Linear 0 0
	Animate StaticOverlay	wide 0 Linear 0 0
	Animate StaticOverlay	tall 0 Linear 0 0
	Animate BlackOverlay	alpha 255 Linear 0 0
	

	// Grow full wide, and a little tall
	Animate StaticOverlay ypos 155	Accel 0.01 0.25
	Animate StaticOverlay tall 10	Accel 0.01 0.25
	Animate StaticOverlay wide 540	Accel 0.01 0.25
	Animate StaticOverlay xpos 0	Accel 0.01 0.25

	// Grow full tall
	Animate StaticOverlay tall 320	Accel 0.3 0.15
	Animate StaticOverlay ypos 0	Accel 0.3 0.15

	Animate BlackOverlay	alpha 0 Linear 0.6 0
	
	// Start mostly staticy, then reduce to the loop
	RunEvent QuestMap_StaticBarOverlayLoop 2
	RunEvent QuestMap_StaticBar1Loop 0.7
	RunEvent QuestMap_StaticBar2Loop 0.7
}

event QuestMap_MapLoaded
{
	// Remove the black and fade out
	Animate DisconnetedContainer alpha 0 Linear 0.2 0
	Animate BlackOverlay	alpha 0 Linear 0.6 0
	Animate StaticOverlay	alpha	20	Deaccel 0.6 1.2
}

event QuestMap_LoadingLoop
{
	Animate DisconnetedContainer alpha 255 Linear 0 0
}

event QuestMap_StaticFadeOut
{
	RunEvent QuestMap_StaticBar1Loop 0
	RunEvent QuestMap_StaticBar2Loop 0
	// Start mostly staticy, then reduce to the loop
	Animate StaticOverlay	alpha	255	Linear 0 0
	Animate StaticOverlay	alpha	20	Deaccel 0 0.4
	RunEvent QuestMap_StaticBarOverlayLoop 1
}

event QuestMap_StaticBar1Loop
{
	Animate StaticBar1	ypos	-50	Linear 0 0 // Reset
	Animate StaticBar1	ypos	r0	Linear 0 5 
	RunEvent QuestMap_StaticBar1Loop 5
}

event QuestMap_StaticBar2Loop
{
	Animate StaticBar2	ypos	-10	Linear 0 0 // Reset
	Animate StaticBar2	ypos	r0	Linear 0 15 
	RunEvent QuestMap_StaticBar2Loop 15
}

event QuestMap_StaticBarOverlayLoop
{
	RunEvent QuestMap_StaticBarOverlayBrighten 0
	RunEvent QuestMap_StaticBarOverlayDarken 1
}

event QuestMap_StaticBarOverlayBrighten
{
	Animate StaticOverlay	alpha	30	Linear 0 3 
	RunEvent QuestMap_StaticBarOverlayBrighten 3
}

event QuestMap_StaticBarOverlayDarken
{
	Animate StaticOverlay	alpha	1	Linear 0 2
	RunEvent QuestMap_StaticBarOverlayDarken 5
}

event QuestNodeView_PinTipHighlight
{
	Animate PinTipLabel fgcolor TanDark Linear 1	0.2
	Animate PinTipLabel fgcolor TanLight		Linear 1.2	0.2

	Animate PinTipLabel fgcolor TanDark Linear 1.4	0.2
	Animate PinTipLabel fgcolor TanLight		Linear 1.6	0.2
}

event QuestMapIntro_StageReveal
{
	Animate StageDesc	xpos	300 Linear 0 0 
	Animate StageDesc	Alpha	0 Linear 0 0 
	Animate StageDesc	fgcolor	TanDark Linear 0 0

	Animate StageDesc	xpos	270  Deaccel	0 0.4
	Animate StageDesc	Alpha	255 Bias 0.3 0 0.4 
	Animate StageDesc	fgcolor	TanLight Linear 0.4 0.4
}

event QuestMapIntro_ShowStage
{
	Animate IntroDesc	fgcolor	TanDark	Linear 0 0.4
}

event QuestMapIntro_ClearStage
{
	Animate IntroDesc	fgcolor	TanLight	Linear 0 0.4
}

event QuestNodeView_QuestPurchased
{
	FireCommand 2 "show_items"
}

event QuestViewSubPanel_QuestPurchased
{
	Animate ActivationFlash	Alpha 255 Linear 0 0
	Animate ActivationFlash	wide f0 Linear 0 0
	Animate ActivationFlash	ypos 0 Linear 0 0
	Animate ActivationFlash	tall 46 Linear 0 0

	Animate ActivationFlash	Alpha 0 Deaccel 0.2 0.5
	Animate ActivationFlash	wide f0 Deaccel 0 0.5
	Animate ActivationFlash	ypos 46 Linear 0 0.5
	Animate ActivationFlash	tall 0 Linear 0 0.5
	FireCommand 0 "playsoundentry CYOA.OrangePanelCollapse"

	FireCommand 1 "toggle_expand"
	FireCommand 1 "playsoundentry CYOA.objectivepanelexpand"

	SetVisible AcceptButton 0 0 
}

event QuestViewSubPanel_SelectMouseOver
{
	Animate BGImageDarkener Alpha 0 Linear 0 0.1
}

event QuestViewSubPanel_SelectMouseExit
{
	Animate BGImageDarkener Alpha 150 Linear 0 0.1
}

event QuestMap_ShowLegend
{
	Animate Legend ypos 240 Bias 0.6 0 0.2
	Animate Legend Alpha 255 Linear 0.1 0.1
}

event QuestMap_HideLegend
{
	Animate Legend ypos 290 Bias 0.6 0 0.2
	Animate Legend Alpha 0 Linear 0 0.1
}

event QuestMap_CreditNotificationAcknowledge
{
	RunEventChild CreditNotification QuestMap_CreditHideAnim 0
	SetVisible CreditNotification 0 3
}

event QuestMap_CreditHideAnim
{
	SetVisible Body 0 0
	SetVisible OkButton 0 0
	Animate CreditImage xpos 14 Spline 0 1.5
	Animate CreditImage ypos 293 Spline 0 1.5
	Animate CreditImage wide 15 Spline 0 1.5
	Animate CreditImage tall 15 Spline 0 1.5

	Animate StaticBG Alpha 0 Bias 0.7 2 1
	Animate StaticDarken Alpha 0 Bias 0.7 2 1
}

event QuestMap_CreditNotificationShow
{
	RunEventChild CreditNotification QuestMap_CreditShowAnim 0
	SetVisible CreditNotification 1 0
}

event QuestMap_CreditShowAnim
{
	// Reset everything
	Animate CreditImage xpos 245 Linear 0 0
	Animate CreditImage ypos 130 Linear 0 0
	Animate CreditImage wide 50 Linear 0 0
	Animate CreditImage tall 50 Linear 0 0
	Animate CreditImage alpha 255 Linear 0 0
	Animate StaticBG Alpha 255 Linear 0 0
	Animate StaticDarken Alpha 255 Linear 0 0
	SetVisible Body 1 0
	SetVisible OkButton 1 0 
}

event ObjectiveCompletedByUser
{
	Animate ScorerLabel xpos -20 Bias 0.8 0 0.4
	Animate ScorerLabel alpha 0 Linear 1.8 0.2

	Animate ScorerLabelBlur xpos -20 Bias 0.8 0 0.4
	Animate ScorerLabelBlur alpha 0 Linear 1.8 0.2
}

event QuestReport_ContractComplete
{
	RunEventChild QuestCompletionContainer ObjectiveCompletionFanfare 0
	firecommand				3.2 "soundentry plng_contract_fully_completed" 
}

event QuestReport_ContractProgress
{
	RunEventChild QuestCompletionContainer ObjectiveCompletionFanfare 0
	firecommand				3.2 "soundentry plng_contract_partially_completed" 
}

//====================================================================================================================

	// REMOVED
	event TeamStatus_PlayerDead{}
	event TeamStatus_PlayerAlive{}

//====================================================================================================================

event RDPositiveScorePulse
{
	Animate Score 								FgColor		"WhiteTransparent"					Linear 	0.0 	0.0
	Animate Score 								FgColor		"WhiteTransparent"					Linear 	0.1 	0.2
}

event RDNegativeScorePulse
{
	Animate Score 								FgColor		"WhiteTransparent"					Linear	0.0 	0.0
	Animate Score 								FgColor		"WhiteTransparent"					Linear 	0.1 	0.2
}

//====================================================================================================================

event HudSnapShotReminderIn
{
    RunEvent HudHealthDyingPulseStop 			10.0
    RunEvent HudHealthBonusPulseStop 			10.0
    RunEvent HudLowAmmoPulseStop 				10.0
    RunEvent HudMedicChargedStop 				10.0
}

//====================================================================================================================
event HudSpyDisguiseChanged
{
	Animate PlayerStatusSpyOutlineImage		Alpha		"255"			Linear 0.0 0.2

	Animate PlayerStatusSpyOutlineImage		Position	"c-200 c-200"	Linear 0.0 0.2
	Animate PlayerStatusSpyOutlineImage		Size		"400 400"		Linear 0.0 0.2

	RunEvent HudSpyDisguiseHide	0.7
}

event HudSpyDisguiseHide
{
	Animate PlayerStatusSpyOutlineImage		Position	"3 413"			Linear 0.0 0.2
	Animate PlayerStatusSpyOutlineImage		Size		"55 55"			Linear 0.0 0.2

	Animate PlayerStatusSpyOutlineImage		Alpha		"0"				Linear 0.2 0.1
}

event HudSpyDisguiseFadeIn
{
	RunEvent HudSpyDisguiseChanged	0
	Animate PlayerStatusSpyImage			Alpha		"255"			Linear 0.9 0.1
}

event HudSpyDisguiseFadeOut
{
	RunEvent HudSpyDisguiseChanged	0
	Animate PlayerStatusSpyImage			Alpha		"0"				Linear 0.9 0.1
}
//====================================================================================================================