Jump to content

fn_Quiksilver

Member
  • Content Count

    2697
  • Joined

  • Last visited

  • Medals

Posts posted by fn_Quiksilver


  1. 2 hours ago, fubukiiwanami said:

    Hi QS,  

    I have a question for the squad IFF system in your framework, 

    I don't know how to call this blue team hexagon identification marker in your code, It will be appeared when players who take

     GPS in same squad.

     

    Can I close this marker in my server? If yes, Which file/script can I found the setting for this marker?

     

     

    And, Really like your I&A maps, Thank you for your Great job! 

     

     

    65iSDao.jpg

     

     

    Hi, thank you!

     

    The easiest way is to change this line:

     

    https://github.com/auQuiksilver/Apex-Framework/blob/master/Apex_framework.terrain/code/functions/fn_clientEventDraw3D.sqf#L155

     

    To:

     

    if (false) then {

     


  2. 12 minutes ago, Larrow said:

    You are getting the position of ctrl 151 from within the controlGroup 2302, not the controls groups position.

    
    _rscUnitInfo = uiNamespace getVariable "RscUnitInfo";
    _ctrlsGroupPos = ctrlPosition ( _rscUnitInfo displayCtrl 2302 ) select[ 0, 2 ];
    _ctrlPos = ctrlPosition (( _rscUnitInfo displayCtrl 2302 ) controlsGroupCtrl 151 );
    
    {
    	_ctrlPos set[ _forEachIndex, ( _ctrlPos select _forEachIndex ) + _x ];
    }forEach _ctrlsGroupPos;
    
    _ctrl = findDisplay 46 ctrlCreate [ "RscPicture", 100001 ];
    _ctrl ctrlSetText  "#(argb,8,8,3)color(1,0,0,1)";
    _ctrl ctrlSetPosition _ctrlPos;
    _ctrl ctrlCommit 0;

     

     

    hmm did not think of that, was going about it the wrong way

     

    thank you good sir


  3. 34 minutes ago, Larrow said:

    ctrlPosition like any other ctrl.

     

    Adding to the above when dealing with vehicles you need to update the controls you are looking for based on the turret currently occupied.

    e.g the slammer

    If you are in the base of the vehicle then its unitInfoType member, being RscUnitInfoTank

    Then each turret has a turretInfoType, which for the slammer MainTurret (gunner) being "RscOptics_MBT_01_gunner" for various other controls.

     

    do you have a line for returning the position of the control group?

     

    for instance

     

    _grenadeCntCtrl = (uiNamespace getVariable 'RscUnitInfo') displayCtrl 2302 controlsGroupCtrl 151;

     

    does not return the actual screen XY position of the control. It returns the position relative to hte position of the control group. I am looking for actual screen position


  4. 44 minutes ago, Larrow said:

    Sorry not sure what happened there, seemed to of written some wrong idcs :shrug:

     

    2302 is unit weapons info, 2303 is vehicle weapons info.

    Controls under RscUnitInfo seem to be created/destroyed as needed.

     

      Hide contents
    
    
    h = [] spawn {
    	while { true } do {
    		_rscInfo = uiNamespace getVariable "RscUnitInfo";
    		_ammo = 184;
    		_mag = 185;
    		_grenade = 151;
    		
    		_info = if ( vehicle player isEqualTo player ) then {
    			_rscInfo = _rscInfo displayCtrl 2302;
    			format[ "Ammo: %1\nMags: %2\nGrenades: %3",
    				ctrlText( _rscInfo controlsGroupCtrl _ammo ) splitString "| " select 0,
    				ctrlText( _rscInfo controlsGroupCtrl _mag ) splitString "| " select 0,
    				ctrlText( _rscInfo controlsGroupCtrl _grenade ) splitString "x" select 0
    			];
    		}else{
    			_rscInfo = _rscInfo displayCtrl 2303;
    			format[ "Ammo: %1\nMags: %2",
    				ctrlText( _rscInfo controlsGroupCtrl _ammo ) splitString "| " select 0,
    				ctrlText( _rscInfo controlsGroupCtrl _mag ) splitString "| " select 0
    			];
    		};
    		
    		hint _info;
    	};
    };

     

     

    Not even sure that is correct for all vehicles. The above works for gunner in a hunter but does not for say a gunner in a slammer.

     

    ahh.

     

    i mean to find the onscreen position of those controls. how do I return the ctrlPosition of the controls group?


  5. 21 hours ago, poweredbypot said:

    @fn_Quiksilver

    Love this script. That needs to be said and read all on its own.

    With that out of the way, is it possible and are you willing to consider an addition in which enemy units can be revealed to a player who spots them? And further to share this information with allies if say both units have a GPS and there is a friendly UAV in the air?

     

     

     

    hey,

     

    thanks!

     

    That can be scripted in for sure.

     

    In fact I use an edited version for my other work which does just that (shows known enemy units).

     

    I didn't put it into the official version since there already is a vanilla system to show known enemies which does roughly the same thing. My one only provides less information and has a limited radius, and allows me to "hide" enemy stealth units from the map.


  6. 13 hours ago, Larrow said:
    
    _grenadeCntCtrl = (uiNamespace getVariable 'RscUnitInfo') displayCtrl 2302 controlsGroupCtrl 151;
    _magCntCtrl = (uiNamespace getVariable 'RscUnitInfo') displayCtrl 2303 controlsGroupCtrl 151;
    _flareCntCtrl = (uiNamespace getVariable 'RscUnitInfo') displayCtrl 151;

    There are a few 151 controls within controlsGroups in RscUnitInfo.

     

    Add the position of the ctrl in the controlsGroup and the position of the controlsGroup within RscUnitInfo together.

     

    _grenadeCntCtrl = ((uiNamespace getVariable 'RscUnitInfo') displayCtrl 2302) controlsGroupCtrl 151;
    _magCntCtrl = ((uiNamespace getVariable 'RscUnitInfo') displayCtrl 2303) controlsGroupCtrl 151;
    _flareCntCtrl = (uiNamespace getVariable 'RscUnitInfo') displayCtrl 151;
    systemChat str (
    	[
    		ctrlPosition _grenadeCntCtrl,
    		ctrlPosition _magCntCtrl,
    		ctrlPosition _flareCntCtrl
    	]
    );

    all positions report [0,0,0,0] when in a vehicle

     

    on foot = [         [0.24,0.1,0.06,0.04],       [0,0,0,0],         [0.24,0.1,0.06,0.04]       ]


  7. HI lads,

     

    Specifically I am trying to pull the screen position of

     

    ((uiNamespace getVariable 'RscUnitInfo') displayCtrl 151)

    when i do something simple like

    systemChat str (ctrlPosition ((uiNamespace getVariable 'RscUnitInfo') displayCtrl 151));

    It returns a position like

    [0.24,0.1,0.06,0.04]

    Which is nowhere near the actual UI in the top corner.

     

    I assume there is some controls group to access but I can't seem to figure it out.

     

    Thanks!


  8. On 6/23/2019 at 5:02 PM, killzone_kid said:

    Any .rpt messages?

     

    Only sound-file related

     

    17:20:22 Sound: Error: File: a3\sounds_f\arsenal\weapons\ugl\ugl_tail_meadows.wss not found !!!

     

     

    To further clarify:

     

    - In editor on Enoch terrain, use Ifrit. Smoke CM appears fine.

     

    - In dedicated server, as client on Tanoa terrain, use Ifrit. Smoke CM is invisible.


  9. On 6/14/2019 at 10:20 PM, luminous815 said:

    Hello Quicksliver!I found custom init code not working on respawning vehicle,these are the codes I added on the respawning vehinle:

    0 = [
        this,
        30,
        false,
        {this addeventhandler["fired",{(_this select 0) setvehicleammo 1;}];},
        50,
        50,
        -1,
        true
    ] call QS_fnc_registerVehicle;

    Is there any problems with my codes?

    In addition,how could I use custom weather in the mission?I want to play some foggy tasks.

     

    Hi, to disable internal weather system, you need to set this variable to FALSE

     

    https://github.com/auQuiksilver/Apex-Framework/blob/master/Apex_framework.terrain/code/functions/fn_core.sqf#L558

     

    For this block

     

    0 = [
        this,
        30,
        false,
        {this addeventhandler["fired",{(_this select 0) setvehicleammo 1;}];},
        50,
        50,
        -1,
        true
    ] call QS_fnc_registerVehicle;

     

    "this" is not recognized in that context (the { ... } is called from another script, not editor init field).

     

    you need to change it to _this

     

    so this block would be correct:

     

    0 = [
        this,
        30,
        false,
        {_this addeventhandler["fired",{(_this select 0) setvehicleammo 1;}];},
        50,
        50,
        -1,
        true
    ] call QS_fnc_registerVehicle;

     

    also you may encounter a locality issue with "setVehicleAmmo", since the { ... } is only executed on server.

     

    the solution might be like this

    0 = [
        this,
        30,
        false,
        {
    		[
    			[_this],
    			{
    				(_this # 0) addEventHandler ["Fired",{ if (local (_this # 0)) then { (_this # 0) setVehicleAmmo 1;};}];
    			}
    		] remoteExec ['call',0,_this];
    	},
        50,
        50,
        -1,
        true
    ] call QS_fnc_registerVehicle;

     


  10. Is there a process where the community can submit optimizations/refactors of vanilla scripted systems?

     

    Thinking of some of the larger systems like Arsenal, Zeus modules and parts of the Functions library, even "initFunctions.sqf" (which still uses functions like BIS_fnc_MP).

     

    Maybe someone like @killzone_kid would be willing to curate community submissions to bring these SQF systems up to modern standards.

    • Like 5
×