i would like to display remaining charges for Flashlight, Amplifer, and invulnérability. i wish this also works when i use the command "Mutate light")
this function come from MH2Hud class
simulated function DrawGameSynopsis(Canvas Canvas)
{
local float XL, YL, XOffset, YOffset, YOffsetSafe;
local inventory Inv;
local int BootCharges;
local int FlashCharges;
local string Spread;
local int i;
for ( Inv=PawnOwner.Inventory; Inv!=None; Inv=Inv.Inventory )
{
if ( Inv.IsA('MH2Scuba'))
{
Canvas.DrawColor = HUDColor;
if ((Inv.Charge/10) < 25) Canvas.DrawColor = RedColor;
Canvas.SetPos(0, YOffset);
Canvas.DrawText(" Scuba: "@(Inv.Charge/10), False);
YOffSet -= YL;
}
else if ( Inv.IsA('JumpBoots') || Inv.IsA('UT_Jumpboots') )
{
BootCharges=Inv.Charge;
Canvas.DrawColor = HUDColor;
Canvas.SetPos(0, YOffset);
Canvas.DrawText(" Jumps left: "@Inv.Charge, False);
YOffSet -= YL;
}
else if ( Inv.IsA('FlashLight'))
{
FlashCharges=Inv.Charge;
Canvas.DrawColor = HUDColor;
if ((Inv.Charge/10) < 100) Canvas.DrawColor = GoldColor;
else
if ((Inv.Charge/10) < 10) Canvas.DrawColor = RedColor;
Canvas.SetPos(0, YOffset);
Canvas.DrawText("Flashlight:"@(Inv.Charge/10), False);
YOffSet -= YL;
}
else
{
i++;
if ( i > 100 )
break; // can occasionally get temporary loops in netplay
}
}