my weapon decorate using in 8x places:
- Code: Select all • Expand view
A_Custompunch(random(30, 40), 1, CPF_NORANDOMPUFFZ, "StaffPuff", 80);
I want to change damage value, so i would like to use something like :
- Code: Select all • Expand view
int MyVar = random (30, 40);
A_Custompunch( MyVar, 1, CPF_NORANDOMPUFFZ, "StaffPuff", 80)
So after trying few things i use the Zscript to write my function. but i think its overkill. Any advise?
- Code: Select all • Expand view
action void punchdmg(){
FTranslatedLineTarget t;
double ang = angle + Random2() * (5.625 / 256);
double pitch = AimLineAttack(ang, 64, null, 0., ALF_CHECK3D);
LineAttack(ang, 64, pitch, random(10, 30), 'Melee', "StaffPuff", LAF_ISMELEEATTACK, t);
//A_Custompunch(random(30, 40), 1, CPF_NORANDOMPUFFZ, "StaffPuff", 80);
}
- Code: Select all • Expand view
SPRT A 1 punchdmg();