While I am using the Hexen's fighter A_TryPunch action function to let this work (a copy of it, not overridden), but somehow the BT_ALTATTACK doesn't work at all and I don't want to use USER# entries or movement buttons (movements works, already implemented over weapons, I just need to figure out this Punch to change into Shield if I press altfire). Little snippet of my ZScript here:
Code: Select all
//============================================================================
//
// From Hexen's Fighter TryPunch
//
// Returns true if an actor was punched, false if not, adapt it for HUW
//
//============================================================================
action bool A_UWPunchInit()
{
if((GetPlayerInput(INPUT_BUTTONS) & BT_ATTACK)) //works
{
player.SetPsprite(PSP_WEAPON, player.ReadyWeapon.FindState("Punch"));
A_StartSound ("*fistgrunt", CHAN_VOICE);
return true;
}
else if((GetPlayerInput(INPUT_BUTTONS) & BT_ALTATTACK)) /does nothing
{
player.SetPsprite(PSP_WEAPON, player.ReadyWeapon.FindState("ShieldRaise"));
return true;
}
return false;
}

