Jump to content

7erra

Member
  • Content Count

    753
  • Joined

  • Last visited

  • Medals

Everything posted by 7erra

  1. 7erra

    Pickpocket

    When you are opening the inventory with the addAction you will see the inventory of the unit. When you now take something out of the units inventory the container will depend on where you got the item from. If it was directly on the unit it will return the unit (object). If it was taken from the uniform it will return the uniform (object, but not typeOf "Man"). Same goes for the backpack and vest.
  2. 7erra

    Pickpocket

    If you want to check if the item is equipped you can use the second param of the "Take" EH. If the container is a unit it will is assigned: // action to open unit's inventory _this addAction ["Pickpocket",{ params ["_target","_caller","_id","_args"]; _caller action ["Gear",_target]; }]; // take eh player addEventHandler ["Take",{ params ["_unit", "_container", "_item"]; if (_container isKindOf "Man") then { systemChat "noticed"; } }]; Well I tried to find a solution over the last half an hour so I'm posting this anyway
  3. 7erra

    Pickpocket

    How about saving the loadout with getUnitLoadout when pickpocketing starts and when canceling the take restore it with setUnitLoadout?
  4. getPlayerUID unit tbh your description is missing something. Something important. The information about your problem.
  5. Yeah. I've done nothing of that. Here is a new version: v1.5 - "Structured Text Editor" update I added 3 new Dialogs for easier structured text creation, color picking and font selection. I also created a GitHub repo so feel free to take a look. Leave a comment at the >>> Steam Workshop <<< if you find anything fishy since I restructured my folders. Until next time! 7erra
  6. You can connect the static AA turrets to the NATO UAV terminal. I'm not quite sure what your problem is?
  7. 7erra

    Storing Zeus Editing Areas

    That is because _HQ isn't defined in the eventhandler. Change this myCurator removeCuratorEditingArea (_HQ getVariable "_EA"); to this myCurator removeCuratorEditingArea (_unit getVariable "_EA");
  8. Option 1: Use the standard setting: Options >> Game >> Difficulty >> Misc >> Multiple saves Option 2: Disable the save button: while {true} do { waitUntil {uisleep 0.1; !isNull (findDisplay 49)}; ((findDisplay 49) displayCtrl 103) ctrlEnable false; waitUntil {uisleep 0.1; isNull (findDisplay 49)}; };
  9. Well here is a very basic option: _3DMEH = addMissionEventHandler ["Draw3D",{ _unitArray = [testMan]; { _curObject = _x; { _curSelectionName = _x; _posIcon = _curObject modelToWorld (_curObject selectionPosition _curSelectionName); if !((_curObject selectionPosition _curSelectionName) isEqualTo [0,0,0]) then { drawIcon3D ["\A3\ui_f\data\map\markers\military\box_CA.paa",[1,0,0,1],_posIcon,0.5,0.5,0,""]; }; } forEach (selectionNames _x); } forEach _unitArray; }]; It simply marks each selection point of the unit with a red square. Even though it uses the MEH it still lags out but as I already said it is a very basic function. The next step could be to draw lines between the selction points.
  10. Do the following: Name your carrier MyCarrier Execute the following script Change the following lines to your needs: _animationState = 10; // 0 means folded, 10 means nearly 90° to the deck *partFromAbove* // change this to either _frontLeft, _frontRight, _backLeft, _backRight _frontLeft = ["Land_Carrier_01_hull_04_1_F","Catapult1"]; _frontRight = ["Land_Carrier_01_hull_04_2_F","Catapult1"]; _backLeft = ["Land_Carrier_01_hull_07_1_F","Catapult4"]; _backRight = ["Land_Carrier_01_hull_07_1_F","Catapult3"]; _animationState = 10; *partFromAbove* params ["_partClass","_catapult"]; params ["_carrier"]; _carrierPart = (MyCarrier nearObjects [_partClass,200]) select 0; [ _carrierPart, getArray (configfile >> "CfgVehicles" >> typeOf _carrierPart >> "Catapults" >> _catapult >> "animations"), _animationState ] spawn BIS_fnc_Carrier01AnimateDeflectors;
  11. 7erra

    Creating a Karts race

    After some more testing I found out that you have to set the side in the init.sqf. If your racers are all civillian then leave it as is: // line 55 {_x setVariable ["RscAttributeOwners", [CIVILIAN]]} forEach _raceModules; Another thing I noticed is that the next CP will be the one closest to the completed one. Therefore a race with sharp corners isn't possible unless you place the modules far enough away from each other. The race will furthermore start without any countdown whatsoever.
  12. 7erra

    Creating a Karts race

    The best option atm is to learn from BI itself. I have uploaded the mission to Google Drive so you can take a look at the official MP race on Stratis: https://drive.google.com/open?id=18CZIHWzrX4wfiEUfcdzs80Iyd71Mb4rh The whole system isn't really well built. Here is what you need to do: Copy the init.sqf to your mission folder Create a Virtual Zeus (Civillian) and name it BIS_zeus Create a Game Master module and call it BIS_zeusModule Give your Finish module the variable name BIS_finish Add an End1 class to your CfgDebriefing in the descritption.ext (take a look at the example mission) If you have a bit understanding of the sqf language you can of course remove any unnecessary parts from the init.sqf like the zeus but this mission is just an example.
  13. And yet another update... v1.4 - "mikero" update While this is a technical update for the most part it also brings a new feature with it which will enhance your experience with the GUI Editor quite a bit. I was finally able to binarise the config.cpp with mikero's tools and reduce the size a bit. This means faster loading times for you, a tidier mod folder, and easier editing for me. A win-win-win situation I suppose ;) Check out the changes at the >>> Steam Workshop <<<! Hope you like it, 7erra
  14. Alright, with the help of @mikero I was able to solve the problem. When using __EVAL and __EXEC macros you can't rely on most engine commands. There are a few (mostly mathematical) ones that work though. A list of those can be found in the documentation for mikero's tools. With this in mind I changed my script accordingly: #define ADD_Y(VAL) __EXEC(_curY = _curY +0.1 +VAL) #define CUR_Y __EVAL(_curY) * GUI_GRID_H // moved GUI_GRID_H outside of the __EVAL brackets #define ADD_HEIGHT(HEIGHT) HEIGHT * GUI_GRID_H; ADD_Y(HEIGHT) The __EVAL statement now only gets the current value of _curY instead of evalating GUI_GRID_H as well which isn't defined at game start. With this setup and everything else staying the same I now have a working __EVAL/__EXEC macro. Thanks everyone for your time and props to mikero who seems to know everything
  15. Hi everyone, I've got the following problem: I'm trying to use a macro to define the position of a control. It looks like this: __EXEC(_curY = 0) #define ADD_Y(VAL) __EXEC(_curY = _curY +0.1 +VAL) #define CUR_Y __EVAL(_curY * GUI_GRID_H) #define ADD_HEIGHT(HEIGHT) HEIGHT * GUI_GRID_H; ADD_Y(HEIGHT) And then I'm using it like this (ui controls, part of a controlsgroup): class controlClassName: RscSomething { idc = 1000; x = 0; y = CUR_Y; w = GUI_GRID_W; h = ADD_HEIGHT(1); }; class grp_watchFields: RscControlsGroupNoScrollBars { idc = 7410; x = 0; y = CUR_Y; w = W_BORDER; h = ADD_HEIGHT(10); }; // and class seperator1: RscText { x = 0; y = CUR_Y; w = W_BORDER; h = pixelH; colorBackground[] = {1,1,1,1}; }; ADD_Y(0) class seperator2: seperator1 { y = CUR_Y; }; ADD_Y(0) While using it in a mission (description.ext) it works perfectly. Only when used as a mod it scrambles the order in the same way each time. I've checked the y values each time (mission and mod) and they were not equal for whatever reason, even though I copied the exact same content. Anyone got experience with that? Do these macros not work in the config as intented? I'd rather stick to them since it gives me the ability to rearrange the controls in any way I want in a fast and simple way but at the moment I'd be forced to go back and define each y value seperatly. Thanks, 7erra EDIT Solution below: https://forums.bohemia.net/forums/topic/217330-config-macros-excecution-order/?tab=comments#comment-3299580 Also changed the title of the topic in case someone is searching for it
  16. The IDC is 6217 I have removed all unimportant information from the Inventory config so you only have the idcs for the slots: class RscDisplayInventory { class controls { class SlotPrimary: GroundTab { idc=610; }; class SlotPrimaryMuzzle: SlotPrimary { idc=620; }; class SlotPrimaryUnderBarrel: SlotPrimary { idc=641; }; class SlotPrimaryFlashlight: SlotPrimary { idc=622; }; class SlotPrimaryOptics: SlotPrimary { idc=621; }; class SlotPrimaryMagazineGL: SlotPrimary { idc=644; }; class SlotPrimaryMagazine: SlotPrimary { idc=623; }; class SlotSecondary: SlotPrimary { }; class SlotSecondaryMuzzle: SlotPrimary { idc=624; }; class SlotSecondaryUnderBarrel: SlotPrimary { idc=642; }; class SlotSecondaryFlashlight: SlotPrimary { idc=626; }; class SlotSecondaryOptics: SlotPrimary { idc=625; }; class SlotSecondaryMagazine: SlotPrimary { idc=627; }; class SlotHandgun: SlotPrimary { idc=612; }; class SlotHandgunMuzzle: SlotPrimary { idc=628; }; class SlotHandgunUnderBarrel: SlotPrimary { idc=643; }; class SlotHandgunFlashlight: SlotPrimary { idc=630; }; class SlotHandgunOptics: SlotPrimary { idc=629; }; class SlotHandgunMagazine: SlotPrimary { idc=631; }; class SlotHeadgear: SlotPrimary { idc=6240; }; class SlotGoggles: SlotPrimary { idc=6216; }; class SlotHMD: SlotPrimary { idc=6217; }; class SlotBinoculars: SlotPrimary { idc=6238; }; class SlotMap: SlotPrimary { idc=6211; }; class SlotGPS: SlotPrimary { idc=6215; }; class SlotCompass: SlotPrimary { idc=6212; }; class SlotRadio: SlotPrimary { idc=6214; }; class SlotWatch: SlotPrimary { idc=6213; }; class UniformTab: GroundTab { idc=6332; }; class UniformSlot: SlotPrimary { idc=6331; }; class VestSlot: SlotPrimary { idc=6381; }; class BackpackSlot: SlotPrimary { idc=6191; }; }; };
  17. Hi everyone, first of all: I'm new to the addon aspect of Arma but experienced with sqf scripting. Here is my question: Is it possible to get a .jpg into a binarized .pbo? When using the Addon Builder from A3 Tools and selecting "Binarize" (for performance apparently) the .jpg files won't get copied. Selecting "Binarize all textures" doesn't make a difference. The pictures have to stay .jpg as I need the aspect ratios and .paa only allows for square ones. Everything is fine when not selecting "Binarize". Thanks, Terra EDIT Solution below: https://forums.bohemia.net/forums/topic/216831-solved-addon-builder-jpg-in-binarized-pbo/?tab=comments#comment-3299512
  18. Thank you very much! I added *.jpg under "Options>>List of files to copy directly". I also have been in contact with mikero and have to say that his tools are not as intuitive as addon builder but that's because of how many options you have. I will keep using both. Addon Builder for simple addons and mikero's tools for more complex projects.
  19. That's okay I started off with mashing commands together with auto complete and hoping they'd work :D. I have rewritten the code so you can copy and paste it into the init line of an editor-placed flag: _flag = this; _afterCommand = {}; _fncOwnFlag = { params ["_winSide"]; _flagPath = "\a3\data_f\flags\%1.paa"; _fileFlag = switch _winSide do { case west: {"flag_nato_co"}; case east: {"flag_csat_co"}; case independent: {"flag_aaf_co"}; default {"flag_white_co"} }; format [_flagPath,_fileFlag]; }; _actionParams = ["_flag", "_caller", "_actionId", "_arguments"]; _flag setflagAnimationPhase 1; _flag setFlagTexture (civilian call _fncOwnFlag); _flag setVariable ["TER_flagSide",civilian]; _icon = "\a3\ui_f\data\igui\cfg\holdactions\holdaction_takeoff2_ca.paa"; _duration = 10; _addID = [_flag, "Capture Flag", _icon, _icon, "_target getVariable [""TER_flagSide"",civilian] != side _this", "true", { }, { params ["_flag", "_caller", "_actionId", "_arguments","_progress","_maxProgress"]; _arguments params ["_actionParams","_fncOwnFlag","_afterCommand"]; _relProgress = _progress/_maxProgress; if (_relProgress < 0.5) then { _flag setFlagAnimationPhase (1-(2*_relProgress)); } else { if (_relProgress == 0.5) then {_flag setFlagTexture (side _caller call _fncOwnFlag)}; _flag setFlagAnimationPhase ((2*_relProgress)-1); }; }, { params ["_flag", "_caller", "_actionId", "_arguments"]; _arguments params ["_actionParams","_fncOwnFlag","_afterCommand"]; _flag setVariable ["TER_flagSide",side _caller]; [] call _afterCommand; }, { params ["_flag", "_caller", "_actionId", "_arguments"]; _arguments params ["_actionParams","_fncOwnFlag","_afterCommand"]; _flag setFlagAnimationPhase 1; _side = _flag getVariable ["TER_flagSide",civilian]; _flag setFlagTexture (_side call _fncOwnFlag); }, [_actionParams,_fncOwnFlag,_afterCommand], _duration, 1.5, false] call BIS_fnc_holdActionAdd; _addID Here is a demo mission: Demo mission on Google Drive: demoMission_capFlag.vr
  20. Oh sorry forgot that one. Add this to the trigger activation: task_global_array = _randomTasks; publicVariable "task_global_array"; And create another trigger with the following condition: {_x} count (task_global_array apply {_x call BIS_fnc_taskCompleted}) == 2 This trigger can then be synced to the next task module.
  21. Take a look here: https://community.bistudio.com/wiki/BIS_fnc_setTask The third parameter is the description. Therefore any previous set descriptions have to be reapplied. If you have a destination set for the task then you have to pass it to the function as the fourth parameter as well.
  22. This will assign two random tasks which were created with the createTask module to all playable units: _taskArray = ["task1","task2","task3","task4",...]; _randomTasks = []; for "_i" from 1 to 2 do { _selectedTask = selectRandom _taskArray; _randomTasks pushBackUnique _selectedTask; _taskArray = _taskArray -[_selectedTask]; }; { [_x,true,["Task description",_x]] call BIS_fnc_setTask; } forEach _randomTasks; Put the code in the activation field of a trigger. Add the task IDs to _taskArray. You might need to adjust the other params of BIS_fnc_setTask. If you want to select more tasks you can change the from-to-loop from 2 to any number you want. Trigger condition: alive VIP_man Set the countdown of the trigger to 10. I'm a bit worried about the task getting messed up and the trigger firing too early but I don't have your setup so testing is up to you. Works for me in a simple SP scenario.
  23. Make your trigger repeatable. (Define your variable spawned on mission start, eg in the init of the module) Change your laptop init to this: this addAction ["Toggle Spawn",{spawned = [true,false] select spawned; publicVariable "spawned"}]; Explanation: spawned = [true,false] select spawned; same as spawned = if (spawned) then {true} else {false}; but faster. true values will be treated as 1 and false values as 0. You may want to add a tag to your global variables as "spawned" is very generic and might be used by the game or another script.
  24. 7erra

    Creating Table Dialog

    Okay after all the solution is simpler than I thought. Try to use the RscListNBox. If you are doing a stat board then this one should be enough. The advantage of the TableControl is the possiblity to add controls other than text to it, like a button or a picture and then assign an idc to it so you can access it later.
×