//===========================================
//	AntsHUD animations
//===========================================

//Health Bonus Pulse
event HudHealthBonusPulse
{
	Animate	HealthBG			BgColor		"HPBuffBG"		Accel 0.0 0.0
    Animate	HealthBG			Alpha		"255"			Accel 0.0 0.2
	Animate	HealthBG			Alpha		"0"				Accel 0.2 0.4
	Animate	TargetHealthBG		BgColor		"HPBuffBG"		Accel 0.0 0.0
    Animate	TargetHealthBG		Alpha		"255"			Accel 0.0 0.2
	Animate	TargetHealthBG		Alpha		"0"				Accel 0.2 0.4
	Animate	SpecHealthBG		BgColor		"HPBuffBG"		Accel 0.0 0.0
    Animate	SpecHealthBG		Alpha		"255"			Accel 0.0 0.2
	Animate	SpecHealthBG		Alpha		"0"				Accel 0.2 0.4
	Animate	FreezeHealthBG		BgColor		"HPBuffBG"		Accel 0.0 0.0
    Animate	FreezeHealthBG		Alpha		"255"			Accel 0.0 0.2
	Animate	FreezeHealthBG		Alpha		"0"				Accel 0.2 0.4
	
	Animate PlayerStatusHealthValue 				FgColor 	"HPBuffFG"	Accel 0.0 0.0
	Animate PlayerStatusHealthValueSpectator		FgColor 	"HPBuffFG" 	Accel 0.0 0.0
	Animate PlayerStatusHealthValueFreezePanel	 	FgColor 	"HPBuffFG" 	Accel 0.0 0.0
	
	RunEvent HudHealthBonusPulseLoop	0.44
}

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

event HudHealthBonusPulseStop
{
	StopEvent HudHealthBonusPulse 0.0
	StopEvent HudHealthBonusPulseLoop 0.0

	Animate	HealthBG				BgColor		"Blank"	       Accel 0.0 0.0
    Animate	HealthBG				Alpha		"255"		   Accel 0.0 0.0
	Animate	TargetHealthBG			BgColor		"Blank"	       Accel 0.0 0.0
    Animate	TargetHealthBG			Alpha		"255"		   Accel 0.0 0.0
	Animate	SpecHealthBG			BgColor		"Blank"	       Accel 0.0 0.0
    Animate	SpecHealthBG			Alpha		"255"		   Accel 0.0 0.0
	Animate	FreezeHealthBG			BgColor		"Blank"	       Accel 0.0 0.0
    Animate	FreezeHealthBG			Alpha		"255"		   Accel 0.0 0.0
	
	Animate PlayerStatusHealthValue 				FgColor 	"HPNormalFG"	Accel 0.0 0.0
	Animate PlayerStatusHealthValueSpectator		FgColor 	"HPNormalFG" 	Accel 0.0 0.0
	Animate PlayerStatusHealthValueFreezePanel	 	FgColor 	"HPNormalFG" 	Accel 0.0 0.0
}

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

//Health Dying Pulse
event HudHealthDyingPulse
{	
	Animate	HealthBG			BgColor		"HPHurtBG"		Accel 0.0 0.0
    Animate	HealthBG			Alpha		"255"			Accel 0.0 0.2
	Animate	HealthBG			Alpha		"0"				Accel 0.2 0.4
	Animate	TargetHealthBG		BgColor		"HPHurtBG"		Accel 0.0 0.0
    Animate	TargetHealthBG		Alpha		"255"			Accel 0.0 0.2
	Animate	TargetHealthBG		Alpha		"0"				Accel 0.2 0.4
	Animate	SpecHealthBG		BgColor		"HPHurtBG"		Accel 0.0 0.0
    Animate	SpecHealthBG		Alpha		"255"			Accel 0.0 0.2
	Animate	SpecHealthBG		Alpha		"0"				Accel 0.2 0.4
	Animate	FreezeHealthBG		BgColor		"HPHurtBG"		Accel 0.0 0.0
    Animate	FreezeHealthBG		Alpha		"255"			Accel 0.0 0.2
	Animate	FreezeHealthBG		Alpha		"0"				Accel 0.2 0.4
	
	Animate PlayerStatusHealthValue 				FgColor 	"HPHurtFG"	Accel 0.0 0.0
	Animate PlayerStatusHealthValueSpectator		FgColor 	"HPHurtFG" 	Accel 0.0 0.0
	Animate PlayerStatusHealthValueFreezePanel	 	FgColor 	"HPHurtFG" 	Accel 0.0 0.0
	
	RunEvent HudHealthDyingPulseLoop	0.44
}

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

event HudHealthDyingPulseStop
{
	StopEvent HudHealthDyingPulse 0.0
	StopEvent HudHealthDyingPulseLoop 0.0

	Animate	HealthBG				BgColor		"Blank"	       Accel 0.0 0.0
    Animate	HealthBG				Alpha		"255"		   Accel 0.0 0.0
	Animate	TargetHealthBG			BgColor		"Blank"	       Accel 0.0 0.0
    Animate	TargetHealthBG			Alpha		"255"		   Accel 0.0 0.0
	Animate	SpecHealthBG			BgColor		"Blank"	       Accel 0.0 0.0
    Animate	SpecHealthBG			Alpha		"255"		   Accel 0.0 0.0
	Animate	FreezeHealthBG			BgColor		"Blank"	       Accel 0.0 0.0
    Animate	FreezeHealthBG			Alpha		"255"		   Accel 0.0 0.0
	
	Animate PlayerStatusHealthValue 				FgColor 	"HPNormalFG"	Accel 0.0 0.0
	Animate PlayerStatusHealthValueSpectator		FgColor 	"HPNormalFG" 	Accel 0.0 0.0
	Animate PlayerStatusHealthValueFreezePanel	 	FgColor 	"HPNormalFG" 	Accel 0.0 0.0
}

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

event HudLowAmmoPulse
{	
	Animate LowAmmoBG 	BgColor 	"LowAmmoBG" 	Accel 0.0 0.0
	Animate LowAmmoBG 	Alpha 		"255" 		Accel 0.0 0.2
	Animate LowAmmoBG 	Alpha		"0"		Accel 0.2 0.4
	
	Animate AmmoInClip 		FgColor "LowAmmoClipFG"		Linear 0.0 0.0
	Animate AmmoInReserve 	FgColor "LowAmmoTotalFG" 		Linear 0.0 0.0
	Animate AmmoNoClip 		FgColor "LowAmmoClipFG"		Linear 0.0 0.0
	
	RunEvent HudLowAmmoPulseLoop	0.44		//0.25 for normal
}

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

event HudLowAmmoPulseStop
{
	StopEvent HudLowAmmoPulse 0.0
	StopEvent HudLowAmmoPulseLoop 0.0

	Animate LowAmmoBG 	BgColor 	"Blank" 	Linear 0.0 0.0
	Animate LowAmmoBG 	Alpha		"255"		Linear 0.0 0.4
	
	Animate AmmoInClip 		FgColor "AmmoClipFG"		Linear 0.0 0.0
	Animate AmmoInReserve 	FgColor "AmmoTotalFG" 		Linear 0.0 0.0
	Animate AmmoNoClip 		FgColor "AmmoClipFG"		Linear 0.0 0.0
}

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

// Health and Ammo Animation Fix - Thanks mastercommns
event HudSnapShotReminderIn
{
	RunEvent HudHealthDyingPulseStop 10.0
	RunEvent HudHealthBonusPulseStop 10.0
	RunEvent HudLowAmmoPulseStop 10.0
	RunEvent HudMedicChargedStop 10.0
}

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

// Local player flag pickup/drop
event FlagOutline
{
	RunEvent FlagOutlineHide 0.0
	Animate OutlineImage	Alpha		"255"			Linear 0.1 0.2
	
	Animate OutlineImage	Position	"c-100 260"		Linear 0.1 0.2		// "c-200 140"
	Animate OutlineImage	Size		"200 100"		Linear 0.1 0.2		// "400 200"
	
	Animate OutlineImage	Position	"c-22 r60"		Linear 0.7 0.2
	Animate OutlineImage	Size		"44 22"			Linear 0.7 0.2
	
	Animate OutlineImage	Alpha		"0"				Linear 0.9 0.1
}

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

// Spy Disguise
event HudSpyDisguiseChanged
{
	Animate PlayerStatusSpyOutlineImage		Alpha		"255"			Linear 0.0 0.2
	
	Animate PlayerStatusSpyOutlineImage		Position	"c-250 c-50"	Linear 0.0 0.2		// 200 200
	Animate PlayerStatusSpyOutlineImage		Size		"150 150"		Linear 0.0 0.2		// 400 400

	RunEvent HudSpyDisguiseHide	0.7
}

event HudSpyDisguiseHide
{
	Animate PlayerStatusSpyOutlineImage		Position	"c-290 r90"		Linear 0.0 0.2
	Animate PlayerStatusSpyOutlineImage		Size		"40 40"			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	
	//Animate PlayerStatusClassImage		Size		"40 40"			Linear 0.0 0.0
}

event HudSpyDisguiseFadeOut
{
	RunEvent HudSpyDisguiseChanged	0
	Animate PlayerStatusSpyImage			Alpha		"0"				Linear 0.9 0.1	
	//Animate PlayerStatusClassImage		Size		"0 0"			Linear 0.0 0.0
}

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

// Flash the medic charge hud when we have full charge
event HudMedicCharged
{
	Animate	ChargeMeter 	FgColor		"UberBarColor"				Linear 0.0 0.2
	Animate	ChargeMeter 	FgColor		"FlashUberColor"			Linear 0.3 0.2
	Animate	ChargeMeter 	FgColor		"RGBFlashUberColor1"		Linear 0.0 0.2
	Animate	ChargeMeter 	FgColor		"RGBFlashUberColor2"		Linear 0.3 0.2
	Animate	ChargeMeter 	FgColor		"RGBFlashUberColor3"		Linear 0.0 0.2

	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	ChargeMeter 	FgColor		"UberBarColor"		Linear 0.0 0.0001
}

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

event DamagedPlayer
{
	Animate KnucklesCrosses	 	FgColor 	"CrosshairDamage" 		Linear 0.0 0.0
	Animate KnucklesCrosses	 	FgColor 	"Crosshair" 			Linear 0.15 0.0
	
	StopEvent HitMarker 0.0
	RunEvent HitMarker 0.01
	
	// The colors for CrosshairDamage and Crosshair can be changed under custom
	// colors in colors.res in the resource/scheme folder. Alternatively, you can
	// use RGBA. 
}

event HitMarker
{
	Animate	Hitmarker	Alpha	"255"	Linear 0.0 0.0		// Hitmarker start
	Animate	Hitmarker	Alpha	"0"		Linear 0.0 0.95 	// Hitmarker end
}

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

// Match Animations
event CompetitiveGame_LowerChatWindow
{
}

event CompetitiveGame_RestoreChatWindow
{
}

event HudTournament_MoveChatWindow
{
}

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

event HudTournament_MoveTimerDown
{
	Animate CountdownLabel ypos 150 Linear 0 0
	Animate CountdownLabelShadow ypos 150 Linear 0 0


	SetVisible CountdownBG 0 5
	SetVisible CountdownLabel 1 0
	SetVisible CountdownLabelShadow 1 0

	Animate CountdownLabel ypos c-3 Gain 0.75 0 0.4
	Animate CountdownLabelShadow ypos c-3 Gain 0.75 0 0.4

	SetVisible	TournamentConditionLabel 0 2

	SetVisible CountdownLabel 0 3
	SetVisible CountdownLabelShadow 0 3
}
event HudTournament_AnimateTeams_In
{
	Animate RedTeamPanel xpos c150 Accel 0 0.25
	Animate BlueTeamPanel xpos c-300 Accel 0 0.25
}

event HudTournament_AnimateTeams_Out
{
	Animate RedTeamPanel xpos r-5 Accel 0 0.68
	Animate BlueTeamPanel xpos -155 Accel 0 0.68
}

event HudMatchStatus_ShowMatchStartDoors
{
	SetVisible	MatchDoors	1	0
	SetVisible	BlueTeamPanel	1	0
	SetVisible	RedTeamPanel	1	0
	SetVisible CountdownLabel 1 0
	SetVisible CountdownLabelShadow 1 0
	Animate CountdownLabel ypos 150 Linear 0 0
	Animate CountdownLabelShadow ypos 152 Linear 0 0

	Animate CountdownLabel ypos c-3 Gain 0.75 0 0.4
	Animate CountdownLabelShadow ypos c-1 Gain 0.75 0 0.4

	SetVisible	HudTournamentBG 0	2
	RunEventChild MatchDoors PlayDoorCloseAnim 0
	RunEventChild FrontParticlePanel PlayDoorSlamParticles 0.45
	RunEventChild MatchDoors PlayDoorOpenAnim 7

	RunEvent HudTournament_AnimateTeams_In 0.25
	RunEvent HudTournament_AnimateTeams_Out 7.70

	SetVisible MatchDoors	0 9
	SetVisible CountdownLabel 0 9.9
	SetVisible CountdownLabelShadow 0 9.9

	RunEvent HudTournament_DoorsCleanup 10
	
	SetVisible CountdownBG 1 11
}

event HudMatchStatus_ShowCountdown
{
	SetVisible CountdownLabel 1 0
	SetVisible CountdownLabelShadow 1 0
	Animate CountdownLabel ypos 150 Linear 0 0
	Animate CountdownLabelShadow ypos 152 Linear 0 0
	Animate CountdownLabel ypos c-3 Gain 0.75 0 0.4
	Animate CountdownLabelShadow ypos c-1 Gain 0.75 0 0.4
	SetVisible CountdownLabel 0 9.9
	SetVisible CountdownLabelShadow 0 9.9
}

event HudTournament_DoorsCleanup
{
	SetVisible	MatchDoors	0	0
	SetVisible	BlueTeamPanel	0	0
	SetVisible	RedTeamPanel	0	0

	Animate RedTeamPanel xpos r-5 Accel 0 0
	Animate BlueTeamPanel xpos -155 Accel 0 0
}

event PlayDoorSlamParticles
{
	FireCommand 0 "start0"
}

event PlayDoorCloseAnim
{
	FireCommand 0 "animation close"
}

event PlayDoorOpenAnim
{
	FireCommand 0 "animation open"
}

event HudTournament_ShowTimerCompetitive
{
	Animate CountdownLabel ypos 150 Linear 0 0
	Animate CountdownLabelShadow ypos 152 Linear 0 0

	SetVisible CountdownBG  1 0
	SetVisible CountdownLabel 1 0
	SetVisible CountdownLabelShadow 1 0
}

event HudTournament_ShowTimerDefault
{
	Animate CountdownLabel ypos 150 Linear 0 0
	Animate CountdownLabelShadow ypos 152 Linear 0 0


	SetVisible CountdownBG  1 0
	SetVisible CountdownLabel 1 0
	SetVisible CountdownLabelShadow 1 0
}

event HudTournament_HideTimer
{
	SetVisible CountdownBG  0 0
	SetVisible CountdownLabel 0 0
	SetVisible CountdownLabelShadow 0 0
}

event HudTournament_ShowRoundSign
{
	SetVisible RoundSignModel 1 0
	RunEventChild RoundSignModel HudTournament_PlaySignAnim 0
	SetVisible RoundSignModel 0 6
}

event HudTournament_PlaySignAnim
{
	FireCommand 0 "animation intro"
	FireCommand 5 "animation outro"
}

event TeamStatus_PlayerDead
{
	SetVisible DeathPanel  1 0
	SetVisible SkullPanel  1 0
	SetVisible respawntime  1 0

	Animate DeathPanel ypos 19 Accel 0 0.2
	Animate SkullPanel ypos 20 Accel 0 0.2
	Animate respawntime ypos 1 Accel 0 0.2
}

event TeamStatus_PlayerAlive
{
	Animate DeathPanel ypos 19 Accel 0 0.2
	Animate SkullPanel ypos 20 Accel 0 0.2
	Animate respawntime ypos 1 Accel 0 0.2

	SetVisible DeathPanel  0 0.2
	SetVisible SkullPanel  0 0.2
	SetVisible respawntime 0 0.2
}

event HudMatchStatus_ShowMatchWinDoors
{
	SetVisible	MatchDoors	1	0
	SetVisible	FrontParticlePanel	1	0

	RunEventChild MatchDoors PlayDoorCloseAnim 0
	RunEventChild FrontParticlePanel PlayDoorSlamParticles 0.45
	RunEventChild MatchDoors PlayDoorOpenAnim 4.5

	SetVisible MatchDoors	0 7
	SetVisible	FrontParticlePanel	0	7
}

event HudMatchStatus_ShowMatchWinDoors_NoOpen
{
	SetVisible	MatchDoors	1	0
	SetVisible	FrontParticlePanel	1	0

	RunEventChild MatchDoors PlayDoorCloseAnim 0
	RunEventChild FrontParticlePanel PlayDoorSlamParticles 0.45
}

event HudMatchSummary_SlideInPanels
{
	Animate BlueTeamPanel xpos 0 Accel 0.25 0.25
	Animate RedTeamPanel xpos 0 Accel 0.25 0.25
}

// MainMenu PlayList
event MMenu_PlayList_Expand
{
	// empty
}

event MMenu_PlayList_Collapse
{
	// empty
}

event MMenu_PlayList_Collapse_Immediate
{
	// empty
}

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

// End of Casual Match Survey
event SurveyShowSequence
{
	Animate Survey ypos 480 Linear 0 0
	Animate Survey ypos 150 Linear 1 0.3
	Animate Survey ypos 130 Deaccel 1.3 0.1
	Animate Survey ypos 150 Accel 1.4 0.1
}

event SurveySubmitSequence
{
	// Show submitting
	SetVisible QuestionContainer 0 0
	SetVisible SubmittingContainer 1 0

	// Show thanks
	SetVisible SubmittingContainer 0 2
	SetVisible ThanksContainer 1 2

RunEvent SurveyHideSequence 6
}

event SurveyDelete
{
	FireCommand 0 "delete"
}

event SurveyHideSequence
{
	SetVisible CloseButton 0 0 

	Animate Survey ypos 130 Deaccel 0 0.3
	Animate Survey ypos 480 Accel 0.3 0.2
	RunEventChild Survey SurveyDelete 0.6
}