Running into an Issue with Dedicated Quick-kick Functioning
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!)
-
[name_withheld]
- Posts: 16
- Joined: Thu Apr 13, 2023 2:41 pm
- Preferred Pronouns: He/Him
Running into an Issue with Dedicated Quick-kick Functioning
Hello everyone! I've been looking to get back into mapping, and in doing so, started doing a bit of decorate scripting. For the most part I've managed to keep things functional and not run into too many problems that weren't because of me doing something goofy like leaving out a } or something.
I decided that I wanted to add both new melee attacks to replace the pistol start, as well as a Duke Nukem-style quick kick. I got them to work 100% how I wanted, both this morning when I opened the test map to mess around with it, nothing worked at all.
If the quick kick does work, it does so once, then doesn't allow me to use any other weapons or allow me to switch back or anything. That's if I get lucky enough for it to actually work.
I will provide the wads I'm using below. The rifle wad sets the player class and gives them the items required for the new melee and quick kick (I'm also intending to have the rifle as part of the project I want to begin working on, which is why that particular part of code ended up there.) The fist redux wad is just for the new melee attacks that replace the fist that the player starts with. Brutal kick is the quick kick, slightly modified to use sprites from fist redux.
I have no idea what is causing this issue, as everything was working fine, then all of a sudden... just broken. Which is weird because I didn't edit anything between it working and not working.
Any and all help with this issue would be GREATLY appreciated.
Broken wads here:
https://drive.google.com/file/d/19qbNcl ... sp=sharing
https://drive.google.com/file/d/1qziY1D ... sp=sharing
https://drive.google.com/file/d/1ugn_dh ... sp=sharing
I decided that I wanted to add both new melee attacks to replace the pistol start, as well as a Duke Nukem-style quick kick. I got them to work 100% how I wanted, both this morning when I opened the test map to mess around with it, nothing worked at all.
If the quick kick does work, it does so once, then doesn't allow me to use any other weapons or allow me to switch back or anything. That's if I get lucky enough for it to actually work.
I will provide the wads I'm using below. The rifle wad sets the player class and gives them the items required for the new melee and quick kick (I'm also intending to have the rifle as part of the project I want to begin working on, which is why that particular part of code ended up there.) The fist redux wad is just for the new melee attacks that replace the fist that the player starts with. Brutal kick is the quick kick, slightly modified to use sprites from fist redux.
I have no idea what is causing this issue, as everything was working fine, then all of a sudden... just broken. Which is weird because I didn't edit anything between it working and not working.
Any and all help with this issue would be GREATLY appreciated.
Broken wads here:
https://drive.google.com/file/d/19qbNcl ... sp=sharing
https://drive.google.com/file/d/1qziY1D ... sp=sharing
https://drive.google.com/file/d/1ugn_dh ... sp=sharing
- DeadHeartProductions
- Posts: 36
- Joined: Sun Apr 09, 2023 10:49 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 7
- Graphics Processor: Intel (Modern GZDoom)
- Location: Eastern North Southlandia, West Side. Formerly NeoTerraNova
Re: Running into an Issue with Dedicated Quick-kick Functioning
I know this might not be the answer that you want, but I have a "fast melee" attack bound to ALTFIRE, and simply copied the appropriate attack code to the ALTFIRE states of each of my weapons.
EDIT: I fixed it. I changed the ACS like so:
And the ACS call, or however you put it, like so:
Hope that helps!
EDIT: I fixed it. I changed the ACS like so:
Code: Select all
// Scripts
Script 22 (void)
{
str weapon = GetWeapon();
if (StrICmp(weapon, "KickWeapon"))
{
SetPlayerProperty(0, 1, PROP_INSTANTWEAPONSWITCH);
GiveInventory("KickWeapon", 1);
GiveInventory("Kicking", 1);
SetWeapon("KickWeapon");
While (CheckInventory("Kicking"))
Delay(1);
SetWeapon(weapon);
TakeInventory("KickWeapon", 1);
Delay(3);
SetPlayerProperty(0, 0, PROP_INSTANTWEAPONSWITCH);
}
}Code: Select all
addkeysection "kill you" "modtest"
addmenukey "Shitkicker" kickyourshit
alias kickyourshit "puke 22"-
[name_withheld]
- Posts: 16
- Joined: Thu Apr 13, 2023 2:41 pm
- Preferred Pronouns: He/Him
Re: Running into an Issue with Dedicated Quick-kick Functioning
Unfortunately, it did not work and just spits out the error "p_startscript unknown script 22," which is a similar error to the one it was already giving me. 
- 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: Running into an Issue with Dedicated Quick-kick Functioning
Are you making sure to compile your ACS script? Does it have a #library declaration?
-
[name_withheld]
- Posts: 16
- Joined: Thu Apr 13, 2023 2:41 pm
- Preferred Pronouns: He/Him
Re: Running into an Issue with Dedicated Quick-kick Functioning
I am a complete beginner at all of this, unfortunately, so I'm not entirely sure where exactly I should be typing things, or how to go about compiling.
And now a new issue: between the ACS, decorate, and KEYCONFIG, it seems to corrupting all of my gzdoom files. Even if I don't load up the resource wad(s), and just run vanilla DooM2, if I tap the key I bound to the quick kick it STILL displays the error code even though none of the resources are loaded.
I am at a complete and total loss.
And now a new issue: between the ACS, decorate, and KEYCONFIG, it seems to corrupting all of my gzdoom files. Even if I don't load up the resource wad(s), and just run vanilla DooM2, if I tap the key I bound to the quick kick it STILL displays the error code even though none of the resources are loaded.
I am at a complete and total loss.
-
[name_withheld]
- Posts: 16
- Joined: Thu Apr 13, 2023 2:41 pm
- Preferred Pronouns: He/Him
Re: Running into an Issue with Dedicated Quick-kick Functioning
Replaced ALL of the gzdoom files, and even replaced my Doom2.wad with a copy I know hasn't come into contact with the modified files, and I'm still able to get an error code hitting the key. I think I may have broken my ability to even play Doom anymore.
-
[name_withheld]
- Posts: 16
- Joined: Thu Apr 13, 2023 2:41 pm
- Preferred Pronouns: He/Him
Re: Running into an Issue with Dedicated Quick-kick Functioning
Also, sorry about the multiple responses. I am just panicking a bit, especially now that it seems like I won't even be able to functionally play Doom anymore. :/
Last edited by [name_withheld] on Fri Apr 14, 2023 8:21 am, edited 1 time in total.
-
[name_withheld]
- Posts: 16
- Joined: Thu Apr 13, 2023 2:41 pm
- Preferred Pronouns: He/Him
Re: Running into an Issue with Dedicated Quick-kick Functioning
I have corrected whatever wonkiness was going on with GZdoom by just loading up another mod. Scripting is weird.
EDIT: quick kick is still completely broken though because i have no idea what I'm doing.
EDIT: quick kick is still completely broken though because i have no idea what I'm doing.
- 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: Running into an Issue with Dedicated Quick-kick Functioning
You may need to clear out your ini file. Key bindings can sometimes persist between loaded mods.
-
[name_withheld]
- Posts: 16
- Joined: Thu Apr 13, 2023 2:41 pm
- Preferred Pronouns: He/Him
Re: Running into an Issue with Dedicated Quick-kick Functioning
I believe that was indeed the issue for the persistant binding issue.
As far as the #library declaration, where would I place #library, and what function is it providing?
Compiling the ACS should be simple enough to do now that I've read about it a tiny bit.
As far as the #library declaration, where would I place #library, and what function is it providing?
Compiling the ACS should be simple enough to do now that I've read about it a tiny bit.
Re: Running into an Issue with Dedicated Quick-kick Functioning
Library definition should be placed at the very beginning of your ACS file, like this:

I recommend naming it the same as your file, so if your ACS file is called "KICK" name your library "KICK" too.
As for compiling, you will first need ACC, then if you are using SLADE you just need to press this button:

You will also need a LOADACS file.
However the script you provided in your first post works perfectly fine, the only issue is the KEYCONF file.
Because of how the kick is written, it will make the player's weapon get stuck invisible after it's done kicking you need to strictly call it from the script as DeadHeartProductions said.
However you don't need to change your script to a numbered one to do that and it's better if you keep it a named script to prevent it from interfering with map scripts.
You can call out named scripts in KEYCONF like this:
alias kickyourshit "Pukename Kick"

I recommend naming it the same as your file, so if your ACS file is called "KICK" name your library "KICK" too.
As for compiling, you will first need ACC, then if you are using SLADE you just need to press this button:

You will also need a LOADACS file.
However the script you provided in your first post works perfectly fine, the only issue is the KEYCONF file.
Because of how the kick is written, it will make the player's weapon get stuck invisible after it's done kicking you need to strictly call it from the script as DeadHeartProductions said.
However you don't need to change your script to a numbered one to do that and it's better if you keep it a named script to prevent it from interfering with map scripts.
You can call out named scripts in KEYCONF like this:
alias kickyourshit "Pukename Kick"
-
[name_withheld]
- Posts: 16
- Joined: Thu Apr 13, 2023 2:41 pm
- Preferred Pronouns: He/Him
Re: Running into an Issue with Dedicated Quick-kick Functioning
Doing an edit of the KEYCONF managed to complete correct the issue. All it took was changing "use kickweapon" to "pukename kick."
I'm rather curious now why it worked functionally all that time the other way then just stopped altogether.
At any rate, thank you a lot everyone!
I'm rather curious now why it worked functionally all that time the other way then just stopped altogether.
At any rate, thank you a lot everyone!
- DeadHeartProductions
- Posts: 36
- Joined: Sun Apr 09, 2023 10:49 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 7
- Graphics Processor: Intel (Modern GZDoom)
- Location: Eastern North Southlandia, West Side. Formerly NeoTerraNova
Re: Running into an Issue with Dedicated Quick-kick Functioning
I literally forgot "pukename" for named scripts. Bahaha! Thanks again, Jarewill.However you don't need to change your script to a numbered one
Glad it all worked out. Sorry I wasn't here when the brown stuff hit the oscillating device.
-
[name_withheld]
- Posts: 16
- Joined: Thu Apr 13, 2023 2:41 pm
- Preferred Pronouns: He/Him
Re: Running into an Issue with Dedicated Quick-kick Functioning
You're cool! Thank you for the help! 
While I am here and thinking of it, would you happen to know offhand how I would go about creating a map select screen kinda like Mega Man X that can then be called via keypress while standing in a certain sector? (I'm imagining a landing zone of sorts in each map where you can call up a PDA to jump between the maps, kinda like MGSV.)
While I am here and thinking of it, would you happen to know offhand how I would go about creating a map select screen kinda like Mega Man X that can then be called via keypress while standing in a certain sector? (I'm imagining a landing zone of sorts in each map where you can call up a PDA to jump between the maps, kinda like MGSV.)
- DeadHeartProductions
- Posts: 36
- Joined: Sun Apr 09, 2023 10:49 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 7
- Graphics Processor: Intel (Modern GZDoom)
- Location: Eastern North Southlandia, West Side. Formerly NeoTerraNova
Re: Running into an Issue with Dedicated Quick-kick Functioning
Sorry for the very late reply.
No, I have absolutely no idea how to implement that. I apologise.
No, I have absolutely no idea how to implement that. I apologise.
