How to Remove Automap Whit Zscript

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.

How to Remove Automap Whit Zscript

Postby GGianpy » Thu Oct 08, 2020 8:02 am

good afternoon,
i am trying to remove or make 100% transparent the automap .

This is the Code:
Code: Select allExpand view
   override void DrawAutomapHUD(double ticFrac)
   {

   }

But This is the Result:
https://drive.google.com/file/d/1xKJvXpfCkNIi0aOwZwfusqDop2C7j6hg/view?usp=sharing

Is it possible to scale it like a smaller rectangle?
Can I also remove those 2 green bricks at the bottom?
User avatar
GGianpy
 
Joined: 11 Mar 2020
Location: Italy
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: Not Listed

Re: How to Remove Automap Whit Zscript

Postby GGianpy » Thu Oct 08, 2020 10:23 am

Ok, Done.
I had to set the height of SetSize() to 0.
User avatar
GGianpy
 
Joined: 11 Mar 2020
Location: Italy
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: Not Listed

Re: How to Remove Automap Whit Zscript

Postby Logan MTM » Sat Oct 10, 2020 4:24 pm

Be careful. People can curse your work forever for doing that.
User avatar
Logan MTM
I can see you...
 
Joined: 17 Jan 2006
Location: Rio de Janeiro - Brazil

Re: How to Remove Automap Whit Zscript

Postby SanyaWaffles » Sat Oct 10, 2020 5:35 pm

A major criticism I want to share with you... I think you should probably start out small for your first projects, like converting one of your existing projects that use DECORATE/ACS and convert that to ZScript... or even smaller yet, just make some small tweak in ZScript. I get the impression from alot of your posts that you're trying to do alot of highly complex stuff at once, rather than starting small and building upon it. Even my my projects weren't just overnight big things, they started out small with me just experimenting with small ideas that eventually became big ideas. Hell, one of the projects I'm working on now is a prototype I made in 2014 and am polishing up. Alot of the code was in DECORATE and ACS... to port it took time and patience, and I was an early adopter of ZScript back when it first came out.

Removing the automap with ZScript... typically when it comes to removing some built in functionality like the automap or save states, people typically not only dislike that, but consider such things to be overstepping our bounds as designers and consider such acts malicious in design. It's one thing to change how the player pawn functions or how save states work (a colleague showed me how to add taunts when the player saves like... six times in a row) or how parts the automap looks (hell, I kind of wish I could add more to the automap), but another thing to remove it entirely.

As Logan MTM said, it's a sure fire way to get people to dislike your project by removing a core function of the engine in such a hackish way.

I feel you're making a very rookie mistake by doing that, I'd advise not to remove the automap. There's a reason games like Doom or Duke 3D have it.
User avatar
SanyaWaffles
Wouldn't be an epic gamer if I didn't commit a few war crimes.
 
Joined: 25 Apr 2013
Location: Eastern Ohio
Discord: SanyaWaffles#5095
Twitch ID: sanyawaffles
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: How to Remove Automap Whit Zscript

Postby Player701 » Sat Oct 10, 2020 11:42 pm

Judging from his code samples, I think he was trying to remove the automap HUD and not the automap itself.
User avatar
Player701
 
Joined: 13 May 2009
Location: Russia
Discord: Player701#8214
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: How to Remove Automap Whit Zscript

Postby SanyaWaffles » Sat Oct 10, 2020 11:56 pm

Ah. I wasn't entirely sure.

Still, removing the HUD entirely is probably a bad idea except in very niche cases, like cutscenes that don't use GZDoom's built in methods.
User avatar
SanyaWaffles
Wouldn't be an epic gamer if I didn't commit a few war crimes.
 
Joined: 25 Apr 2013
Location: Eastern Ohio
Discord: SanyaWaffles#5095
Twitch ID: sanyawaffles
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: How to Remove Automap Whit Zscript

Postby GGianpy » Sun Oct 11, 2020 2:31 am

wow, these are a lot of answers!
ok, let's take it easy:

1 - when i meant to remove the automap i meant to insert a cvar to allow the player to enable it or disable it, and then i did like this:
Code: Select allExpand view
KEYCONF: // Not Zscript but At Least Work.

addmenukey "$OPT_CNTRL_MAP" maptoggle
alias maptoggle "Test $SBAR_AllowMap togglemap" // if cvar
defaultbind TAB maptoggle

2 - the reason why i ask complex things with zscript is because the gzdoom engine seems really powerful with unity (like) and i would like to use its full potential.

I keep asking things on the forum just because there is no zscript guide, literally.
the wiki is a desert, there are only very few examples or explanations on the functions of zscript.
While the zscript documentation is worse, it's not as ordered as the wiki.

3 - thank you all for answering me, I hope that with my questions in the forum I am not boring you.

p.s.
is there a way to reduce the size of the minimap?
like this:
https://drive.google.com/file/d/1X6k-18s4EomdsbIJtoKgqfog6oaH0zcJ/view?usp=sharing
User avatar
GGianpy
 
Joined: 11 Mar 2020
Location: Italy
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: Not Listed


Return to Scripting

Who is online

Users browsing this forum: No registered users and 0 guests