//////////////////////////////////////////////////////////////////////////////////////////////
//**********************THIS IS THE FILE THAT ENABLES THE UBER COUNTER**********************//
//    ***CREDIT TO MR.SLIN, WIETHOOFD, KHAN, AND MR.SCALES FOR THE UBER COUNTER SCRIPT***   //
//////////////////////////////////////////////////////////////////////////////////////////////

event MenuOpen
{
	StopEvent	MenuClose 0.0

	// fade in
	Animate HudMenu Alpha 		"255"		Linear 0.0 0.1
	Animate HudMenu SelectionAlpha 	"255"		Linear 0.0 0.1
	Animate HudMenu FgColor		"FgColor"	Linear 0.0 0.1
	Animate HudMenu MenuColor	"MenuColor"	Linear 0.0 0.1
	Animate HudMenu ItemColor	"ItemColor"	Linear 0.0 0.1
	Animate HudMenu TextScan	"1"		Linear 0.0 0.1

	// Undo any blur
	Animate HudMenu		Blur	"1"		Linear	0.0		0.01
	StopEvent FillUber 0.0
	RunEvent ClearUber 0.01
}

event MenuClose
{
	// Hide it
	Animate HudMenu Alpha 		"0" Linear 0.0 1
	Animate HudMenu SelectionAlpha 	"0" Linear 0.0 1
	Animate HudMenu FgColor		"0 0 0 0" Linear 0.0 1
	Animate HudMenu MenuColor	"0 0 0 0" Linear 0.0 1
	Animate HudMenu ItemColor	"0 0 0 0" Linear 0.0 1
	RunEvent FillUber 0.0
	RunEvent FillUber 0.0
	RunEvent FillUber 0.0
}

event FillUber
{
 RunEvent ClearUber 0.0
 Animate UberLabel alpha "255" Linear 0.1 0.001
 RunEvent UberDigitLoop 0.1
 Animate Uber10 alpha "255" Linear 5.5 0.001
 Animate Uber10 alpha "0" Linear 11.0 0.001
 Animate Uber20 alpha "255" Linear 11.0 0.001
 Animate Uber20 alpha "0" Linear 16.5 0.001
 Animate Uber30 alpha "255" Linear 16.5 0.001
 Animate Uber30 alpha "0" Linear 22.0 0.001
 Animate Uber40 alpha "255" Linear 22.0 0.001
 Animate Uber40 alpha "0" Linear 27.5 0.001
 Animate Uber50 alpha "255" Linear 27.5 0.001
 Animate Uber50 alpha "0" Linear 33.0 0.001
 Animate Uber60 alpha "255" Linear 33.0 0.001
 Animate Uber60 alpha "0" Linear 38.5 0.001
 Animate Uber70 alpha "255" Linear 38.5 0.001
 Animate Uber70 alpha "0" Linear 44.0 0.001
 Animate Uber80 alpha "255" Linear 44.0 0.001
 Animate Uber80 alpha "0" Linear 49.5 0.001
 Animate Uber90 alpha "255" Linear 49.5 0.001
 Animate Uber90 alpha "0" Linear 55.0 0.001
 Animate Uber100 alpha "255" Linear 55.0 0.001
 RunEvent ClearUber 60.1
}
 
event UberDigitLoop
{
 RunEvent UberDigit 0.0
 SetVisible Uber9 0 5.5
 RunEvent uberDigit 5.5
 SetVisible Uber9 0 11.0
 RunEvent uberDigit 11.0
 SetVisible Uber9 0 16.5
 RunEvent uberDigit 16.5
 SetVisible Uber9 0 22.0
 RunEvent uberDigit 22.0
 SetVisible Uber9 0 27.5
 RunEvent uberDigit 27.5
 SetVisible Uber9 0 33.0
 RunEvent uberDigit 33.0
 SetVisible Uber9 0 38.5
 RunEvent uberDigit 38.5
 SetVisible Uber9 0 44.0
 RunEvent uberDigit 44.0
 SetVisible Uber9 0 49.5
 RunEvent uberDigit 49.5
 SetVisible Uber9 0 55.0
}
 
event UberDigit
{
 Animate Uber0 alpha "255" Linear 0.0 0.001
 Animate Uber0 alpha "0" Linear 0.55 0.001
 Animate Uber1 alpha "255" Linear 0.55 0.001
 Animate Uber1 alpha "0" Linear 1.1 0.001
 Animate Uber2 alpha "255" Linear 1.1 0.001
 Animate Uber2 alpha "0" Linear 1.65 0.001
 Animate Uber3 alpha "255" Linear 1.65 0.001
 Animate Uber3 alpha "0" Linear 2.2 0.001
 Animate Uber4 alpha "255" Linear 2.2 0.001
 Animate Uber4 alpha "0" Linear 2.75 0.001
 Animate Uber5 alpha "255" Linear 2.75 0.001
 Animate Uber5 alpha "0" Linear 3.3 0.001
 Animate Uber6 alpha "255" Linear 3.3 0.001
 Animate Uber6 alpha "0" Linear 3.85 0.001
 Animate Uber7 alpha "255" Linear 3.85 0.001
 Animate Uber7 alpha "0" Linear 4.4 0.001
 Animate Uber8 alpha "255" Linear 4.4 0.001
 Animate Uber8 alpha "0" Linear 4.95 0.001
 Animate Uber9 alpha "255" Linear 4.95 0.001
 SetVisible Uber9 1 4.95
 }
 
event ClearUber
{
 Animate UberLabel alpha "0" Linear 0.0 0.001
 Animate Uber10 alpha "0" Linear 0.0 0.001
 Animate Uber20 alpha "0" Linear 0.0 0.001
 Animate Uber30 alpha "0" Linear 0.0 0.001
 Animate Uber40 alpha "0" Linear 0.0 0.001
 Animate Uber50 alpha "0" Linear 0.0 0.001
 Animate Uber60 alpha "0" Linear 0.0 0.001
 Animate Uber70 alpha "0" Linear 0.0 0.001
 Animate Uber80 alpha "0" Linear 0.0 0.001
 Animate Uber90 alpha "0" Linear 0.0 0.001
 Animate Uber100 alpha "0" Linear 0.0 0.001
 Animate Uber0 alpha "0" Linear 0.0 0.001
 Animate Uber1 alpha "0" Linear 0.0 0.001
 Animate Uber2 alpha "0" Linear 0.0 0.001
 Animate Uber3 alpha "0" Linear 0.0 0.001
 Animate Uber4 alpha "0" Linear 0.0 0.001
 Animate Uber5 alpha "0" Linear 0.0 0.001
 Animate Uber6 alpha "0" Linear 0.0 0.001
 Animate Uber7 alpha "0" Linear 0.0 0.001
 Animate Uber8 alpha "0" Linear 0.0 0.001
 Animate Uber9 alpha "0" Linear 0.0 0.001
}