Jump to content

HazJ

Member
  • Content Count

    2570
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by HazJ

  1. Here you go: https://hazjohnson.com/ArmA/slider.VR.zip Please learn from it. bfMenu1Begin.sqf: sliderSetRange [100, 5, 121]; sliderSetSpeed [100, 1, 10]; sliderSetPosition [100, gameTime]; _text = if !(gameTime isEqualTo 121) then {format ["Time remaining: %1 minutes", gameTime]} else {"Time remaining: Unlimited"}; ctrlSetText [200, _text]; ((uiNamespace getVariable "sliderExample") displayCtrl 100) ctrlAddEventHandler ["SliderPosChanged", { params ["_control", "_newValue"]; gameTime = round _newValue; hintSilent str _this; _text = if !(gameTime isEqualTo 121) then {format ["Time remaining: %1 minutes", gameTime]} else {"Time remaining: Unlimited"}; ctrlSetText [200, _text]; }]; (uiNamespace getVariable "sliderExample") displayAddEventHandler ["Unload", { params ["_display", "_exitCode"]; publicVariable "gameTime"; // only update across network upon closing }]; Used your control values from above. Changed IDCs for my sake. Used latest GUI defines 1.88 (thanks to Larrow). Preview example mission.
  2. Huh??? What is 5? Nothing. Unless I am missing something? Did you try without?
  3. I personally would use Stacked EachFrame EH for different things. Not split one up. https://community.bistudio.com/wiki/BIS_fnc_addStackedEventHandler
  4. HazJ

    inidbi with remoteExec?

    Why remoteExec in the first place? The DB should only be on server. Take a look at the documentation for inidbi as well. Will teach you quite a lot. There is also inidbi2 which is newer. I would create function on server to handle DB requests. Pass whatever arguments are needed, etc...
  5. HazJ

    Stuck at ARMA 3 Apex logo screen

    Share your client RPT, upload to PasteBin and share URL. C:\Users\Username\AppData\Local\Arma 3 Also, is this without mods? Any specific parameters set on startup? Have you tried repairing the game as well?
  6. @johnnyboy - Two options come to mind. https://community.bistudio.com/wiki/ppEffectCreate Or if you want it to be an actual thing rather than an effect that occurs to nearby players then maybe look into particle effects. https://community.bistudio.com/wiki/Arma_3_Particle_Effects
  7. onSliderPosChanged You pass 5 as an argument. _select 0 - _control _select 1 - _newValue Your control IDC is 1904, it wants the control, not IDC. You are overwriting it with 5. Remove it. onSliderPosChanged = "0 = [] execVM 'settings\bfMenu1.sqf';";
  8. Remove mods ??? Just hope you didn't binarize the .sqm file else you are stuck. I guess you could find some tool to reverse it. If it isn't then open and search for addOns then remove all mods. KP has new version of Liberation so probably best to update and re-edit anyway.
  9. https://community.bistudio.com/wiki/ctrlDelete 31357 is the IDC. I recommend not using display #46. It was just a quick example/test in debug.
  10. Me and @Tankbuster needed a similar solution. screenToWorld always gives 0 for surface. Made a little hacky work around. I know this isn't exactly what you are after but thought I'd share anyway. I'm sure Tank will share his input on what we use it for. Debug: [] spawn { _ctrl = findDisplay 46 ctrlCreate ["RscPicture", 31357]; _ctrl ctrlSetPosition [0.48, 0.4799, 0.04, 0.04]; _ctrl ctrlSetText "\A3\ui_f\data\map\markers\military\destroy_CA.paa"; _ctrl ctrlSetTextColor [1, 0, 0, 1]; _ctrl ctrlCommit 0; }; Probably a better way to do this but couldn't figure it out with drawIcon3D. https://i.imgur.com/st8WiDn.jpg https://i.imgur.com/9MgscfK.jpg
  11. HazJ

    remoteExec ctrlSetText

    You can't do that. At least last time I checked. You have to put it in a function else it doesn't work, it also spams RPT with errors. https://forums.bohemia.net/forums/topic/210759-remoteexec-a-display/
  12. I am on phone so can't help much but you can use params here too. Something like: _arr = [10, ["Something", 100, TRUE], "LALALA"]; _var = _arr params ["_level", "_nestedArr", "_message"]; This saves you keep using select over and over. It is cleaner as you can use whatever _varName you want. Etc.
  13. I would say it depends. What is the variable for? If you are passing it to the function then use params as they also privates variables.
  14. KK added possible solution on Wiki somewhere. it remember coming across I recently. https://community.bistudio.com/wiki/ctrlSetStructuredText
  15. Hi. I have become a little stuck and need someone to point me in the right direction. How do I get the control height to automatically adjust string length. I am thinking ctrlTextHeight command but not sure what to do with it. It sounds simple, get the ctrlTextWidth but I still need to apply the default h value? Surely it will just return that instead of string length? I can use count to get the string length but example output from one is like 1051. I am using ControlsGroup container. Any ideas? { _message = _display ctrlCreate ["RscText", (100 + _forEachIndex), _logsContainer]; _message ctrlSetText _x; _message ctrlSetPosition [ 0, (0.04 * _forEachIndex), ???, ??? ]; _message ctrlCommit 0; } forEach messagesArr; UPDATE: Attempt 2. Getting warmer or colder? Hmm. 😀 { _message = _display ctrlCreate ["RscText", (100 + _forEachIndex), _logsContainer]; _message ctrlSetText _x; _message ctrlSetPosition [ 0, (0.04 * _forEachIndex), 1, 10 ]; _height = ctrlTextHeight _message; _message ctrlSetPosition [ 0, (0.04 * _forEachIndex), 1, _height ]; _message ctrlCommit 0; } forEach messagesArr;
  16. Bump. Still stuck. Any ideas? Maybe @Larrow 😃
  17. HazJ

    action on dialogs

    Sorry for long reply. Yeah, Larrow said lol.
  18. HazJ

    action on dialogs

    Are you serious? Come on dude, don't expect everything done for you. You can mess with it, it isn't gonna destroy your computer, not SQF at least, as far as I am aware. 😅 What did you try exactly? Show us. https://community.bistudio.com/wiki/hintSilent
  19. HazJ

    action on dialogs

    You mean more magazines? action = "player addMagazines [""30Rnd_65x39_caseless_mag"", 10];"; ? I personally use UI EHs, in this case, ButtonClick. https://community.bistudio.com/wiki/User_Interface_Event_Handlers
  20. I'd like to put my name down as one of the convoy drivers. 😅 But joke aside. Good luck. It is a lot of hassle especially when creating dynamic convoys. Might help. https://forums.bohemia.net/forums/topic/216226-ai-convoy-best-practices/
  21. Taken from Authority project. Adjust this to your needs. It uses author atm but you can modify it to check for prefix if needed. _OnlyA3VanillaWeapons = TRUE; private _configClasses = if (!_OnlyA3VanillaWeapons) then {"(getNumber (_x >> 'scope') >= 2)" configClasses (configFile >> "CfgWeapons")} else {"(getNumber (_x >> 'scope') >= 2) && getText ( _x >> 'author' ) == 'Bohemia Interactive'" configClasses (configFile >> "CfgWeapons")}; private _weapons = []; private _blacklistedWeapons = ["LMG_Zafir_F"]; { if !(configName _x in _blacklistedWeapons) then { _weapons pushBack (configName _x); }; } forEach _configClasses; hintSilent str _weapons; [ ammobox, _weapons, FALSE, TRUE ] call BIS_fnc_addVirtualWeaponCargo;
  22. See note by comment @killzone_kid on Wiki. https://community.bistudio.com/wiki/switchCamera
  23. Review your image size. Also, I meant colorText not colorBackground, my bad. class test { idd = 12345; movingEnable = 1; class controlsBackground { class image : RscPicture { idc = 1200; x = 0.257213 * safezoneW + safezoneX; y = 0.205949 * safezoneH + safezoneY; w = 0.492135 * safezoneW; h = 0.560097 * safezoneH; text = "image.paa"; colorText[] = {1, 1, 1, 0.25}; }; }; }; Works. 0.25 opacity. Tweak that to say 1 and you see it fully. I think what you was asking about was the fact that your image wasn't fully visible to begin with, this being due to your image size. https://community.bistudio.com/wiki/PAA_File_Format Use this and you'll see. https://hazjohnson.com/ArmA/image.paa 512x256
  24. Uhm. Does for me ? What image you using? class image : RscPicture { idc = 1200; x = 0.257213 * safezoneW + safezoneX; y = 0.205949 * safezoneH + safezoneY; w = 0.492135 * safezoneW; h = 0.560097 * safezoneH; text = "hud.paa"; colorBackground[] = {1, 1, 1, 0.25}; }; Does this do nothing?
  25. class image : RscPicture { idc = 100; /* x y w h values, etc */ colorText[] = {1, 1, 1, 0.5}; // 1 = fully visible and 0 = fully transparent };
×