Jump to content

Mr H.

Member
  • Content Count

    597
  • Joined

  • Last visited

  • Medals

Posts posted by Mr H.


  1. Ok

    In your description.ext:
     

    class Extended_PostInit_EventHandlers
    {
    
       class TAG_MyKeyBindsInit
       {
          init = "call compile preProcessFileLineNumbers 'CBAKeys.sqf'";
       };    
    	   
    };

    in CBAKeys.sqf
     

    #include "\a3\editor_f\Data\Scripts\dikCodes.h"
    ["TAG_Your_Mission","TAG_setting_openYourMenu" ,["Open my very cool menu", ""],
    {
    	call TAG_MyMenu_fnc;
    
    }},{},[DIK_NUMPADPLUS , [true, true, false]]] call CBA_fnc_addKeybind; // CTRL + SHIFT + NUMPAD+ will open your menu change to whatever, will appear in cba options once in game so can be custom set

    in wherever you declare your functions:

    TAG_MyMenu_fnc = {
    
    
    	disableSerialization;
    
    	_Show_RMenu_ctrl = (findDisplay 46) displayCtrl 9001;
    	if(isNull(_Show_RMenu_ctrl)) then {
    	_Show_RMenu_ctrl = (findDisplay 46) ctrlCreate ["RscText", 9001];
    	_Show_RMenu_ctrl ctrlShow false;
    	};
    	_shown = ctrlShown _Show_RMenu_ctrl;
    	(if(_shown)then{
    	closeDialog 2;	
    	#define IDC_CANCEL 2
    	closeDialog IDC_CANCEL;
    	private ["_vehicle","_noEscort"];
    	_vehicle = cursorObject;
    	_noEscort = count attachedObjects player isEqualTo 0;
    	if (isNull _vehicle && _noEscort) then {
    	0 = createDialog "val_menu_1";
    	} else 
    	{
    		switch (true) do
    		{
    			case (_vehicle distanceSqr player > 4^2 && _noEscort): {0 = createDialog "val_menu_1"; systemchat "To far"};
    			case (!alive _vehicle && _noEscort): {0 = createDialog "val_menu_1"; systemchat "Not Alive"};
    			case (!_noEscort): {0 = createDialog "val_menu_2"; systemchat "Has Escort"};
    			case (!isPlayer _vehicle && {_vehicle isKindOf "Man"}): {0 = createDialog "val_menu_2"; systemchat "AI"};
    			case (isPlayer _vehicle && {_vehicle isKindOf "Man"}): {0 = createDialog "val_menu_2"; systemchat "PLAYER"};
    			case (_vehicle isKindOf "LandVehicle") : {0 = createDialog "val_menu_3"; systemchat "LAND VEHICLE"};
    			case (_vehicle isKindOf "Car") : {0 = createDialog "val_menu_3"; systemchat "CAR"};
    			case (_vehicle isKindOf "Tank") : {0 = createDialog "val_menu_3"; systemchat "TANK"};
    			case (_vehicle isKindOf "Motorcycle") : {0 = createDialog "val_menu_3"; systemchat "Motorcycle"};
    			case (_vehicle isKindOf "Ship") : {0 = createDialog "val_menu_3"; systemchat "Ship"};
    			case (_vehicle isKindOf "Helicopter") : {0 = createDialog "val_menu_3"; systemchat "Helicopter"};
    			case (_vehicle isKindOf "StaticWeapon") : {0 = createDialog "val_menu_3"; systemchat "Static Weapon"};
    			case (_vehicle isKindOf "Plane") : {0 = createDialog "val_menu_3"; systemchat "Plane"};
    			case (_vehicle isKindOf "Building") : {systemchat "Building"};
    			case (_vehicle isKindOf "Wreck") : {systemchat "Wreck"};
    			case (_vehicle isKindOf "ReammoBox_F") : {systemchat "A BOX"};
    			case (_vehicle isKindOf "MineGeneric") : {systemchat "A Mine"};
    			default {};
    		};
    	};
    	//hint "vMenu worked!";
    	}else{
    	//________________ Menu already open ________________
    	closeDialog 2;
    	#define IDC_CANCEL 2
    	closeDialog IDC_CANCEL;
    	}); 
    	_Show_RMenu_ctrl ctrlShow !_shown;
    	
    
    
    };

    This is an example, be extra careful if you copy paste 'cause I only very briefly looked and modified your func, might be missing a few }; and some, but you'll get the idea...

    • Thanks 1

  2. 2 hours ago, Hasselberg said:

    Hi

    I have made myself a officer uniform in arma3.

    The problem is that I cant get it to work, the only thing I manage to get to work is the top part of the skin.

    But the officers pants just loads as standard indep camo.

    How do I get this to work?

    And how do I make this as a config?

    Best regards

    Sander

    How do you even test this if you don't have a config file?

     


  3. 18 minutes ago, devildog664 said:

    Wow that was easy I was trying to add a scroll bar to a control group haha. 

    Very interesting I would of thought there was more to it then just many pictures. 
    Appreciate both answers for question 2. The more options the better so I’ll play around with these and see which one works best for my application. 

    when whatever you put is in a controls group be aware that coordinates 0.0 are the top left corner of the group and not the screen coordinates (as for other non grouped controls).
    as for acre you can check their github, this is the function that sets the image for the knob: https://github.com/IDI-Systems/acre2/blob/master/addons/sys_prc343/functions/fnc_render.sqf


  4. 23 minutes ago, devildog664 said:

    2. How would one make an animated GUI or moving parts to a GUI. Like ACRE does with their radio knobs that turn. 

     

    14 minutes ago, killzone_kid said:

    2. Provably uses ctrlSetAngle to rotate knobs   

    Nope, they actually made a bunch of pictures and animate them with a for "_i" loop and ctrlSetText
    I did it for my team logo like this
     

    params ["_ctrl"];
    while {ctrlShown _ctrl} do {
    for "_i" from 1 to 144 do {
    	_string = "\TGV_Assets\paa\Logopaa\TGV(" +str _i + ").paa";
    	_ctrl ctrlSetText _string;
    	uisleep 0.05;
    };
    };

    Takes a lot of pictures calculated in blender and converted to paa, long and tedious ^^


  5. /////
     _video = "scripts\videos\tripulacion_prescindible.ogv"; //if it's in your mission folder no \ at the begining of the path
    _screen = "Land_TripodScreen_01_large_F" createVehicle (player modelToWorld [0, 10, 0]);
    _screen setObjectTextureGlobal [0, _video];
    [_video, [10, 10]] remoteExec ["BIS_fnc_playVideo", 0, true];// don't remote exec this since each player will have their screen, your code will create MULTIPLE screens BTW (as many as there are players)
    
      

     

    • Like 1
×