Running a script by releasing a Key?
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Running a script by releasing a Key?
I know you cna bind a Key to a ACS script and then have it activate when you press it, but how to you get a ACS to execute only when you release the key?
Re: Running a script by releasing a Key?
Use a +/- alias, and set the +alias to do nothing while the -alias pukes the script.
Re: Running a script by releasing a Key?
you lost me. o_oRisen wrote:Use a +/- alias, and set the +alias to do nothing while the -alias pukes the script.
- Remmirath
- Posts: 2562
- Joined: Sun Dec 23, 2007 3:53 am
- Graphics Processor: nVidia with Vulkan support
- Location: My house
- Contact:
Re: Running a script by releasing a Key?
Simple. That should be put in KEYCONF. Read the wiki for more info about the syntax.
- Ryan Cordell
- Posts: 4349
- Joined: Sun Feb 06, 2005 6:39 am
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Capital of Explodistan
Re: Running a script by releasing a Key?
addmenukey "Switch HUD" +gs_hudswitch
alias +gs_hudswitch "take RC_GS_DarkHud; give RC_GS_FutureHud"
alias -gs_hudswitch "take RC_GS_FutureHud; give RC_GS_DarkHud"
defaultbind h +gs_hudswitch
Take this for example.
+gs_hudswitch is when you're PRESSING the weapon
-gs_hudswitch is when you're NOT pressing the weapon.
Considering KEYCONF is merely a cuter way of default-izing several console commands, anything you could do in the console you could (In theory, I guess.) do in KEYCONF's options.
alias +gs_hudswitch "take RC_GS_DarkHud; give RC_GS_FutureHud"
alias -gs_hudswitch "take RC_GS_FutureHud; give RC_GS_DarkHud"
defaultbind h +gs_hudswitch
Take this for example.
+gs_hudswitch is when you're PRESSING the weapon
-gs_hudswitch is when you're NOT pressing the weapon.
Considering KEYCONF is merely a cuter way of default-izing several console commands, anything you could do in the console you could (In theory, I guess.) do in KEYCONF's options.
Re: Running a script by releasing a Key?
More accurately, +gs_hudswitch executes once when you press the key, and -gs_hudswitch executes once when you release the key.Blade Nightflame wrote:Take this for example.
+gs_hudswitch is when you're PRESSING the weapon
-gs_hudswitch is when you're NOT pressing the weapon.
If you simply want a key to puke a script on release, set up a bind like this:
Code: Select all
alias +script_run "wait"
alias -script_run "puke 100"
bind X +script_run- Ryan Cordell
- Posts: 4349
- Joined: Sun Feb 06, 2005 6:39 am
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Capital of Explodistan
Re: Running a script by releasing a Key?
Now how would a toggle-able version work though?
Re: Running a script by releasing a Key?
oh i see.
Thanks