Removing/Editing KeyBar

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

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!)
Post Reply
Dudweiser
Posts: 60
Joined: Mon Jan 08, 2018 5:54 pm

Removing/Editing KeyBar

Post by Dudweiser »

Hi I've been creating a custom level/mod for a while now. I have decided to use a custom HUD from the project brutality mod but I want to keep everything except the Key Bar. I have managed to remove the code which displays the keys on screen but don't know how to return the original key pickup icons in the top right corner. Was wondering if it is possible to have this custom HUD with the original key pickup icons in the inventory and is it simply disabled somewhere in the code?

Thanks in advance!
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Re: Removing/Editing KeyBar

Post by wildweasel »

In SBARINFO, adding any one element to a statusbar completely throws out the default one, so reverting back to GZDoom's default is not as simple as deleting the relevant line from PB's code. What I'd suggest is finding the code for the default status bar and copying that into the PB one instead - you can find this at https://zdoom.org/wiki/Default_status_bars . Or I've copied the relevant line here:

Code: Select all

drawkeybar 6, vertical, reverserows, auto, -10, 2, 0, 3, auto;
You may need to alter the coordinates (-10, 2) if the PB HUD is not set for fullscreenoffsets.
Dudweiser
Posts: 60
Joined: Mon Jan 08, 2018 5:54 pm

Re: Removing/Editing KeyBar

Post by Dudweiser »

Thanks for the reply, ah i see, i have been searching through a million lines of code for something that is potentially removing the key image. Never realised it removed the entire hud as a whole. Ok so do i paste the code you gave me into the custom HUD SBARINFO file, and if so with this work for custom keys? I have made a level with 9 custom locks and images removing the default Red Blue and Yellow and switching them out for larger images.
Post Reply

Return to “Scripting”