I want all the melee attacks to work more like in fighter games - one click one attack and mixture of primary and secondary to create various combos. I used A_WeaponReady with disabled refire but it have problem that it switches the instantly and thus amking precise animations really hard to pull off. I would like to use system that buffers the input and releases it when I want so it have large enough window to press the key and then precise moment when it switches states.
I found how to get the input in ZSCript and created three action functions. One to get the input and store it in variable, another to switch state depending on the variable and clear it. And last to clear the buffer just to be sure.
I got to the point it runs but it doesn't work. I really don't know what to do with that. I don't know how to debug in GZDooM and without it it's just up to my skills which are really limited.
I don't know if I am handling the variables properly. The pointers when working with weapons and inventory are still mystery to me.
Also there can be problem that I created the functions in class other weapons are inheriting from.
Or I just wrote the if statement wrong. I want to check if the primary fire is pressed and wasn't pressed in previous tic.
If sombody can try to look at it and help, I would be really glad.
Code:
Spoiler: