Jump to content

arma_max

Member
  • Content Count

    29
  • Joined

  • Last visited

  • Medals

Everything posted by arma_max

  1. It amazes that this hint never made it to the tooltip of the Export function! Would be really helpful ... 😉
  2. Hi, I want to list all units/vehicles that are in the player's field of view FOV, no matter if the player has actually already detected them or not and no matter how far away they are or if they are even visible at all. The goal is to draw a small box around every unit as some kind of cheating help 🙂 I guess I could just iterate over all units on the battlefield and use getObjectFOV and the angle between the player and every unit to determine if they are in that FOV or not but is there something more handy and less performance-killing? Max
  3. Hi, Is there a way to retrieve the information where the head's position of a unit is and maybe even how big that object is on the screen? I want to retrieve that information to be able to draw a box around the head. Max
  4. From the wiki ”Returns the target pointed at by the player (usually with cross-hairs). The target has to be known to the player to some degree (knowsAbout > 0). If target is completely unknown, command returns objNull.” That is exactly not what I want. It should also list units the player does not know about. Max
  5. Hi, I am playing around with cutRsc and am wondering how my class needs to look like when I want to draw something like a simple line, rectangle, box or circle? Does anyone here have some examples to look at? Max
  6. Ok, so I have found this for lines class MyLine:RscText { idc = 3000; //control reference style = ST_LINE; x = 0.01 * safezoneW + safezoneX; y = 0.01 * safezoneH + safezoneY; w = 0.10 * safezoneW; h = 0.30 * safezoneH; colorText[] = {0.2941,0.8745,0.2157,1.0}; }; and this for frames/boxes class MyFrame:RscFrame { type = CT_STATIC; idc = 3000; style = 64; x = 0.01 * safezoneW + safezoneX; y = 0.01 * safezoneH + safezoneY; w = 0.10 * safezoneW; h = 0.30 * safezoneH; shadow = 2; colorBackground[] = {0,0,0,0}; colorText[] = {1,1,1,1}; font = "Zeppelin32"; sizeEx = 0.02; text = ""; }; But nothing that would be a circle.
  7. Hi, Is there a good tutorial out there that explains how to build a multi column listbox? I want to display the unit type in the first column and its cost in the 2nd column Unit | Cost ____________|_________ Rifleman | 100 Grenadier | 150 Marksman | 200 I am using the CT_LISTNBOX and lbAddRow but for some reason it is putting two entries next to each other in 1 row instead of below each other, see screenshot here: https://imgur.com/a/woZPgV6 class listboxUnitSelection: RscListNBox { idc = 1501; type = CT_LISTNBOX; onLBSelChanged = "[_this] execVM 'displayUnitDetails.sqf'"; x = 0.35 * safezoneW + safezoneX; y = 0.36 * safezoneH + safezoneY; w = 0.2749206 * safezoneW; h = 0.2 * safezoneH; columns[] = {0.3, 0.6}; colorDisabled[] = {1,1,1,0.3}; disableOverflow = true; idcLeft = -1; idcRight = -1; class ListScrollBar : ScrollBar //ListScrollBar is class name required for Arma 3 { color[] = {1,1,1,0.6}; colorActive[] = {1,1,1,1}; colorDisabled[] = {1,1,1,0.3}; thumb = "#(argb,8,8,3)color(1,1,1,1)"; arrowEmpty = "#(argb,8,8,3)color(1,1,1,1)"; arrowFull = "#(argb,8,8,3)color(1,1,1,1)"; border = "#(argb,8,8,3)color(1,1,1,1)"; shadow = 0; }; }; and here my lbAddRow { hint format ["_x: \n%1", _x]; //_ctrlUnitListBox lbAdd (_x select 1); _ctrlUnitListBox lnbAddRow [(_x select 1),"COL2"]; } forEach availableUnitsList;
  8. Sorry about that, looks like I forgot to hit Send on my last reply: issue was on my end because I also ran an lbAdd in another script that was adding those values to the listbox and messed it up ... fixed that and now everything is working fine 🙂
  9. That is on top of my defines.hpp // Control types #define CT_STATIC 0 #define CT_BUTTON 1 #define CT_EDIT 2 #define CT_SLIDER 3 #define CT_COMBO 4 #define CT_LISTBOX 5 #define CT_TOOLBOX 6 #define CT_CHECKBOXES 7 #define CT_PROGRESS 8 #define CT_HTML 9 #define CT_STATIC_SKEW 10 #define CT_ACTIVETEXT 11 #define CT_TREE 12 #define CT_STRUCTURED_TEXT 13 #define CT_CONTEXT_MENU 14 #define CT_CONTROLS_GROUP 15 #define CT_SHORTCUTBUTTON 16 #define CT_XKEYDESC 40 #define CT_XBUTTON 41 #define CT_XLISTBOX 42 #define CT_XSLIDER 43 #define CT_XCOMBO 44 #define CT_ANIMATED_TEXTURE 45 #define CT_OBJECT 80 #define CT_OBJECT_ZOOM 81 #define CT_OBJECT_CONTAINER 82 #define CT_OBJECT_CONT_ANIM 83 #define CT_LINEBREAK 98 #define CT_USER 99 #define CT_MAP 100 #define CT_MAP_MAIN 101 #define CT_LISTNBOX 102 #define CT_CHECKBOX 77 Does anyone here maybe have a working sample mission where I can take a look?
  10. Hi, I have a supply crate attached to a chute and when I spawn it, all goes well but with the small issue that the parachute is always drifting far off from the player's position (I spawn it on top of the player). I have already turned the wind down to 0 but it is still drifting … Is there any way to make sure that the parachute more or less just falls straight downwards without any drift? I'd like to avoid a situation where the player has to walk 5 miles to get to the supplies … _para = "B_Parachute_02_F"; _smokeShell = "SmokeShellRed"; _vehicle = "B_supplyCrate_F" createVehicle (getPos player); _vehicle setPosATL (_vehicle modelToWorld[5,5,100]); _DropPos1 = getpos _vehicle; _chute1 = createVehicle [_para, _DropPos1, [], 0, "NONE"]; _vehicle attachTo [_chute1, [0, 0, 1]]; _smoke = _smokeShell createVehicle position _vehicle; _smoke attachTo [_vehicle,[0,0,0]];
  11. Ok, I finally sorted it out Do NOT use Steerable_Parachute_F if you want to drop a supply crate or vehicle. Without actual operator that chute always drifts off … B_Parachute_02_F is doing a better job but since its so big and slows down the fall pretty well, there is still some drift. NonSteerable_Parachute_F is way smaller and just falls straight down - best choice IMO for precise drops 🙂
  12. Yes, I have checked that page but none of the examples looks even close to my problem 😕
  13. Yep, I have this in my define.hpp class RscListNBox { access = 0; type = CT_LISTNBOX;// 102; style =ST_MULTI; w = 0.4; h = 0.4; font = "TahomaB"; sizeEx = 0.04; colorText[] = {0.8784, 0.8471, 0.651, 1}; colorBackground[] = {0, 0, 0, 1}; autoScrollSpeed = -1; autoScrollDelay = 5; autoScrollRewind = 0; arrowEmpty = "#(argb,8,8,3)color(1,1,1,1)"; arrowFull = "#(argb,8,8,3)color(1,1,1,1)"; columns[] = {0.3, 0.6, 0.7}; color[] = {1, 1, 1, 1}; colorScrollbar[] = {0.95, 0.95, 0.95, 1}; colorSelect[] = {0.95, 0.95, 0.95, 1}; colorSelect2[] = {0.95, 0.95, 0.95, 1}; colorSelectBackground[] = {0, 0, 0, 1}; colorSelectBackground2[] = {0.8784, 0.8471, 0.651, 1}; drawSideArrows = 0; idcLeft = -1; idcRight = -1; maxHistoryDelay = 1; rowHeight = 0; soundSelect[] = {"", 0.1, 1}; period = 1; shadow = 2; class ScrollBar { arrowEmpty = "#(argb,8,8,3)color(1,1,1,1)"; arrowFull = "#(argb,8,8,3)color(1,1,1,1)"; border = "#(argb,8,8,3)color(1,1,1,1)"; color[] = {1,1,1,0.6}; colorActive[] = {1,1,1,1}; colorDisabled[] = {1,1,1,0.3}; thumb = "#(argb,8,8,3)color(1,1,1,1)"; }; };
  14. I am an idiot. Of course you have to use cbChecked and not ctrlChecked when working with CT_CHECKBOX type 77 ... now its working as expected 🙂
  15. Hi, I have a checkbox in my GUI class checkboxCreateEmptyVehicle: RscCheckbox { idc = 2800; x = 0.341345 * safezoneW + safezoneX; y = 0.612847 * safezoneH + safezoneY; w = 0.015 * safezoneW; h = 0.03 * safezoneH; }; and when I click a button, it checks if that box is ticked or not: _display = findDisplay 1234; _ctrlCheckboxCreateEmptyVehicle = _display displayCtrl 2800; _createEmptyVehicle = false; _createEmptyVehicle = ctrlChecked _ctrlCheckboxCreateEmptyVehicle; hint format ["_ctrlCheckboxCreateEmptyVehicle: \n%1", (ctrlChecked _ctrlCheckboxCreateEmptyVehicle)]; For some reason it is always returning FALSE, no matter whether I have ticked the box or not. What am I missing here?
  16. I found a workaround: set up the event handler on the checkbox to detect changes and store the value in a global variable. Not really sexy but it works … control.hpp onCheckedChanged = "[_this] execVM 'checkboxCreateEmptyVehicleCapture.sqf'"; checkboxCreateEmptyVehicleCapture.sqf: _parms = _this select 0; _ctrl = _parms select 0; _intValue = _parms select 1; if(_intValue == 1) then { checkboxCreateEmptyVehicleValue = true; } else { checkboxCreateEmptyVehicleValue = false; }; hint format ["_parms: \n%1", _parms]; hint format ["checkboxCreateEmptyVehicleValue: \n%1", checkboxCreateEmptyVehicleValue];
  17. Thanks for the hint! Just added that and tried again, no difference! The thing is, I am not getting any error messages or similar and all my other controls are working just fine. Its just that checkbox that won't work as expected.
  18. Hi, I want to make sure that in SP my player gets teleported to a specific marker when he is dying. I thought to start simple I catch the HandleDamage event and manage it in there (no teleportation in here): player addEventHandler ["HandleDamage", { _logKey = "HandleDamage--------------------------------------- "; diag_log format ["%1unit: %2", _logKey, _this select 0]; diag_log format ["%1_selection: %2", _logKey, _this select 1]; diag_log format ["%1_damage: %2", _logKey, _this select 2]; diag_log format ["%1_source: %2", _logKey, _this select 3]; diag_log format ["%1_projectile: %2", _logKey, _this select 4]; diag_log format ["%1_hitIndex: %2", _logKey, _this select 5]; diag_log format ["%1_instigator: %2", _logKey, _this select 6]; diag_log format ["%1_hitPoint: %2", _logKey, _this select 7]; diag_log format ["%1_player getDammage: %2", _logKey, getDammage player]; if (getDammage player >= 0.9) then { player setDamage 0; }; }]; When I now go out on the battlefield it seems to work fine but then after some time under heavy fire and grenades, my player still dies and I get the mission end screen. Am I missing something here - should I look for a different event instead? Max
  19. Hi, i am creating a scenario where I want to build some kind of battalion composed of multiple different groups. The idea is to have multiple different battalions and then direct them to different targets. I know that i can use waypoints for all the groups and sync them all per battalion but is there another more elegant to group them all together and just assign waypoints to that battalion instead? needs to work in SQF files, not by placing groups and waypoints in Eden. Max
  20. Thanks a lot for that script, that gives me something to start with! :)
  21. Thanks for the explanation - I get the concept of groups and creating units and waypoints etc (years of Java coding are finally paying off 😉 but I was wondering if there is any construct to group multiple groups in one super group? In a worst case scenario I would have to create an array per super group and add all groups to the array. If I then want to send the whole super group to the same destination, I just loop over all groups in the array.
  22. Hi, I have a trigger that is configured to trigger - by Anybody - when present The onActivation says: _handle = [thisTrigger, thisList] execVM "captureTown.sqf"; Script below: diag_log format ["_this: %1", _this]; _tr = _this select 0; _triggeredBy = _this select 1; _timer = 0; diag_log format ["_tr: %1", _tr]; diag_log format ["_triggeredBy: %1", _triggeredBy]; _triggeredBy = _triggeredBy select 0; diag_log format ["_triggeredBy NEW: %1", _triggeredBy]; _sideTriggeredBy = side _triggeredBy; diag_log format ["_sideTriggeredBy: %1", _sideTriggeredBy]; If I now run the game the trigger already fires even if there is no unit in the area. Looking at the log files it says: 16:32:44 "_this: [163964: <no shape>,[Agent 0x1e7cc080]]" 16:32:44 "_tr: 163964: <no shape>" 16:32:44 "_triggeredBy: [Agent 0x1e7cc080]" 16:32:44 "_triggeredBy NEW: Agent 0x1e7cc080" 16:32:44 "_sideTriggeredBy: CIV" So the question is: who is this agent? Any animal or ... ? And how would I have to fix it to make sure the trigger is only triggered by "real" units? Max
  23. With that it is only triggering when the player is entering it but not other AI soldiers.
×