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.

Removing/Editing KeyBar

Postby Dudweiser » Mon Jan 08, 2018 6:10 pm

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!
Dudweiser
 
Joined: 08 Jan 2018

Re: Removing/Editing KeyBar

Postby wildweasel » Mon Jan 08, 2018 10:20 pm

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 allExpand view
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.
User avatar
wildweasel
change o' pace.
Moderator Team Lead
 
Joined: 15 Jul 2003

Re: Removing/Editing KeyBar

Postby Dudweiser » Tue Jan 09, 2018 7:08 am

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.
Dudweiser
 
Joined: 08 Jan 2018


Return to Scripting

Who is online

Users browsing this forum: No registered users and 5 guests