Jump to content

HazJ

Member
  • Content Count

    2756
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by HazJ

  1. UI_GRID - Based on Pixel Grid class dlg_spawnSelectionUI { idd = 12345; movingEnable = 1; onLoad = "uiNamespace setVariable ['disp_spawnSelection', param [0]];"; onUnload = "uiNamespace setVariable ['disp_spawnSelection', nil];"; class controls { class title : RscTitle { idc = 100; x = 8 * UI_GRID_W + UI_GRID_X; y = 5 * UI_GRID_H + UI_GRID_Y; w = 24 * UI_GRID_W; h = 0.75 * UI_GRID_H; text = "Spawn Selection"; colorBackground[] = {"(profileNamespace getVariable ['GUI_BCG_RGB_R', 0.13])", "(profileNamespace getVariable ['GUI_BCG_RGB_G', 0.54])", "(profileNamespace getVariable ['GUI_BCG_RGB_B', 0.21])", 1}; }; class background : RscPicture { idc = 200; x = 8 * UI_GRID_W + UI_GRID_X; y = 5.85 * UI_GRID_H + UI_GRID_Y; w = 24 * UI_GRID_W; h = 14 * UI_GRID_H; text = "#(argb,8,8,3)color(0,0,0,0.8)"; }; class RscButton_1600 : RscButton { idc = 300; x = 8 * UI_GRID_W + UI_GRID_X; y = 19.95 * UI_GRID_H + UI_GRID_Y; w = 3 * UI_GRID_W; h = 0.75 * UI_GRID_H; text = "Button"; }; class RscButton_1601 : RscButton { idc = 400; x = 11.5 * UI_GRID_W + UI_GRID_X; y = 19.95 * UI_GRID_H + UI_GRID_Y; w = 3 * UI_GRID_W; h = 0.75 * UI_GRID_H; text = "Button"; }; class RscButton_1602 : RscButton { idc = 500; x = 15 * UI_GRID_W + UI_GRID_X; y = 19.95 * UI_GRID_H + UI_GRID_Y; w = 3 * UI_GRID_W; h = 0.75 * UI_GRID_H; text = "Button"; }; class RscButton_1603 : RscButton { idc = 600; x = 18.5 * UI_GRID_W + UI_GRID_X; y = 19.95 * UI_GRID_H + UI_GRID_Y; w = 3 * UI_GRID_W; h = 0.75 * UI_GRID_H; text = "Button"; }; class RscButton_1604 : RscButton { idc = 700; x = 22 * UI_GRID_W + UI_GRID_X; y = 19.95 * UI_GRID_H + UI_GRID_Y; w = 3 * UI_GRID_W; h = 0.75 * UI_GRID_H; text = "Button"; }; class RscButton_1605 : RscButton { idc = 800; x = 25.5 * UI_GRID_W + UI_GRID_X; y = 19.95 * UI_GRID_H + UI_GRID_Y; w = 3 * UI_GRID_W; h = 0.75 * UI_GRID_H; text = "Button"; }; class RscButton_1606 : RscButton { idc = 900; x = 29 * UI_GRID_W + UI_GRID_X; y = 19.95 * UI_GRID_H + UI_GRID_Y; w = 3 * UI_GRID_W; h = 0.75 * UI_GRID_H; text = "Button"; }; }; }; https://www.dropbox.com/s/pgfk0n14fiq98m4/GUI_defines_1.88.hpp?dl=0 Modified the one above. Changed: // Default text sizes #define GUI_TEXT_SIZE_SMALL (GUI_GRID_H * 0.8) #define GUI_TEXT_SIZE_MEDIUM (GUI_GRID_H * 1) #define GUI_TEXT_SIZE_LARGE (GUI_GRID_H * 1.2) // Pixel grid #define pixelScale 0.50 #define GRID_W (pixelW * pixelGrid * pixelScale) #define GRID_H (pixelH * pixelGrid * pixelScale) To: // Pixel grid #define pixelScale 0.50 #define GRID_W (pixelW * pixelGrid * pixelScale) #define GRID_H (pixelH * pixelGrid * pixelScale) #define UI_GRID_X (safezoneX) #define UI_GRID_Y (safezoneY) #define UI_GRID_W (5 * 0.5 * pixelW * pixelGrid) #define UI_GRID_H (5 * 0.5 * pixelH * pixelGrid) #define UI_GRID_WAbs (safezoneW) #define UI_GRID_HAbs (safeZoneH) 1920x1080 Small Hope this helps.
  2. HazJ

    [WIP] French Army Mod : ArmaModFrance

    Très bon travail ! Wow. It looks amazing. Can we expect to see an early preview in the near future (3 months)? 😀
  3. Like that but not as small and also in the center. For some reason it has scaled down and moved far left. Not on my PC atm but will show you later a screenshot in UI editor preview. EDIT: @7erra
  4. Depending on what you are trying to achieve, you might be able to use another method using rope commands. Slingload.
  5. Second one requires first one, as you say, it gets the positions. Second one, have to sort through it. Should kill some time. 🤣 If you don't have much time, use the ACE one. If you have lots of time and are bored, sort these two into one.
  6. @7erra Very nice tools. Especially the UI Editor fix for pixel grid. I prefer a visual representation when creating UIs in A3. I'm doing something wrong though... Any ideas? Thanks for sharing.
  7. And also: https://github.com/auQuiksilver/Apex-Framework/blob/d87596bee6a9ee2d96beba3b23cdce0cc3c7d1cd/Apex_framework.terrain/code/config/QS_data_speedLimitAreas.sqf https://github.com/auQuiksilver/Apex-Framework/blob/9363205c0484b6ba1fdb01661411d8d440457fbb/Apex_framework.terrain/code/functions/fn_clientCore.sqf
  8. Then your thread title is misleading. Besides, I answered your question anyway. Good? Depends on how you use it, I guess. If used correctly, you can make some great stuff with it. But this is all pretty obvious so not sure what you was asking? Anything specific?
  9. Yes, profileNamespace can do that. These will get you started. Search around a bit more too. https://community.bistudio.com/wiki/profileNamespace https://community.bistudio.com/wiki/saveProfileNamespace
  10. @Grumpy Old Man I thought append was the same as _arr1 + _arr2 hehe. Just faster?
  11. Hmm. Good point. I guess it depends on respawn time? Could always play it just before killing them or just use another method like playSound or something.
  12. @HallyG - Suggestion: The first post is pretty much unreadable using dark theme unless I highlight everything. Not sure how many others use the dark theme but maybe use a different text colour?
  13. I would use say3D command so nearby units in very close proximity will hear it. https://community.bistudio.com/wiki/say3D See examples there.
  14. To be honest, I did just skim through. It is late here so pretty tired. Besides, it doesn't matter if you can't do that in the Arsenal. What is exactly 'edit mode'? I assume you mean the editor? I am aware you can't add stuff in the backpack via Arsenal. You can use the init field to accomplish this. There is no need to use a Calculator when you can check if it fits using canAddItemToBackpack command. As for the AI hiding the weapon. I assume the AI has the weapon in backpack to start with? Then if I've understood correctly you want to make them get it out when not in SAFE behaviour mode? Yes? Sadly there is no EH for behaviour mode change so you'll have to use some loop for that. You can probably use one of the Anim EHs and put the code in there. if !(behaviour _unit isEqualTo "SAFE") then { // code... }; You'll want to cycle through backpack items and check out which are actual weapons. Then remove the weapon, add it in the AI's hand. You can repeat the process but invert it to accomplish it again but for SAFE behaviour mode. https://community.bistudio.com/wiki/hasWeapon https://community.bistudio.com/wiki/backpackItems https://community.bistudio.com/wiki/BIS_fnc_itemType I suggest AnimChanged since AI will change stance or will be moving so the code will continue to check and if true, run.
  15. Use params as I suggested. Change: _pos = _this select 0; _radius = _this select 1; _radius2 = _this select 2; params ["_pos", "_radius", "_radius2"]; Or: // You can set default values like so: params [ ["_pos", [0, 0, 0]], ["_radius", 100], ["_radius2", 200] ]; Might just be easier to use a forEach in first place rather than create the array then iterate through and hideObject, etc...
  16. https://community.bistudio.com/wiki/addItemToBackpack
  17. You'll need nearestTerrainObjects to get certain map objects. You can also use forEach loop.
  18. Arsenal can show everything? [ "Open", [ true ] ] call BIS_fnc_arsenal; // Opens Arsenal with all items https://community.bistudio.com/wiki/BIS_fnc_arsenal
  19. @gc8 Why are you using EachFrame? Not a trick at all. That will run x times per frame. while loop will run every second per frame. Not ideal at all, especially with a while loop inside. @Lemonwired No need to run while loop and set _i so just use for loop: for "_i" from 0 to (count _roadList) do { _arr = nearestObjects [getPos (_roadList select _i), [], _radius2] append nearestTerrainObjects [getPos (_roadList select _i), [], _radius2]; _notobjects pushBack_arr; }; Not tested but you get the idea. https://community.bistudio.com/wiki/for https://community.bistudio.com/wiki/append https://community.bistudio.com/wiki/pushBack I also recommend using params command. https://community.bistudio.com/wiki/params params ["_pos", "_radius", "_radius2"]; // You can set default values like so: params [ ["_pos", [0, 0, 0]], ["_radius", 100], ["_radius2", 200] ]; Not all roads can be hidden. I don't see any of your script being a reliable solution. If you are using a pre-defined path for AI vehicles then there are other ways to make AI follow road. https://community.bistudio.com/wiki/forceFollowRoad https://community.bistudio.com/wiki/setDriveOnPath
  20. HazJ

    score vs rating

    https://community.bistudio.com/wiki/ArmA:_Rating_Values Oops, didn't notice that Tankbuster already provided the link. Further more: I personally always override rating with HandleRating EH. {} https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#HandleRating
  21. HazJ

    ListBox Help

    No problem. You're welcome. Obviously go over the code to improve and understand things. If there is anything you don't understand, just ask.
  22. HazJ

    ListBox Help

    Inside. _lb ctrlAddEventHandler ["LBSelChanged", { params ["_control", "_selectedIndex"]; private _display = findDisplay 2001; _text = _display displayCtrl 5546; switch (_control lbText _selectedIndex) do { case "Spawn A Vehicle" : { _text ctrlSetStructuredText parseText "Some vehicle..."; }; case "Gun on Back" : { _text ctrlSetStructuredText parseText "..."; }; default { // default... _text ctrlSetStructuredText parseText "Test"; }; }; }];
  23. HazJ

    ListBox Help

    A few ways. First that springs to mind is a switch block. switch (_control lbText _selectedIndex) do { case "Spawn A Vehicle" : { _text ctrlSetStructuredText parseText "Some vehicle..."; }; case "Gun on Back" : { _text ctrlSetStructuredText parseText "..."; }; default { // default... _text ctrlSetStructuredText parseText "Test"; }; }; https://community.bistudio.com/wiki/switch_do
  24. HazJ

    Stuck at ARMA 3 Apex logo screen

    Every time? I wouldn't call that solved.
  25. HazJ

    ListBox Help

    Here you go. Download example. https://www.dropbox.com/s/yj9pm2bh12jbhcs/Example.VR.zip?dl=0 init.sqf: // USE CfgFunctions // https://community.bistudio.com/wiki/Arma_3_CfgFunctions disableSerialization; sg_fnc_openHelp = { disableSerialization; private _display = findDisplay 2001; private _lb = _display displayCtrl 5545; [] spawn sg_fnc_helpInfo; lbClear _lb; { _lb lbAdd _x; } forEach [ "Spawn A Vehicle", "Gun On Back", "Jumping", "Earplugs" ]; _lb ctrlAddEventHandler ["LBSelChanged", { params ["_control", "_selectedIndex"]; private _display = findDisplay 2001; _text = _display displayCtrl 5546; _text ctrlSetStructuredText parseText format ["%1", _control lbText _selectedIndex]; }]; }; sg_fnc_helpInfo = { disableSerialization; private _display = findDisplay 2001; _text = _display displayCtrl 5546; _text ctrlSetStructuredText parseText "Default"; }; waitUntil {!isNull findDisplay 46}; createDialog "test"; hintSilent "Click on an item from the listbox."; description.ext: #include "defines.hpp" #include "test.hpp" test.hpp: class test { idd = 2001; movingEnable = 1; onLoad = "[] spawn sg_fnc_openHelp;"; onUnload = ""; class controls { class sg_list_1 : RscListbox { idc = 5545; x = safeZoneX + safeZoneW * 0.343125; y = safeZoneY + safeZoneH * 0.37555556; w = safeZoneW * 0.10375; h = safeZoneH * 0.24; sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1); rowHeight = 0; font = "PuristaMedium"; colorText[] = {1, 1, 1, 0.381}; colorSelect[] = {1, 1, 1, 1}; colorBackground[] = {0.302, 0.302, 0.302, 0.4683}; colorDisabled[] = {0.302, 0.302, 0.302, 0.4841}; }; class sg_helpInfoText_1 : RscStructuredText { idc = 5546; x = safeZoneX + safeZoneW * 0.4675; y = safeZoneY + safeZoneH * 0.38666667; w = safeZoneW * 0.126875; h = safeZoneH * 0.04; text = "Initial"; }; }; }; defines.hpp: https://www.dropbox.com/s/pgfk0n14fiq98m4/GUI_defines_1.88.hpp?dl=1 https://community.bistudio.com/wiki/Arma_3_CfgFunctions I recommend moving structure. Currently threw everything in init.sqf for quick example/testing. How I do it personally is for each UI, I have one function that has everything relevant. All code, UI EHs, etc...
×