Jump to content

Frate

Member
  • Content Count

    3
  • Joined

  • Last visited

  • Medals

Posts posted by Frate


  1. Hello,
    I'm trying to figure out if the player is aiming at an object.
    I'm using weaponDirection but It does not point properly on elevation.
    Seems to be following the terrain slope ahead.
    How to solve this?
     

    onEachFrame  
    {  
    _beg =  getpos player; 
    _wDir = (player weaponDirection currentWeapon player vectorMultiply 100);
    _endW = _beg vectorAdd _wDir;  
     drawLine3D [_beg, _endW, [0,1,0,1]];
    drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Radar\radar_ca.paa", [1,1,1,1], _endW, 1, 1, 45, "Target", 1, 0.05, "TahomaB"];
    };

    https://imgur.com/a/bOuXWo8 Video example of the issue.

    Frate



     


  2. On 6/6/2018 at 1:02 PM, Gemini said:

    Hi Voiper,

     

    Thank you very much for this incredible script.

     

    But it's causing an error message since a recent CBA update when I press a key once the map is open : 

    
    {
    private _ke>
    12:54:42   Error Type Booléen, Nombre attendu
    12:54:42 File x\cba\addons\events\fnc_keyHandlerDown.sqf, line 71
    12:54:42 Error in expression <
    };
    } forEach (cba_events_keyDownStates param [_inputKey, []]);

    I know this thread hasn't been updated since a long time, I hope you are still there and you'll be able to provide some help.

     

    Thanks again !

     

    Hi,

    resurrecting old topic for a fix to this error.

    Don't know the exact reason of the issue, maybe the mixed list type.
    You can fix by changing the following lines in vip_lit/vip_lit_mapAdditions.sqf functions vip_lit_eh_cl_keyDnNVG and vip_lit_eh_cl_keyUpFlashlight :

     

    _arr = _this;
    _arr deleteAt 0;

     

    change to

     

    _arr = [_this select 1, _this select 2, _this select 3, _this select 4];




    so you end up with

     

    vip_lit_eh_cl_keyUpFlashlight = (findDisplay 12) displayAddEventHandler ["KeyUp", {
    
            _arr = [_this select 1, _this select 2, _this select 3, _this select 4];
            
            if (str _arr == str vip_lit_var_cl_mapFlashlightKey) then {
            
                if (HAS_LIGHT) then {
                    vip_lit_var_cl_flashlightKeyDown = false;
                    vip_lit_var_cl_flashlightOn = if (vip_lit_var_cl_flashlightOn) then {false} else {true};
                    0 = [] spawn {sleep 0.016; playsound "vip_lit_snd_flashlightClick"}; //sleep to create buffer between sounds; keyUp fires instantly if player presses and releases quickly
                };
            };
            false
        }];

     

    and
     

        vip_lit_eh_cl_keyDnNVG = (findDisplay 12) displayAddEventHandler ["KeyDown", {
    
            _arr = [_this select 1, _this select 2, _this select 3, _this select 4];
            
            if (str _arr == str vip_lit_var_cl_mapNVGKey) then {
                
                if ((hmd player) != "") then {
                    vip_lit_var_cl_mapNVGOn = if (vip_lit_var_cl_mapNVGOn) then {false} else {true};
                };
            };
            
            false
        }];

    Do the same thing to vip_cmn_eh_cl_keyBindTemp in vip_cmn\fn\fn_cl_keyBind.sqf

     

×