Code: Select all
DrawBar "ARBAR", "EPBAR", armor, Horizontal, interpolate(2), 49, 195;
How do I make it work with all amounts of armor? I thought that putting 'armor' should work, but obviously it doesn't.
Moderator: GZDoom Developers
Code: Select all
DrawBar "ARBAR", "EPBAR", armor, Horizontal, interpolate(2), 49, 195;
Are you sure? Because If you don't specify a max value for the bar, like what you're doing there, it's assumed to be 100. So it couldn't possibly have worked like you describe.ramon.dexter wrote:I can remember that this code worked correctly for various types of armor (higher than 100 or 200). But now, with gzdoom v3.4.1 this doesnt work anymore - the bar starts to shorten only after reaching 100 and lower.
You can set the max value of the bar dynamically by an inventory item given to the player. The Amount property of the item determines the max value. You obviously want to alter the amount of the item to match the max "durability" of the armor you're wearing. For that you want to use ACS or ZScript.How do I make it work with all amounts of armor?