-
Content Count
2756 -
Joined
-
Last visited
-
Medals
-
Medals
Everything posted by HazJ
-
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.
-
[WIP] French Army Mod : ArmaModFrance
HazJ replied to real ArmaModFrance's topic in ARMA 3 - ADDONS & MODS: COMPLETE
Très bon travail ! Wow. It looks amazing. Can we expect to see an early preview in the near future (3 months)? 😀- 244 replies
-
- 1
-
- frencharmy
- armamodfrance
-
(and 1 more)
Tagged with:
-
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
-
Enable collision for attached objects?
HazJ replied to MechSlayer's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Depending on what you are trying to achieve, you might be able to use another method using rope commands. Slingload. -
Limit player driven vehicle speed
HazJ replied to jonipetteri's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
@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.
-
Limit player driven vehicle speed
HazJ replied to jonipetteri's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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 -
profileNamespace good for saving persistent mission data?
HazJ replied to syrasia's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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? -
profileNamespace good for saving persistent mission data?
HazJ replied to syrasia's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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 -
scripts Clear Roads Script - Optimization Required
HazJ replied to Lemonwired's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@Grumpy Old Man I thought append was the same as _arr1 + _arr2 hehe. Just faster? -
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.
-
@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?
-
I would use say3D command so nearby units in very close proximity will hear it. https://community.bistudio.com/wiki/say3D See examples there.
-
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.
-
scripts Clear Roads Script - Optimization Required
HazJ replied to Lemonwired's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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... -
https://community.bistudio.com/wiki/addItemToBackpack
-
scripts Clear Roads Script - Optimization Required
HazJ replied to Lemonwired's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You'll need nearestTerrainObjects to get certain map objects. You can also use forEach loop. -
Arsenal can show everything? [ "Open", [ true ] ] call BIS_fnc_arsenal; // Opens Arsenal with all items https://community.bistudio.com/wiki/BIS_fnc_arsenal
-
scripts Clear Roads Script - Optimization Required
HazJ replied to Lemonwired's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@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 -
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
-
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.
-
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"; }; }; }];
-
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
-
Every time? I wouldn't call that solved.
-
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...