[Zscript or DECORATE] player dash attack?
Posted: Wed Feb 09, 2022 5:43 am
I'm out of ideas how to make player dash forward a certain distance when using melee attack. Should it be Zcript and what parameters should be used or can it be done simply in decorate?
I don't have any fancy code to show whats wrong in it, since I've discarded all that I've tried.
Edit*
I found out that there is a A_RECOIL Decorate parameter, and it can be used for negative values instead of positive, will test it out. Maybe this will solve it.
Edit2*
Now it does dash, BUT the Angle is messed up, sometimes it dashes towards enemy and sometimes it takes sharp 90 degree turns away from enemy. Any idea how to solve this? Can it be done so that the dash would follow the crosshair? Here is the code
I don't have any fancy code to show whats wrong in it, since I've discarded all that I've tried.
Edit*
I found out that there is a A_RECOIL Decorate parameter, and it can be used for negative values instead of positive, will test it out. Maybe this will solve it.
Edit2*
Now it does dash, BUT the Angle is messed up, sometimes it dashes towards enemy and sometimes it takes sharp 90 degree turns away from enemy. Any idea how to solve this? Can it be done so that the dash would follow the crosshair? Here is the code
Code: Select all
AltFireBerserk:
PUNG B 0 A_Recoil (-50)
PUNG B 0 A_PlaySound("skeleton/swing")
PUNG B 0 A_PlaySound("usefail")
PUNG B 5 {a_overlayflags(1, pspf_flip, 1); a_overlayflags(1, pspf_mirror, 1);}
PUNG C 5 A_Punch
PUNG D 5 A_Punch
PUNG C 5 A_Punch
PUNG B 5 {a_overlayflags(1, pspf_flip, 0); a_overlayflags(1, pspf_mirror, 0);}
PUNG B 0
Goto Ready2