Jump to content
  • 0
Sign in to follow this  
juandayz

fn_unconsius.sqf

Question

hey any knows how to call fn_unconsius.sqf  with other script?

i making a script and a i need generate on the other player a fainthing. something like knockout.

guess i need to call a new custom fn_unconsius.. with compiles.sqf too

i have it

Spoiler

private ["_cursorTarget","_isAlive","_isMan","_isZombie","_isAnimal","_isBandit","_isHero","_rnum","_infectrand"," _welcomeMessage "," _camDistance "]
_cursorTarget = cursorTarget;
_isAlive = alive _cursorTarget;
_isMan = _cursorTarget isKindOf "Man";
_isZombie = _cursorTarget isKindOf "zZombie_base";
_isAnimal = _cursorTarget isKindOf "Animal";
_isBandit = (cursortarget getVariable["humanity",0]) <= -2500;
_isHero = (cursortarget getVariable["humanity",0]) >= 5000;
_rnum = random 100;
_infectrand = round(random 10);

_welcomeMessage = format["MY TEXT, %1,",format["%1", name player]];
_camDistance = 60;


if (_isMan and _isAlive and !_isZombie and !_isAnimal and (player distance cursorTarget < 3)) then {

    if (_isBandit) then {
        [player,-250] call player_humanityChange;
        cutText ["my text, -250 humanity.", "PLAIN DOWN"];
    if (_infectrand < 8) then {r_player_infected = true;
        cutText [format["%1, youre infected by some kind of virus",name player], "PLAIN DOWN"];
    };

showCinemaBorder true;
   camUseNVG false;               
   _camera = "camera" camCreate [(position player select 0)-2, position player select 1,(position player select 2)+_camDistance];
   _camera cameraEffect ["internal","back"];
   
   _camera camSetFOV 2.000;
   _camera camCommit 0;
   waitUntil {camCommitted _camera};
   playsound "sex";
 
   _camera camSetTarget vehicle player;
   _camera camSetRelPos [0,0,2];
   _camera camCommit 12;
 
   cutText [_welcomeMessage, "PLAIN DOWN"];

   waitUntil {camCommitted _camera};
 
  _camera cameraEffect ["terminate","back"];
  camDestroy _camera;

    };
    if (!_isHero and !_isBandit) then {
        [player,-500] call player_humanityChange;
        cutText ["my text, -500 humanity.", "PLAIN DOWN"];
    if (_infectrand < 6) then {r_player_infected = true;
        cutText [format["%1, youre infected by some kind of virus",name player], "PLAIN DOWN"];
    }; 

showCinemaBorder true;
   camUseNVG false;               
   _camera = "camera" camCreate [(position player select 0)-2, position player select 1,(position player select 2)+_camDistance];
   _camera cameraEffect ["internal","back"];
   
   _camera camSetFOV 2.000;
   _camera camCommit 0;
   waitUntil {camCommitted _camera};
   playsound "sex";
 
   _camera camSetTarget vehicle player;
   _camera camSetRelPos [0,0,2];
   _camera camCommit 12;
 
   cutText [_welcomeMessage, "PLAIN DOWN"];

   waitUntil {camCommitted _camera};
 
  _camera cameraEffect ["terminate","back"];
  camDestroy _camera;

   
    };
    if (_isHero) then {
        [player,-1000] call player_humanityChange;
        cutText ["my text, -1000 humanity.", "PLAIN DOWN"];
    if (_infectrand < 3) then {r_player_infected = true;
        cutText [format["%1, youre infected by some kind of virus",name player], "PLAIN DOWN"];
    };

showCinemaBorder true;
   camUseNVG false;               
   _camera = "camera" camCreate [(position player select 0)-2, position player select 1,(position player select 2)+_camDistance];
   _camera cameraEffect ["internal","back"];
   
   _camera camSetFOV 2.000;
   _camera camCommit 0;
   waitUntil {camCommitted _camera};
   playsound "sex";
 
   _camera camSetTarget vehicle player;
   _camera camSetRelPos [0,0,2];
   _camera camCommit 12;
 
   cutText [_welcomeMessage, "PLAIN DOWN"];

   waitUntil {camCommitted _camera};
 
  _camera cameraEffect ["terminate","back"];
  camDestroy _camera;

    };
};

my question is if is possible call the unconsius  trough the script

Share this post


Link to post
Share on other sites

9 answers to this question

Recommended Posts

  • 0

This is from axe melee damage but generally you can see what does the part .

 

 
[_unit] spawn {
_unit = _this select 0;
"you have been knocked out" call dayz_rollingMessages;
[_unit,0.01] call fnc_usec_damageUnconscious;
_unit setVariable ["NORRN_unconscious", true, true];
r_player_timeout = 20 + round(random 60);
r_player_unconscious = true;
player setVariable["medForceUpdate",true,true];
player setVariable ["unconsciousTime", r_player_timeout, true];
};

Share this post


Link to post
Share on other sites
  • 0

tnks so much creative gonna try... i found this (lines in blue) , but need to test
, dnt know if gonna work

Spoiler

private ["_cursorTarget","_isAlive","_isMan","_isZombie","_isAnimal","_isBandit","_isHero","_rnum","_infectrand","]
_cursorTarget = cursorTarget;
_isAlive = alive _cursorTarget;
_isMan = _cursorTarget isKindOf "Man";
_isZombie = _cursorTarget isKindOf "zZombie_base";
_isAnimal = _cursorTarget isKindOf "Animal";
_isBandit = (cursortarget getVariable["humanity",0]) <= -2500;
_isHero = (cursortarget getVariable["humanity",0]) >= 5000;
_rnum = random 100;
_infectrand = round(random 10);

if !(_isMan && _isAlive) exitWith {
    cutText [format["debe ser persona."], "PLAIN DOWN"];
};

if (_isMan and _isAlive and !_isZombie and !_isAnimal and (player distance cursorTarget < 3)) then {
    
    titleText ["!", "PLAIN DOWN"];titleFadeOut 5;
    
    playSound "heartbeat_1";

    if (_isBandit) then {
        [player,-250] call player_humanityChange;
        cutText [", -250 humanity.", "PLAIN DOWN"];
    if (_infectrand < 4) then {r_player_infected = true;
        cutText [format["%1, you get infected by some kind of virus",name player], "PLAIN DOWN"];
    };
    };
    if (!_isHero and !_isBandit) then {
        [player,-500] call player_humanityChange;
        cutText [", -500 humanity.", "PLAIN DOWN"];
    if (_infectrand < 4) then {r_player_infected = true;
        cutText [format["%1, you get infected by some kind of virus",name player], "PLAIN DOWN"];
    };    
    };
    if (_isHero) then {
        [player,-1000] call player_humanityChange;
        cutText [", -1000 humanity.", "PLAIN DOWN"];
    if (_infectrand < 4) then {r_player_infected = true;
        cutText [format["%1, you get infected by some kind of virus",name player], "PLAIN DOWN"];
    };
    };
};

if (isServer) then {
_array = _this; //_this select 0;
_unit = _array select 0;

    _unit setVariable["NORRN_unconscious",true, true]; // set unconcscious
    _unit setVariable["unconsciousTime",15,true]; // unconcscious time
    _unit setVariable["USEC_injured",true]; // bleeding    
};

 

Share this post


Link to post
Share on other sites
  • 0

i need to generate an inconscious state on the other player..   see... First player launch the script on a second player.  First Player get a downgrade humanity for use this script,  second player get an inconscious state while this happend.

anyway dsnt works. fail when second player must be involved. i think this must be like knockout script.  Player A use scroll menu to knock out Player B to generate the unconscious state. then my script start to run on player A.

in other words,,, now i guess can be more easy use knock out script and add the option to execute my script once player are knoked out.

tnks creative!

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Similar Content

    • By Bloodthirsty
      Hey I just need some files for this server, any and all you guys can come up with and think it deserve post that shit in chat rn. I want to see some crazy ideas and additions if you got em :) Lets see what you guys can come up with

    • By juandayz
      I JUST LEAVE THIS ONE CUZ I KNOW YOU GUYS GONNA NEED IT..
       
      The very old safezone script by infistar... i was using it in 1.0.5.1  and made some changes to use in 1.6.
      Instructions:
          1. Copy paste the code of below into a file called 16_safezone.sqf - save the file.
          2. Paste this 16_safezone.sqf into mpmissioms\instance_11.chernarus\custom\
          3. Open your init.sqf
          4. At the very bottom of the file add this line:  [] execVM "custom\16_safezone.sqf";
          5. Save the init.sqf and restart your server.
          6-WARNING!!! if ure using some kind of mod that allow vehicles with GodMode out of safezones..  then you will need in 16_safezone.sqf change the path for veh_handleDam.sqf by the path that youre using your custom veh_handleDam.sqf
      this line:  fnc_veh_handleDam = compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\veh_handleDam.sqf';
          16_safezone.sqf
       
      OPTIONAL:
      @BetterDeadThanZed here you got.
      REMOVE LOOT FROM TRADER CITIES AND PLOT POLES. (should removes zeds from trader places and poles too)
       
       
  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...