Here's part of the code of my axe weapon. What I'm trying to achieve is a weapon, where you can wind up the swing, hold the mouse button to keep it raised up, and then swing upon release. However, with my current code whenever it goes into Hold state and A_Refire function is applied, the game CTDs instantly.
Code: Select all
Ready:
AXEG A 1 A_WeaponReady
loop
Fire:
AXEG ABCDE 2
AXEG HGF 3
goto Hold
Fire2:
AXEG ABCDE 2
AXEG HGF 3
TNT1 A 4
AXEG I 2 A_PlaySound("weapons/axeswing", CHAN_WEAPON)
AXEG A 1
AXEG J 2 A_CustomPunch(20, 1, 0, "AxeHitPuff")
AXEG K 2
NULL A 6
TNT1 A 2
AXEG JAB 2
Goto Ready
Hold:
AXEG F 1 A_Refire
goto Fire2