Sinanju, I have made your penalty detection, look at the code:
GlobalVar $drag_penalty;
$drag_penalty = 1;
Sub SE_DragStart($KeyFlags) # A Sinanju Event (opens christmas light cluster)
IF ( $DragMode == "Drag" )
THEN
$drag_penalty = 2;
closeButtonRegex (GetCurrentPlayerVar("UserName"), "drag_*"); # closes Drag system if running, then redraws lights (but not results board)
closePrivButton( "hud_message");
openGlobalButton( "drag_info_text",75,1,50,5,5,5,0,"^7Light sequence reset"); # supplemental message
# Left side
openGlobalButton( "drag_left_backing",$DRorigL+5,$DRorigT,$DRWidth+2,$DRHeight+52,$DRspacing,$DRtime,16,""); # Light underlay
openGlobalButton( "drag_left_back",$DRorigL+6,$DRorigT+1,$DRWidth,$DRHeight+50,$DRspacing,$DRtime,32,""); # Left back lightboard
openGlobalButton( "drag_left_psl1",$DRorigL+1,$DRorigT,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^0•"); # Pre-stage lights
openGlobalButton( "drag_left_psl2",$DRorigL+10,$DRorigT,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^0•");
openGlobalButton( "drag_left_sl1",$DRorigL+1,$DRorigT+7,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^0•"); # Stage lights
openGlobalButton( "drag_left_sl2",$DRorigL+10,$DRorigT+7,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^0•");
openGlobalButton( "drag_left_cdyt",$DRorigL,$DRorigT+14,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^0•"); # Count Down Yellow top
openGlobalButton( "drag_left_cdym",$DRorigL,$DRorigT+21,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^0•"); # Count Down Yellow middle
openGlobalButton( "drag_left_cdyb",$DRorigL,$DRorigT+28,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^0•"); # Count Down Yellow bottom
openGlobalButton( "drag_left_st",$DRorigL,$DRorigT+35,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^6•"); # Start Light
openGlobalButton( "drag_left_rp",$DRorigL,$DRorigT+42,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^8•"); # Red Penalty Light
# Right side
openGlobalButton( "drag_right_backing",$DRorigL+14,$DRorigT,$DRWidth+2,$DRHeight+52,$DRspacing,$DRtime,16,""); # Light underlay
openGlobalButton( "drag_right_back",$DRorigL+15,$DRorigT+1,$DRWidth,$DRHeight+50,$DRspacing,$DRtime,32,""); # Right back lightboard
openGlobalButton( "drag_right_psl1",$DRorigL+3,$DRorigT,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^0 •");
openGlobalButton( "drag_right_psl2",$DRorigL+12,$DRorigT,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^0 •");
openGlobalButton( "drag_rights_sl1",$DRorigL+3,$DRorigT+7,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^0 •");
openGlobalButton( "drag_rights_sl2",$DRorigL+12,$DRorigT+7,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^0 •");
openGlobalButton( "drag_right_cdyt",$DRorigL+8,$DRorigT+14,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^0 •");
openGlobalButton( "drag_right_cdym",$DRorigL+8,$DRorigT+21,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^0 •");
openGlobalButton( "drag_right_cdyb",$DRorigL+8,$DRorigT+28,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^0 •");
openGlobalButton( "drag_right_st",$DRorigL+8,$DRorigT+35,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^6 •");
openGlobalButton( "drag_right_rp",$DRorigL+8,$DRorigT+42,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^8 •");
ELSE
ENDIF
EndSub
Sub SE_PreStageLeft($userName)
$NickName = GetCurrentPlayerVar("NickName");
IF ( $DragMode == "Drag" )
THEN
$drag_penalty = 1;
closePrivButton( "hud_message");
closeGlobalButton ("drag_info_text&drag_left_psl1&drag_right_psl1");
openGlobalButton( "drag_info_text",75,1,50,5,5,5,0,"^7Pre-stage set");
openGlobalButton( "drag_left_driver",45,1,50,6,6,$DRtime,128,$NickName); # Driver on Left
openGlobalButton( "drag_left_psl1",$DRorigL+1,$DRorigT,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^3•"); # shows Pre-stage lights for driver on left
openGlobalButton( "drag_right_psl1",$DRorigL+3,$DRorigT,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^3 •");
ENDIF
EndSub
Sub SE_PreStageRight($userName)
$r_NickName = GetCurrentPlayerVar("NickName");
IF ( $DragMode == "Drag" )
THEN
$drag_penalty = 1;
closePrivButton( "hud_message");
closeGlobalButton ("drag_left_psl2&drag_right_psl2");
openGlobalButton( "drag_driverV",95,1,10,7,6,$DRtime,0,"^1VS");
openGlobalButton( "drag_right_driver",105,1,50,6,6,$DRtime,64,$r_NickName); # Driver on Right
openGlobalButton( "drag_left_psl2",$DRorigL+10,$DRorigT,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^3•"); # shows Pre-stage lights for driver on right
openGlobalButton( "drag_right_psl2",$DRorigL+12,$DRorigT,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^3 •");
ENDIF
EndSub
Sub SE_StageLeft($userName)
IF ( $DragMode == "Drag" )
THEN
$drag_penalty = 1;
closePrivButton( "hud_message");
closeGlobalButton ("drag_info_text&drag_left_sl1&drag_rights_sl1");
openGlobalButton( "drag_info_text",75,1,50,5,5,5,0,"^7Stage set; Start sequence initiated");
openGlobalButton( "drag_left_sl1",$DRorigL+1,$DRorigT+7,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^3•"); # shows Stage lights for driver on left
openGlobalButton( "drag_rights_sl1",$DRorigL+3,$DRorigT+7,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^3 •");
DelayedCommand( $RTime, SE_CountDownTop );
ENDIF
EndSub
Sub SE_StageRight ($userName)
IF ( $DragMode == "Drag" )
THEN
$drag_penalty = 1;
closePrivButton( "hud_message");
closeGlobalButton ("drag_left_sl2&drag_rights_sl2");
openGlobalButton( "drag_left_sl2",$DRorigL+10,$DRorigT+7,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^3•"); # shows Stage lights for driver on right
openGlobalButton( "drag_rights_sl2",$DRorigL+12,$DRorigT+7,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^3 •");
DelayedCommand( $RTime, SE_CountDownTop );
ENDIF
EndSub
Sub SE_CountDownTop()
IF ($DragMode == "Drag" && $drag_penalty<2)
THEN
closeGlobalButton ("drag_left_cdyt&drag_right_cdyt");
openGlobalButton( "drag_left_cdyt",$DRorigL,$DRorigT+14,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^3•"); # Changes top single light to yellow
openGlobalButton( "drag_right_cdyt",$DRorigL+8,$DRorigT+14,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^3 •");
DelayedCommand( $RandTime, SE_CountDownMiddle );
ENDIF
EndSub
Sub SE_CountDownMiddle()
IF ($DragMode == "Drag" && $drag_penalty<2)
THEN
closeGlobalButton ("drag_left_cdym&drag_right_cdym");
openGlobalButton( "drag_left_cdym",$DRorigL,$DRorigT+21,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^3•"); # Count Down Yellow middle
openGlobalButton( "drag_right_cdym",$DRorigL+8,$DRorigT+21,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^3 •");
DelayedCommand( $RandTime, SE_CountDownBottom );
ENDIF
EndSub
Sub SE_CountDownBottom ()
IF ($DragMode == "Drag" && $drag_penalty<2)
THEN
closeGlobalButton ("drag_left_cdyb&drag_right_cdyb");
openGlobalButton( "drag_left_cdyb",$DRorigL,$DRorigT+28,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^3•"); # Count Down Yellow bottom
openGlobalButton( "drag_right_cdyb",$DRorigL+8,$DRorigT+28,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^3 •");
DelayedCommand( $RandTime, SE_Start );
ENDIF
EndSub
Sub SE_Start ()
IF ($DragMode == "Drag" && $drag_penalty<2)
THEN
$drag_penalty = 0;
closeGlobalButton ("drag_left_psl1&drag_left_psl2&drag_left_sl1&drag_left_sl2&drag_left_cdyt&drag_left_cdym&drag_left_cdyb&drag_left_st&drag_left_rp");
closeGlobalButton ("drag_right_psl1&drag_right_psl2&drag_rights_sl1&drag_rights_sl2&drag_right_cdyt&drag_right_cdym&drag_right_cdyb&drag_right_st&drag_right_rp");
# Left side
openGlobalButton( "drag_left_psl1",$DRorigL+1,$DRorigT,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^0•"); # Pre-stage lights
openGlobalButton( "drag_left_psl2",$DRorigL+10,$DRorigT,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^0•");
openGlobalButton( "drag_left_sl1",$DRorigL+1,$DRorigT+7,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^0•"); # Stage lights
openGlobalButton( "drag_left_sl2",$DRorigL+10,$DRorigT+7,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^0•");
openGlobalButton( "drag_left_cdyt",$DRorigL,$DRorigT+14,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^0•"); # Count Down Yellow top
openGlobalButton( "drag_left_cdym",$DRorigL,$DRorigT+21,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^0•"); # Count Down Yellow middle
openGlobalButton( "drag_left_cdyb",$DRorigL,$DRorigT+28,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^0•"); # Count Down Yellow bottom
openGlobalButton( "drag_left_st",$DRorigL,$DRorigT+35,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^2•"); # Start Light turns green
openGlobalButton( "drag_left_rp",$DRorigL,$DRorigT+42,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^0•"); # Penalty Light
# Right side
openGlobalButton( "drag_right_psl1",$DRorigL+3,$DRorigT,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^0 •");
openGlobalButton( "drag_right_psl2",$DRorigL+12,$DRorigT,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^0 •");
openGlobalButton( "drag_rights_sl1",$DRorigL+3,$DRorigT+7,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^0 •");
openGlobalButton( "drag_rights_sl2",$DRorigL+12,$DRorigT+7,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^0 •");
openGlobalButton( "drag_right_cdyt",$DRorigL+8,$DRorigT+14,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^0 •");
openGlobalButton( "drag_right_cdym",$DRorigL+8,$DRorigT+21,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^0 •");
openGlobalButton( "drag_right_cdyb",$DRorigL+8,$DRorigT+28,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^0 •");
openGlobalButton( "drag_right_st",$DRorigL+8,$DRorigT+35,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^2 •");
openGlobalButton( "drag_right_rp",$DRorigL+8,$DRorigT+42,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^0 •");
ENDIF
EndSub
Sub SE_PenaltyLineLeft ($KeyFlags)
IF ( $drag_penalty == 1 )
THEN
$drag_penalty = 2;
closeGlobalButton ("drag_left_st&drag_left_rp");
openGlobalButton( "drag_left_st",$DRorigL,$DRorigT+35,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^3•"); # Start Light turns yellow
openGlobalButton( "drag_left_rp",$DRorigL,$DRorigT+42,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^1•"); # Penalty Light turns red
ENDIF
EndSub
Sub SE_PenaltyLineRight ($KeyFlags)
IF ( $drag_penalty == 1 )
THEN
$drag_penalty = 2;
closeGlobalButton ("drag_right_st&drag_right_rp");
openGlobalButton( "drag_right_st",$DRorigL+8,$DRorigT+35,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^3 •"); # Start Light turns yellow
openGlobalButton( "drag_right_rp",$DRorigL+8,$DRorigT+42,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^1 •"); # Penalty Light turns red
ENDIF
EndSub
It's working and if someone jumps the start, lights stops to countdown and drivers need to stage again for next race.
Can you help me out how to make at the end only to show who win, without any timers, splits, etc...?