Release: Player2's Knockout

Player2

Valued Member!
Help and discussion for Player 2's knockout begins here :)
This is an awesome script Player 2 got working, Yes It is tested and working. The bugs have been cleaned out, all modes have been tested. So well done on finally getting it up on open dayz :)

Couldn't of done it without you being so patient and letting me knock you out thousands of times...
It was fun though, especially when we were 'knocking out' buildings and dragging them around like bodies. :D
 
This sounds really cool I especially like the crowbar option, going to check it out on my test server later thanks for sharing :D

My only question was going to be is the knockout time customisable but I see from the code it is
 
Hey, great work!

Will give it a go in my test server... we had a melee before but it was very clunky - this'll be a vast improvement
 
This sounds really cool I especially like the crowbar option, going to check it out on my test server later thanks for sharing :D

My only question was going to be is the knockout time customisable but I see from the code it is

Unfortunatly the knock out timer works on the preset knock out code defined in dayz, I know P2 did try setting a custom one, but the dayz code kept overwriting it. Maybe in a future release this will be possible, but atm no, so its kinda random (as it would be in real life), We did play around alot with knocking players out while they are knocked out to try and get a shorter timer, but this led to some bugs, so P2 put in the code to stop you knocking a player out while they are unconcious :p

This script is a beauty for both hero's and bandits alike. Kidnap you victims and take them for a ride. Or you dont trust the guy your bloodbagging in the middle of cherno? knock him out drag him to a building, patch him up and be gone before he wakes up :p
 
Unfortunatly the knock out timer works on the preset knock out code defined in dayz, I know P2 did try setting a custom one, but the dayz code kept overwriting it. Maybe in a future release this will be possible, but atm no :p

Ah I guess I should have read both files before posting in full instead of just

_duration = _this select 1;

I'll share any customization's or changes I make to this before I try deploying it anyway, I'd definitely like to try and get control over the timing of the knockouts and also add a random chance for it to fail so its not a guaranteed knock out with every click.
 
Find & Replace:
fnc_usec_damageActions = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_damageActions.sqf";
With:
fnc_usec_damageActions = compile preprocessFileLineNumbers "fixes\fn_damageActions.sqf";

Why do ?
 
i put all the stuff in knock out comes up but just bend over and the guy you knockout has nothing done to him any ideas?
 
Added a little client side animation to this, wish I knew how to make it visible for both.. Is there a list that can be used so everyone sees it?
 
Looks great can't wait to test it! I ran into a little problem and I feel stupid for asking but where do you get/find:

\fixes\compiles.sqf
\fixes\fn_selfActions.sqf
\fixes\publicEH.sqf


quoting Friday also, its like a dream come true!


**edit**

For any other noobs you can find the dayz_code.pbo in:
C:\Program Files (x86)\Steam\steamapps\common\Arma 2 Operation Arrowhead\@Dayz\Addons
 
Looks great can't wait to test it! I ran into a little problem and I feel stupid for asking but where do you get/find:

quoting Friday also, its like a dream come true!

Take another look at the first part of the tutorial. It assumes you already have a bit of knowledge I know, but it isn't too hard to figure out. If I included how to extract files from the dayz_code.pbo this thread would be a lot bigger than it already is. Look around at some of the other mission mod tutorials and you should be able to figure things out.
 
Thanks, sorry for being a retard I figured it all out quickly :p. I have two problems I was hoping you could shed some light on.

In the fixes/variables.sqf two instances were found for "s_player_studybody = -1;" do I insert the edits below both instances?
Also I already have a fixes/variables.sqf from my debug monitor. It was missing "canRoll = true;" so I just added it in right below "dayz_combatLog = "";" like you did. Think thats cool or is it a big no no?
 
Here is code for people who want to knock out zombies and buildings...

Code:
    //####    KNOCKOUT            ####
    _unconscious =    cursorTarget getVariable ["NORRN_unconscious", false];
 
    if (_canDo and !_unconscious) then {
        if (_isMan and _isAlive and !_isZombie) then {
            if (s_player_knockout < 0) then {
                s_player_knockout = player addAction [("<t color=""#FF9800"">" + ("Knockout!") + "</t>"), "fixes\knockout.sqf",cursorTarget, 0, false, true, "",""];
            };
        }
        else
        {
            if (s_player_knockout < 0) then {
                codeKnockOut = {cursorTarget setDamage 1;};
                s_player_knockout = player addAction [("<t color=""#FF9800"">" + ("Knockout!....Wait what?") + "</t>"), "ca\modules\MP\data\scriptCommands\moveIn.sqf","Driver (call codeKnockOut);", 0, false, true, "",""];
            };
        };
    } else {
        player removeAction s_player_knockout;
        s_player_knockout = -1;
    };
    //##############################
 
Here is code for people who want to knock out zombies and buildings...

Code:
    //####    KNOCKOUT            ####
    _unconscious =    cursorTarget getVariable ["NORRN_unconscious", false];
 
    if (_canDo and !_unconscious) then {
        if (_isMan and _isAlive and !_isZombie) then {
            if (s_player_knockout < 0) then {
                s_player_knockout = player addAction [("<t color=""#FF9800"">" + ("Knockout!") + "</t>"), "fixes\knockout.sqf",cursorTarget, 0, false, true, "",""];
            };
        }
        else
        {
            if (s_player_knockout < 0) then {
                codeKnockOut = {cursorTarget setDamage 1;};
                s_player_knockout = player addAction [("<t color=""#FF9800"">" + ("Knockout!....Wait what?") + "</t>"), "ca\modules\MP\data\scriptCommands\moveIn.sqf","Driver (call codeKnockOut);", 0, false, true, "",""];
            };
        };
    } else {
        player removeAction s_player_knockout;
        s_player_knockout = -1;
    };
    //##############################

Knock out.. buildings? Wtf?
 
Here is code for people who want to knock out zombies and buildings...

Code:
    //####    KNOCKOUT            ####
    _unconscious =    cursorTarget getVariable ["NORRN_unconscious", false];
 
    if (_canDo and !_unconscious) then {
        if (_isMan and _isAlive and !_isZombie) then {
            if (s_player_knockout < 0) then {
                s_player_knockout = player addAction [("<t color=""#FF9800"">" + ("Knockout!") + "</t>"), "fixes\knockout.sqf",cursorTarget, 0, false, true, "",""];
            };
        }
        else
        {
            if (s_player_knockout < 0) then {
                codeKnockOut = {cursorTarget setDamage 1;};
                s_player_knockout = player addAction [("<t color=""#FF9800"">" + ("Knockout!....Wait what?") + "</t>"), "ca\modules\MP\data\scriptCommands\moveIn.sqf","Driver (call codeKnockOut);", 0, false, true, "",""];
            };
        };
    } else {
        player removeAction s_player_knockout;
        s_player_knockout = -1;
    };
    //##############################

Lmao, awesome stuff.
 
Back
Top