Jump to content

Mr H.

Member
  • Content Count

    597
  • Joined

  • Last visited

  • Medals

Everything posted by Mr H.

  1. Mr H.

    Acex vs Zeus

    honestly this was quickly put together, since you are using ace and therefore cba there are more elegant/optimized ways to do this
  2. private _seed = [1,101] call BIS_fnc_randomInt; if (_seed >50) exitWith {false}; // rest of your code here
  3. Mr H.

    Acex vs Zeus

    while {true} do { player setVariable ["acex_field_rations_hunger",0,true]; player setVariable ["acex_field_rations_thirst",0,true]; sleep 60 };
  4. Your code seems okay to me but I'm on my phone and can test. However since you are using cba you should maybe take advantage of thathttps://cbateam.github.io/CBA_A3/docs/files/common/fnc_waitAndExecute-sqf.html that allows you to add delay in unscheduled environment. Might even fix your issue.
  5. You answered your own question ((get3DENSelected 'object') # 0) setObjectTexture "texturePath"; is not correct ((get3DENSelected "object") # 0) setObjectTexture [0,"texturePath"]; should work for selected vehicle in 3Den
  6. 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...
  7. Also they have their waitUntilAndExecute function to keep everything sweetly in unscheduled environment. If you just need display 46 and are doing this from a mod and might need this in many scripts I suggest you create a XEHpostinit called after init and call everything from this. Browse the ace 3 github to have an example.
  8. Cba has keybinds built in use their own function. https://cbateam.github.io/CBA_A3/docs/files/keybinding/fnc_addKeybind-sqf.html
  9. https://community.bistudio.com/wiki/setObjectTexture will do what you ask but only if the vehicle has hidden selection textures check with https://community.bistudio.com/wiki/getObjectTextures
  10. you might be able to affect colors by tweaking the rvmat, https://community.bistudio.com/wiki/ArmA:_RVMAT
  11. Not directly but someone recently published an addon that allowed it. https://steamcommunity.com/sharedfiles/filedetails/?id=1771335720
  12. Nope you've got to upload them to an external site and link here.
  13. How do you even test this if you don't have a config file?
  14. https://community.bistudio.com/wiki/setObjectMaterial
  15. I believe it's usually done through the rvmat and not the textures.
  16. Mr H.

    Two complex GUI questions.

    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
  17. Mr H.

    Two complex GUI questions.

    Not my point : he asked how acre did it, this is how. Also a 3d control wouldn't have allowed for the other stuff they do in the gui for the radio. I've never made a 3D control so I'm not sure but I think you can't make them clickable and display custom text correct?
  18. Mr H.

    Two complex GUI questions.

    Works only with 3d controls which this isn't
  19. Mr H.

    Two complex GUI questions.

    Yes but this is not the same, the control is animated with different pictures the knob rotates as it would in a 3d model have a look here at 7'29
  20. Mr H.

    Two complex GUI questions.

    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 ^^
  21. ///// _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)
  22. Also from toying with ER grenades I can tell you this: the strobe is deleted when created when it's daytime. Try at night!
  23. If I were you I would test bit by bit. For example : does the eh fire? Add a systemChat in there to check. Are the drones defected etc. Also check localities for the commands you use.
  24. Also rather than setDamage maybe you should set fuel to 0. The drones will crash or fall down rather than explode.
×