Mr H.
Member-
Content Count
597 -
Joined
-
Last visited
-
Medals
Everything posted by Mr H.
-
Why do you set the texture twice every time? also this can be simplified: //in initplayerLocal.sqf TAG_fnc_playerData ={ params ["_player"]; private _UIDsTexts = [ ["SOMEPLAYERUID","PATHTOCORRESPONDINGTEXT"], ["SOMEOTHERPLAYERUID","SOMEOTHERPATHTOTEXT"] //etc ]; private _return = []; { if (getPlayerUID _player == (_x select 0)) then {_return =_x}; }forEach _UIDsTexts; _return }; TAG_fnc_setNameTag = { params ["_player"]; private _data = [_player] call TAG_fnc_playerData; if (_data isEqualTo []) exitWith {diag_log format ["Player %1 not listed",name _player],false}; if ((uniform _player) in ["rhs_uniform_acu_ucp","rhs_uniform_acu_oefcp"]) then { _player setObjectTextureGlobal [3,(_data select 1)]; }; true }; //------ [player] call TAG_fnc_setNameTag; ["ace_arsenal_displayClosed", { [player] call TAG_fnc_setNameTag; }] call CBA_fnc_addEventHandler;
-
honestly this was quickly put together, since you are using ace and therefore cba there are more elegant/optimized ways to do this
-
50% chance of activating fnc
Mr H. replied to Robustcolor's topic in ARMA 3 - MISSION EDITING & SCRIPTING
private _seed = [1,101] call BIS_fnc_randomInt; if (_seed >50) exitWith {false}; // rest of your code here -
while {true} do { player setVariable ["acex_field_rations_hunger",0,true]; player setVariable ["acex_field_rations_thirst",0,true]; sleep 60 };
-
Sleep not working after JIP
Mr H. replied to seba1976's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
Applying textures to vehicles in editor
Mr H. replied to TroyT's topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
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 -
Opening and Closing Dialogs with CBA (addKeyHandler)
Mr H. replied to LSValmont's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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...- 4 replies
-
- 1
-
- displayctrl
- displayaddeventhandler
-
(and 3 more)
Tagged with:
-
Opening and Closing Dialogs with CBA (addKeyHandler)
Mr H. replied to LSValmont's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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.- 4 replies
-
- 1
-
- displayctrl
- displayaddeventhandler
-
(and 3 more)
Tagged with:
-
Opening and Closing Dialogs with CBA (addKeyHandler)
Mr H. replied to LSValmont's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Cba has keybinds built in use their own function. https://cbateam.github.io/CBA_A3/docs/files/keybinding/fnc_addKeybind-sqf.html- 4 replies
-
- 1
-
- displayctrl
- displayaddeventhandler
-
(and 3 more)
Tagged with:
-
Applying textures to vehicles in editor
Mr H. replied to TroyT's topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
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 -
How do I get a texture to work - Officer uniform?
Mr H. replied to Hasselberg's topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
Not directly but someone recently published an addon that allowed it. https://steamcommunity.com/sharedfiles/filedetails/?id=1771335720 -
How do I get a texture to work - Officer uniform?
Mr H. replied to Hasselberg's topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
Nope you've got to upload them to an external site and link here. -
How do I get a texture to work - Officer uniform?
Mr H. replied to Hasselberg's topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
How do you even test this if you don't have a config file? -
Two complex GUI questions.
Mr H. replied to devildog664's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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 -
Two complex GUI questions.
Mr H. replied to devildog664's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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? -
Two complex GUI questions.
Mr H. replied to devildog664's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Works only with 3d controls which this isn't -
Two complex GUI questions.
Mr H. replied to devildog664's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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 -
Two complex GUI questions.
Mr H. replied to devildog664's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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 ^^ -
Play video for all players on the server
Mr H. replied to nomad924's topic in ARMA 3 - MISSION EDITING & SCRIPTING
///// _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) -
EMP Grenade To Kill De-mining Drones
Mr H. replied to Antman2o1o's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Also from toying with ER grenades I can tell you this: the strobe is deleted when created when it's daytime. Try at night! -
EMP Grenade To Kill De-mining Drones
Mr H. replied to Antman2o1o's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
EMP Grenade To Kill De-mining Drones
Mr H. replied to Antman2o1o's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Use B_IRStrobe instead