Code: Select all
class JumpButtonWeapon:Weapon{
action void A_JumpIfPressing(int button,statelabel stt,int layer=PSP_WEAPON){
if(player.cmd.buttons&button)player.setpsprite(layer,invoker.findstate(stt));
}
action void A_JumpIfPressingFire(statelabel stt){
A_JumpIfPressing(BT_ATTACK,stt);
}
action void A_JumpIfPressingAltfire(statelabel stt){
A_JumpIfPressing(BT_ALTATTACK,stt);
}
}
Code: Select all
VLCN ABCD 1 A_JumpIfPressingFire("hold")
Code: Select all
TNT1 A 0 A_JumpIfPressingAltfire("althold")