Jump to content

meanbeandk

Member
  • Posts

    105
  • Joined

  • Last visited

Posts posted by meanbeandk

  1. Hi

    Where do i add this in my zombie_agent? Can't get that part to work get some errors in the file

    _timeN = time;
    
    if (speed _agent < 0.1) then {_countr = _countr + 1} else {_countr = 0};
    _target = _agent call zombie_findTargetAgent;
    _targetPosition = getPosATL _target;
    _agentPosition = getPosATL _agent;
    _targetdistance = _agent distance _target;
    
    //target distance calculation coding provided by the Unleashed Project.
    
    if ( _targetdistance < 2.2 ) then
    {_r = 1;};
    if (_targetdistance > 2.2 AND _targetdistance < 10) then
    {_r = 6;};
    if ( _targetdistance > 10 AND _targetdistance < 25 ) then
    {_r = 8;};
    if ( _targetdistance > 25 ) then
    {_r = 15;};
    
    _xt = _targetPosition select 0;
    _yt = _targetPosition select 1;
    _xa = _agentPosition select 0;
    _ya = _agentPosition select 1;
    _dx = _xa - _xt;
    _dy = _ya - _yt;
    _dir = _dy atan2 _dx;
    _dx = _dx - _r * cos _dir;
    _dy = _dy - _r * sin _dir;
    _targetPos = [_xt + _dx, _yt + _dy, 0];
    
    //Move to target
    _agent moveTo _targetPos;
    
    //The following code is provided by McKeighan to give random zombies speed.
    
    //flag turns zombie into second hand z once loiter state is re initiated.
    _isaggro = true;
    
    //this flag is set in the zombie_generate.sqf / wildzombie_generate.sqf
    
    if (_isrunner) then {
        _agent forceSpeed 8;
    } else {
        _agent forceSpeed 2;
    };
    
    if (_losCheck == 2) then {
        _losCheck = 0;
        _cantSee = [_agent,_target] call dayz_losCheck;
    };
    
    
  2. in my scripts.log

    #33 "st = 600;  


    SideZMB = createCenter civilian;
    groupZMB = createGroup civilian;
    sleep 0.1;
    fncZcontact = compile preprocessFile "

     

    but cant get it to work if i inset this

    !"st = 600;  \n\n\nSideZMB = createCenter civilian;\ngroupZMB = createGroup civilian;\nsleep 0.1;\nfncTZcontact = compile preprocessFile"

    in line 35 in scripts.cfg ??

  3. Hey

     

    can´t sell or bay enything nothing in the menu´s. the menu shows but nothing to sell or bay

     

    http://steamcommunity.com/sharedfiles/filedetails/?id=496463662

     

    in my discriptien i have added this after the last  };

    #include "zupa\advancedTrading\ZSCdefines.hpp" // if u don't have it from ZSC
    #include "zupa\advancedTrading\advancedTrading.hpp"

     

    and added this in my seflaction just under // Database menu

     

    _buyV = player addAction ["<t color=#0059FF'>Advanced Trading</t>", "zupa\advancedTrading\init.sqf",(_traderMenu select 0), 999, true, false, "","];
    s_player_parts set [count s_player_parts,_buyV];

     

    dont know what to try now

  4. Hi hope you can help me

     

    can't connect stuck on wait for host

     

    i get this in my console when i try to connect

     

     Mission DayZ Epoch Chernarus read from directory.
     Mission DayZ Epoch Chernarus read from directory.
     Mission DayZ Epoch Chernarus read from directory.
     Mission DayZ Epoch Chernarus read from directory.

     

    and it just goes on and on

     

    dont know what is wrong :)


    Got it to work. The @DayzOverwatch client folder was missing on the server. Lol
     

  5. Hi im trying to make a script that changes a players skin to a rocker skin with out loosing his backpack

     

    Here is my code

    private ["_bagType","_bagMagazines","_bagWeapons","_array1","_array2"];
    
    
    _unitBag = unitBackpack player;
    _bagType = typeOf _unitBag;
    _bagWeapons = getWeaponCargo _unitBag;
    _bagMagazines = getMagazineCargo _unitBag;
    
    removeBackpack (vehicle player);
    sleep 1;
    [dayz_playerUID,dayz_characterID,'Rocker2'] spawn player_humanityMorph;
    sleep 1;
    
    if(_bagType == "CZ_VestPouch_EP1" || _bagType == "DZ_LargeGunBag_EP1" || _bagType == "DZ_ALICE_Pack_EP1" || _bagType == "DZ_Assault_Pack_EP1" || _bagType == "DZ_Backpack_EP1" || _bagType == "DZ_British_ACU" || _bagType == "DZ_CivilBackpack_EP1" || _bagType == "DZ_Czech_Vest_Pouch" || _bagType == "DZ_Patrol_Pack_EP1" || _bagType == "DZ_TK_Assault_Pack_EP1" || _bagType == "DZ_GunBag_EP1" || _bagType == "DZ_CompactPack_EP1" || _bagType == "DZ_TerminalPack_EP1") then {
    	
    	(vehicle player) addBackpack _bagType;
    	sleep 0.1;
    
    	_array1 = _bagWeapons select 0;
    	_array2 = _bagWeapons select 1;
    	for [{_i=0}, {_i < count _array1}, {_i=_i+1}] do
    	{
    		(unitBackpack player) addWeaponCargo [(_array1 select _i),(_array2 select _i)];
    	}forEach ARRAY;
    		
    	_array1 = _bagMagazines select 0;
    	_array2 = _bagMagazines select 1;
    	for [{_i=0}, {_i < count _array1}, {_i=_i+1}] do
    	{
    		(unitBackpack player) addMagazineCargo [(_array1 select _i),(_array2 select _i)];
    	}forEach ARRAY;
    
    };
    

    i think my problem is that the sleep funtion don't work wile using  player_humanityMorph

    if i make this. 

    It takes off my backpack and put it on again.

    sleep 1;
    //[dayz_playerUID,dayz_characterID,'Rocker2'] spawn player_humanityMorph;
    sleep 1;
    

    Hope some one can help me  :)

     

     

×
×
  • Create New...