// technohud-specific animations
//===========================================
// Fix stuck animations
event CompetitiveGame_RestoreChatWindow{
    RunEvent HudHealthDyingPulseStop 0.1
    RunEvent HudHealthBonusPulseStop 0.1
    RunEvent HudLowAmmoPulseStop 0.1
    RunEvent HudMedicChargedStop 0.1
}
//===========================================
//Health Bonus Pulse
event HudHealthBonusPulse
{
	Animate	PlayerStatusHealthBonusImage 	Alpha		"255"		Linear 0.0 0.2
	Animate	PlayerStatusHealthBonusImage 	Alpha		"0"			Linear 0.2 0.4

	Animate PlayerStatusHealthValue		FgColor		"THOverheal"	Linear 0.0	0.075
	Animate PlayerStatusHealthValue		FgColor		"THOverheal2"	Linear 0.125	0.075

	RunEvent HudHealthBonusPulseLoop	0.4
}

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

event HudHealthBonusPulseStop
{
	StopEvent HudHealthBonusPulse 0.0
	StopEvent HudHealthBonusPulseLoop 0.0
	Animate PlayerStatusHealthValue	 		FgColor 	"HealthNumbers" Linear 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 PlayerStatusHealthValue		FgColor		"THLow"			Linear 0.0	0.075
	Animate PlayerStatusHealthValue		FgColor		"THLow2"		Linear 0.125	0.075

	RunEvent HudHealthDyingPulseLoop	0.25
}

// call to loop HudHealthDyingPulse
event HudHealthDyingPulseLoop
{
	RunEvent HudHealthDyingPulse 0.0
}

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

//===========================================
event HudLowAmmoPulse
{
	//Animate	HudWeaponLowAmmoImage		Alpha		"255"		Linear 0.0 0.075
	//Animate	HudWeaponLowAmmoImage		Alpha		"0"			Linear 0.125 0.075

	Animate AmmoInClip						Alpha 		"255" 		Linear 	0.0 0.0
	Animate AmmoInClip 						FgColor 	"THLow" 	Linear 	0.0 0.075
	Animate AmmoInClip						FgColor		"THLow2"	Linear	0.125 0.075

	Animate AmmoInReserve 					Alpha 		"255" 		Linear 	0.0 0.0
	Animate AmmoInReserve					FgColor 	"THLow" 	Linear 	0.0 0.075
	Animate AmmoInReserve					FgColor		"THLow2"	Linear	0.125 0.075

	Animate AmmoNoClip 						Alpha 		"255" 		Linear 	0.0 0.0
	Animate AmmoNoClip						FgColor 	"THLow" 	Linear 	0.0 0.075
	Animate AmmoNoClip						FgColor		"THLow2"	Linear	0.125 0.075

	RunEvent HudLowAmmoPulseLoop	0.25
}

// call to loop HudLowAmmoPulse
event HudLowAmmoPulseLoop
{
	RunEvent HudLowAmmoPulse 0.0
}

event HudLowAmmoPulseStop
{
	StopEvent HudLowAmmoPulse 0.0
	StopEvent HudLowAmmoPulseLoop 0.0

	Animate AmmoInClip							Alpha 		"255" 						Linear 	0.0 0.0
	Animate AmmoInClip 							FgColor 	"MainAmmo" 					Linear 	0.0 0.0

	Animate AmmoInReserve						Alpha 		"255" 						Linear 	0.0 0.0
	Animate AmmoInReserve						FgColor 	"ReserveAmmo" 				Linear 	0.0 0.0

	Animate AmmoNoClip							Alpha 		"255" 						Linear 	0.0 0.0
	Animate AmmoNoClip							FgColor 	"NoClipAmmo" 				Linear 	0.0 0.0
}

//===========================================
// Spy Disguise, also turned off by default
event HudSpyDisguiseChanged
{
    Animate PlayerStatusSpyOutlineImage        Alpha        "0"            Linear 0.0 0.2

    Animate PlayerStatusSpyOutlineImage        Position    "c-350 280"    Linear 0.0 0.2
    Animate PlayerStatusSpyOutlineImage        Size        "150 150"        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
}
//===========================================

//===========================================
// Flash the medic charge hud when we have full charge
event HudMedicCharged
{

	Animate ChargeLabel						FgColor		"THOverheal2"					Linear	0.0		0.0
	Animate ChargeLabelBig					FgColor		"THOverheal2"					Linear	0.0		0.0

	Animate ChargeLabelBigShadowExtra		Alpha		"255"							Linear	0.0		0.0

	Animate ChargeMeter						FgColor		"THOverheal2"					Linear	0.0		0.0

	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		"THUber"	Linear	0.0		0.0001

	Animate	ChargeLabelBig				FgColor		"THUber"	Linear	0.0		0.0001

	Animate	ChargeLabelBigShadow		FgColor		"Black"		Linear	0.0		0.0001
	Animate ChargeLabelBigShadowExtra	Alpha		"0"			Linear	0.0		0.0001

	Animate	ChargeMeter					FgColor		"THUber"	Linear	0.0		0.0001
}
event HudTournamentSetupPanelOpen
{
	Animate HudTournamentSetup			Position	"c-90 -70"	Linear 0.0 0.001
	Animate HudTournamentSetup			Position	"c-90 97"	Spline 0.001 0.2
}

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

//======================================
//GRAVEYARD
event CompetitiveGame_LowerChatWindow{}
event HudTournament_MoveChatWindow{}
event RDPositiveScorePulse{}
event RDNegativeScorePulse{}
event TeamStatus_PlayerDead{}
event TeamStatus_PlayerAlive{}
