// Special checks to German player side for this scenario, to see if their fuel supply is getting even shorter.
// If it is, %chance of breakdown function being called increases.
// Checked by kingtiger and tiger each turn. Max value = 25%
//
if (side == 1)
{
if ( Rand (0,100) < GetGlobal("outoffuelkingtigers" ))
{
SetAttrib("kingtiger", "breakdownChance", GetGlobal("outoffuelkingtigers") + 3 ) ;
SetGlobal("outoffuelkingtigers", GetAttrib("kingtiger", "breakdownChance")) ;
if ( GetAttrib("kingtiger", "breakdownChance") > 25 )
{
SetAttrib("kingtiger", "breakdownChance", 25) ;
// only show for active side
if ( GetShowSide() == GetCurrentSide() )
{
// GetClosestUnit(id) ;
// AddVizCamUnit(id) ;
ShowUIScreenX( "BattlePop0", "Anim1", "IDS_OUT_OF_FUEL_KINGS", "BP0Image:german_infantry_head") ;
}
}
else
{
// only show for active side
if ( GetShowSide() == GetCurrentSide() )
{
// GetClosestUnit(id) ;
// AddVizCamUnit(id) ;
ShowUIScreenX( "BattlePop0", "Anim1", "IDS_OUT_OF_FUEL_GE1", "BP0Image:german_infantry_head") ;
}
}
}
if ( Rand (0,100) < GetGlobal("outoffueltigers" ) )
{
SetAttrib("tiger", "breakdownChance", GetGlobal("outoffueltigers") + 3 ) ;
SetGlobal("outoffueltigers", GetAttrib("tiger", "breakdownChance")) ;
if ( GetAttrib("tiger", "breakdownChance") > 25 )
{
SetAttrib("tiger", "breakdownChance", 25) ;
// only show for active side
if ( GetShowSide() == GetCurrentSide() )
{
// GetClosestUnit("tiger") ;
// AddVizCamUnit(me) ;
ShowUIScreenX( "BattlePop0", "Anim1", "IDS_OUT_OF_FUEL_TIGERS", "BP0Image:german_infantry_head") ;
}
}
else
{
// only show for active side
if ( GetShowSide() == GetCurrentSide() )
{
// GetClosestUnit(id) ;
// AddVizCamUnit(id) ;
ShowUIScreenX( "BattlePop0", "Anim1", "IDS_OUT_OF_FUEL_GE2", "BP0Image:german_infantry_head") ;
}
}
}
}
