[SOLVED] Inventory Item Counter

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
User avatar
Dr_Cosmobyte
Posts: 2860
Joined: Thu Jun 04, 2015 9:07 pm
Preferred Pronouns: He/Him
Location: Killing spiders.

[SOLVED] Inventory Item Counter

Post by Dr_Cosmobyte »

Sorry guys, had to do this. I have tried to do this for long, but couldn't exactly figure how.

Here's the situation:

My STATUSBAR displays the current item selected in inventory with "DrawSelectedInventory". However, i can't see how many of those items i've got left. All i wanted is to discover how to display a little number at the side of the item sprite.

Code: Select all

DrawSelectedInventory  AlwaysShowCounter, Centerbottom, IndexFont, 275, 155, 36, -32;
- Here's how it is on my code.

Thanks in advance.
Last edited by Dr_Cosmobyte on Sun Mar 11, 2018 1:34 pm, edited 1 time in total.
User avatar
ramon.dexter
Posts: 1562
Joined: Tue Oct 20, 2015 12:50 pm
Graphics Processor: nVidia with Vulkan support
Location: Kozolupy, Bohemia

Re: [STATUSBAR QUESTION] Inventory Item Counter

Post by ramon.dexter »

Hi GAA, I think yyour code's missing the color word.

Here's my code:

Code: Select all

DrawSelectedInventory center, center, SBARSML, 160, 25, 173, 34, Red;
User avatar
Dr_Cosmobyte
Posts: 2860
Joined: Thu Jun 04, 2015 9:07 pm
Preferred Pronouns: He/Him
Location: Killing spiders.

Re: [STATUSBAR QUESTION] Inventory Item Counter

Post by Dr_Cosmobyte »

IT WAS AS SIMPLE AS THAT!

Thank you so much man!!! Now i can finally release the update for my project :)

Return to “Scripting”