event HudTournamentSetupPanelOpen
{
	Animate HudTournamentSetup	Position	"c-90 -70"	Linear 0.0 0.001
	Animate HudTournamentSetup	Position	"c-90 90"	Spline 0.001 0.2
}

event HudTournamentSetupPanelClose
{
	Animate HudTournamentSetup	Position	"c-90 90"	Linear 0.0 0.001
	Animate HudTournamentSetup	Position	"c-90 -70"	Spline 0.001 0.2
}

//==========================================================================================================================
// CROSSHAIR ANIMATION
//--------------------------------------------------------------------------------------------------------------------------
// event DamagedPlayer
// {
// 	Animate CustomCrosshair		FgColor     "Hitmarker"		Linear 	0.0 	0.00001
// 	Animate CustomCrosshair		FgColor     "Crosshair"		Linear 	0.10 	0.10001
// }

//==========================================================================================================================
// SPY DISGUISE
//--------------------------------------------------------------------------------------------------------------------------
event HudSpyDisguiseFadeIn
{
	RunEvent HudSpyDisguiseChanged		0.0
	Animate PlayerStatusSpyImage		Alpha		"255"				Linear 0.9	0.1
}

event HudSpyDisguiseFadeOut
{
	RunEvent HudSpyDisguiseChanged		0.0
	Animate PlayerStatusSpyImage		Alpha		"0"					Linear 0.9	0.1
}
//==========================================================================================================================
// HEALTH ANIMATION
//--------------------------------------------------------------------------------------------------------------------------
//Health Bonus Pulse
event HudHealthBonusPulse
{
	Animate	PlayerStatusHealthBonusImage 	Alpha		"255"			Linear 0.0 0.2
	Animate	PlayerStatusHealthBonusImage 	Alpha		"0"				Linear 0.2 0.4

	Animate	PlayerStatusHealthImageOverheal 	Alpha		"255"			Linear 0.0 0.0
	
	Animate	PlayerHealthValue			FgColor		"HealthGain" Accel 0.0 0.0
	Animate PlayerStatusHealthValue 		FgColor		"HealthGain" Accel 0.0 0.0
	Animate PlayerStatusHealthValueSpectator 		FgColor		"HealthGain" Accel 0.0 0.0
	Animate PlayerStatusHealthValueFreezePanel 		FgColor		"HealthGain" Accel 0.0 0.0

	RunEvent HudHealthBonusPulseLoop	0.4
}

event HudHealthBonusPulseStop
{
	StopEvent HudHealthBonusPulse 0.0
	StopEvent HudHealthBonusPulseLoop 0.0
	
	Animate	PlayerStatusHealthImageOverheal 	Alpha		"0"			Linear 0.0 0.0
	
	Animate	PlayerHealthValue			FgColor		"HealthNormal" Accel 0.0 0.0
	Animate PlayerStatusHealthValue 		FgColor		"HealthNormal" Accel 0.0 0.0
	Animate PlayerStatusHealthValueSpectator 		FgColor		"HealthNormal" Accel 0.0 0.0
	Animate PlayerStatusHealthValueFreezePanel 		FgColor		"WhitHealthNormale" Accel 0.0 0.0
}

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

//Health Dying Pulse
event HudHealthDyingPulse
{
	Animate	PlayerStatusHealthBonusImage 	Alpha		"255"			Linear 0.0 0.075
	Animate	PlayerStatusHealthBonusImage 	Alpha		"0"				Linear 0.125 0.075
	
	Animate	PlayerHealthValue			FgColor		"HealthLow"	Accel 0.0 0.0
	Animate PlayerStatusHealthValue 		FgColor		"HealthLow" Accel 0.0 0.0
	Animate PlayerStatusHealthValueSpectator 		FgColor		"HealthLow" Accel 0.0 0.0
	Animate PlayerStatusHealthValueFreezePanel 		FgColor		"HealthLow" Accel 0.0 0.0
	
	RunEvent HudHealthDyingPulseLoop	0.25
}

event HudHealthDyingPulseStop
{
	StopEvent HudHealthDyingPulse 0.0
	StopEvent HudHealthDyingPulseLoop 0.0
	
	Animate	PlayerHealthValue			FgColor		"HealthNormal" Accel 0.0 0.0
	Animate PlayerStatusHealthValue 		FgColor		"HealthNormal" Accel 0.0 0.0
	Animate PlayerStatusHealthValueSpectator 		FgColor		"HealthNormal" Accel 0.0 0.0
	Animate PlayerStatusHealthValueFreezePanel 		FgColor		"HealthNormal" Accel 0.0 0.0
}
//==========================================================================================================================
// UBERCHARGE ANIMATION
//--------------------------------------------------------------------------------------------------------------------------
//Health Bonus Pulse
event HudMedicCharged
{
	Animate	ChargeLabel 	FgColor		"UberForeground"		Linear 0.0 0.1
	Animate	ChargeLabel 	FgColor		"HealthGain"		Linear 0.3 0.6
	
	Animate	ChargeMeter 	FgColor		"UberForeground"		Linear 0.0 0.1
	Animate	ChargeMeter 	FgColor		"HealthGain"		Linear 0.3 0.6

	Animate	UberReadyCross 	Alpha		"255"			Linear 0.0 0.1
	Animate	UberReadyCross 	Alpha		"0"				Linear 0.3 0.6

	RunEvent HudMedicChargedLoop	0.6
}

// call to loop HudHealthBonusPulse
event HudMedicChargedLoop
{
	RunEvent HudMedicCharged 0.0
}

event HudMedicChargedStop
{
	StopEvent HudMedicCharged 0.0
	StopEvent HudMedicChargedLoop 0.0
	
	Animate	ChargeLabel 	FgColor		"UberForeground"		Linear 0.0 0.0001
	Animate	ChargeMeter 	FgColor		"UberForeground"		Linear 0.0 0.0001
	Animate	UberReadyCross 	Alpha		"0"				Linear 0.0 0.0001
}

event HudSnapShotReminderIn
{
	Animate ScreenshotPanel		Position	"c-83 -50"	Linear 0.0 0.001
	Animate ScreenshotPanel		Position	"c-83 25"	Spline 0.001 0.2
}

event HudReplayReminderIn	// Places the replay reminder in the same place as the snapshot reminder
{
	Animate ReplayReminder		Position	"c-83 -50"	Linear 0.0 0.001
	Animate ReplayReminder		Position	"c-83 25"	Spline 0.001 0.2
}

event HudReplayReminderIn2	// Puts the panel below the snapshot panel
{
	Animate ReplayReminder		Position	"c-83 -50"	Linear 0.0 0.001
	Animate ReplayReminder		Position	"c-83 65"	Spline 0.001 0.2
}
//==================================================================================

event TeamStatus_PlayerDead
{
	SetVisible	respawntime	1	0
}

event TeamStatus_PlayerAlive
{
	SetVisible	respawntime	0	0.2
}
//==================================================================================

event RDPositiveScorePulse { }
event RDNegativeScorePulse { }

//===========================================
// Spy Disguise
event HudSpyDisguiseChanged
{
	Animate PlayerStatusSpyOutlineImage		Alpha		"255"			Linear 0.0 0.2
	
	Animate PlayerStatusSpyOutlineImage		Position	"c-225 r220"	Linear 0.0 0.2
	Animate PlayerStatusSpyOutlineImage		Size		"220 220"		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	
}

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

event HudTournament_ShowTimerCompetitive
{
	Animate CountdownLabel ypos 90 Linear 0 0
	Animate CountdownLabelShadow ypos 91 Linear 0 0
	SetVisible CountdownBG  1 0
	SetVisible CountdownLabel 1 0
	SetVisible CountdownLabelShadow 1 0
}

event HudTournament_ShowTimerDefault
{
	Animate CountdownLabel ypos 123 Linear 0 0
	Animate CountdownLabelShadow ypos 124 Linear 0 0
	SetVisible CountdownBG  1 0
	SetVisible CountdownLabel 1 0
	SetVisible CountdownLabelShadow 1 0
}

event CompetitiveGame_RestoreChatWindow
{
	Animate HudChat ypos 260 Accel 0 0  //Default animation
	//Fix stuck animations
	RunEvent HudHealthDyingPulseStop 0.1
	RunEvent HudHealthBonusPulseStop 0.1
	RunEvent HudLowAmmoPulseStop 0.1
	RunEvent HudMedicChargedStop 0.1
}