SmokeyMeadow
Well-Known Member
Hi. I'm sharing a script I've been working on that will allow players to punch or use their rifle as a melee weapon. This is something I always felt was lacking from the Day Z experience. Now players can stealth kill, interrogate, and generally survive without weapons/ammo. It works on survivors, zeds and animals. So far, landing a punch is difficult. The zombies run around like crazy and it's hard to get a cursortarget to hit them. I did manage to kill one zombie bare handed. I have no one to help test this with, so I would appreciate anyone's input on how to make it better.
This part goes in fn_selfactions:
Then, put this in your scripts folder.
This is an adaptation of a script I found on Armaholic. Ideally I would like to have it in sqf instead of sqs, since I have no idea how to code for sqs. Luckily it just kind of works. Like I said earlier, consider it a WIP. Anyone with ideas on how to improve it, please feel free to chime in. For now, I left it so you can punch dead bodies. I suppose a next step would be to add an !_isalive or something in the init.
This part goes in fn_selfactions:
Code:
//PUNCH START
if(cursorTarget isKindOf "Man" and _canDo && (player distance cursorTarget < 3)) then {
punchTimeM = true;
} else {
punchTimeM = false;
};
if (punchTimeM) then {
if (s_player_punchM < 0) then {
s_player_punchM = player addAction [("<t color=""#0096ff"">" + ("Strike!") +"</t>"),"scripts\punchM.sqs","",5,false,true,"",""];
};
} else {
player removeAction s_player_punchM;
s_player_punchM = -1;
};
//PUNCH END
Then, put this in your scripts folder.
This is an adaptation of a script I found on Armaholic. Ideally I would like to have it in sqf instead of sqs, since I have no idea how to code for sqs. Luckily it just kind of works. Like I said earlier, consider it a WIP. Anyone with ideas on how to improve it, please feel free to chime in. For now, I left it so you can punch dead bodies. I suppose a next step would be to add an !_isalive or something in the init.