Jump to content

Pac Man

  • Content Count

  • Joined

  • Last visited

  • Medals

Community Reputation

10 Good

About Pac Man

  • Rank


  • Interests
    Old Mopars & Arma
  • Occupation
    Being the GOAT

Contact Methods

  • Biography
    I'm the GOAT of the GOATS
  1. fantastic thanks. i was too focused on the prefix ctrl in my researches hehe. :p
  2. i need to be able to do this. below is an example of what im after. class pac_button_tester: RscButton { idc = 9000 text = "button1"; x = 0.4008 * safezoneW + safezoneX; y = 0.5812 * safezoneH + safezoneY; w = 0.0977 * safezoneW; h = 0.028 * safezoneH; action = ""; // none yet... }; class pac_button_tester2: RscButton { idc = -1 text = "button2"; x = 0.4008 * safezoneW + safezoneX; y = 0.5900 * safezoneH + safezoneY; w = 0.0970 * safezoneW; h = 0.0280 * safezoneH; action ="execVM 'script.sqf'"; }; script.sqf //pseudo CTRLSETACTION [9000, "execVM 'anotherScript.sqf'"];
  3. I want to set up a stringtable.csv for a button control. How does stringTable.csv work / impliment? I've exhausted my attempts to make it show what's in the stringtable. stringtable.csv language, "english" QN_dialog_btn_help, "Help" button control class QN_btn_help: RscButton { idc = 1605; text = $STR_QN_dialog_btn_help; x = 0.254943 * safezoneW + safezoneX; y = 0.6092 * safezoneH + safezoneY; w = 0.053967 * safezoneW; h = 0.028 * safezoneH; };
  4. Pac Man

    Define Unit by Clothing

    Code tags are fine. Quite a bit better than using quotes :cool:
  5. Pac Man

    Digital Compass Bearing

    I just noticed this and wanted to hop in here and check it out. I've a couple questions though. Why does showing a hint box with the players heading require it to be in addon form and why does it need cba? Was this just a 'practice' addon? No sarcasm, it's a legit question.
  6. Ahh =/. That's too hacky for me atm. Though surely a valid solution. I was more hoping it worked along the lines of an addaction :p Thanks for the reply none the less. :cool:
  7. init.sqf intelGathered = false; actionID = intellappy addAction ["<t color=""#F6FF00""> Retrieve Intel",{PLAYER playmove "AinvPercMstpSnonWnonDnon_Putdown_AmovPercMstpSnonWnonDnon"; a disableAI "ANIM"; intelGathered = true;[color="#FF0000"]publicVariable "intelGathered";[/color]}, [], -1, false, true, "", "intellappy distance _target < 1.5 && !intelGathered"]; You should also think about writing a script instead of running the code directly in the addaction. actionID = intellappy addAction ["<t color=""#F6FF00""> Retrieve Intel",[color="#0000FF"]"laptop.sqf"[/color], [], -1, false, true, "", "intellappy distance _target < 1.5" && !intelgathered"]; laptop.sqf _lapTop = _this select 0 //object the addaction is attached to _caller = _this select 1 // person whom used the action _Id = _this select 2 // name of the action _caller playmove "AinvPercMstpSnonWnonDnon_Putdown_AmovPercMstpSnonWnonDnon"; a disableAI "ANIM"; [color="#FF0000"]intelgathered = true; publicVariable "intelgathered";[/color] _lapTop removeAction _Id; // not nessecary in this case since were hiding the action by condition ---------- Post added at 13:59 ---------- Previous post was at 13:37 ---------- updated - recheck the solution if you already hadn't.
  8. I've a simple yes no dialog. Like an addaction, is there anyway to determine whom pressed a button?
  9. I believe BI will go with whatever the majority would like, just like with any other game. The old days of BI being independent and catering to the niche crowd are gone. In with the new, and "who gives a fuck about old loyalty" kind of deal. Unfortunately.
  10. How would I detect if any given item is a weapon type or a magazine type? Or detect if any given item / object is in cfgMagazines or cfgWeapons or cfgVehicles? IE; if ("m16" isKindOf magazine) then { do stuff } else { do other stuff }; if ("m16" in cfgMagazines) then { do stuff } else { do other stuff }; Thanks. Kind Regards, Pac Man
  11. I ended up using Larrow's method. Thankyou both very much for the help.
  12. Thanks for the replies. We've been trying to figure this pout for some hours now. Gonna try and report back asap.
  13. I'm trying to iterate through back pack items and throw one of each item type into an array, for the purpose of weeding out duplicate/same items. ie; player has 3 mines, 2 grenades and 4 magazines. I only want one of each thrown into the array. The ultimate goal here is to search through a units backpack, find the items and then return how many of each item there is... on the fly. As the player could have all kind of things in his backpack at any given moment. This partially works, and i'm getting really close to my goal, but throws an error and totally disregards the first "would be" item leaving the array one item short. Any help or other method is appreciated. init.sqf waituntil { time > 1 }; _array = []; for [{_i=0},{_i < count backPackItems player},{_i = _i + 1}] do { _newitem = backPackItems player select _i; _oldItem = backpackItems player select _i - 1; if (_newItem != _oldItem) then {_array = _array + [_newItem];}; }; //[b]outputs one of each item / magazine except the first and counts them[/b] - almost there! for [{_i=0},{_i < count _array},{_i = _i + 1}] do { _count = ({_x == _array select _i} count items player) + ({_x == _array select _i} count magazines player); player globalChat format ["%1 %2", _array select _i, _count]; }; rpt Error in expression <ect _i; _oldItem = backpackItems player select _i - 1;if (_newItem != _oldItem)> Error position: <select _i - 1;if (_newItem != _oldItem)> Error Zero divisor
  14. SOLVED Thanks for opening my eyes. I was over complicating things. This is what I did. _PWAmmoType = primaryWeaponMagazine player; _PWCountType = ({_x == _PWAmmoType select 0} count magazines player); player sideChat format ["%1",_PWAmmoType]; player sideChat format ["%1",_PWCountType];
  15. I'm trying to count the players primary magazines. It returns the magazine type as the parent class, thus defaulting to 0. What is wrong with my path? I want to reference a 30Rnd_65x39_caseless_mag & not "B_65x39_Caseless" in this example. Config viewer says ammo = "B_65x39_Caseless";. But how can I get the actual magazine returned as text string? I've tried using "type" at the end. Any help is appreciated. If any of this makes any sense! _PWAmmoType = getText (configfile >> "CfgMagazines" >> primaryWeaponMagazine player select 0 >> "ammo"); _PWCountType = ({_x == _PWAmmoType} count magazines player); player sideChat format ["%1",_PWAmmoType]; player sideChat format ["%1",_PWCountType];