How would I go about adding a sound effect when the automap is opened and closed?
Auxillary question:
How do I make the automap disabled until you pick up an item in the level?
Thanks
Play A Sound When the Automap is Opened
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!)
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!)
-
- Posts: 112
- Joined: Mon Aug 01, 2016 9:06 am
-
- Posts: 753
- Joined: Mon Jun 24, 2013 7:12 pm
- Location: UT-WA
Re: Play A Sound When the Automap is Opened
damn thats a good question. youre going to need a script that causes two things.
whatever the hell the ACS command is for opening the automap (i did a quick search but didnt find anything so im gonna leave that for you.)
and one to play the sound (duh..right?)
youre probably going to need to define it in the KEYCONF lump
THENNN in your decorate lump (just make a new one for your automap)
not even sure why i chimed in on this...youre asking for something complicated and im decent at ACS and decent at decorate...but working with both is always bad for me.
whatever the hell the ACS command is for opening the automap (i did a quick search but didnt find anything so im gonna leave that for you.)
and one to play the sound (duh..right?)
youre probably going to need to define it in the KEYCONF lump
Spoiler:then in your ACS lump youll need to do something like this (at least this is what i would do)
Spoiler:
THENNN in your decorate lump (just make a new one for your automap)
Spoiler:replace everything in that last decorate actor with the shit you need and you can probably make something happen.
not even sure why i chimed in on this...youre asking for something complicated and im decent at ACS and decent at decorate...but working with both is always bad for me.
-
- Posts: 112
- Joined: Mon Aug 01, 2016 9:06 am
Re: Play A Sound When the Automap is Opened
Indeed, but I think I'm getting somewhere with it.cortlong50 wrote:damn thats a good question.
I have found by digging through the menu options at least that when you type togglemap into the console it does exactly that. Perhaps there is a hacky way to find the value of togglemap (a true or false perhaps?) and act afterwards.cortlong50 wrote:whatever the hell the ACS command is for opening the automap (i did a quick search but didnt find anything so im gonna leave that for you.)
Nonetheless, I appreciate it. I think you steered me in the right direction, so thanks for that!cortlong50 wrote:not even sure why i chimed in on this...

-
-
- Posts: 17481
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
Re: Play A Sound When the Automap is Opened
The only available way to read the status of the automap is the ZScript global variable automapactive. Be careful when using this, and be sure to make sure that the sound is only playing in the UI channel and only for the specific player with consoleplayer.
-
- Posts: 112
- Joined: Mon Aug 01, 2016 9:06 am
Re: Play A Sound When the Automap is Opened
https://zdoom.org/wiki/CCMDs:Customization
mapbind [key] [command]
This command works just like bind, except it controls the action that occurs when the automap is displayed. (Panning controls are ineffective on the overlay map.) A list of automap-specific controls may be found here.
This also looks promising.
*EDIT
It would be so much easier if GetPlayerInput had an INPUT_AUTOMAP parameter.
mapbind [key] [command]
This command works just like bind, except it controls the action that occurs when the automap is displayed. (Panning controls are ineffective on the overlay map.) A list of automap-specific controls may be found here.
This also looks promising.
*EDIT
It would be so much easier if GetPlayerInput had an INPUT_AUTOMAP parameter.