Jump to content

Pac Man

Member
  • Content Count

    193
  • Joined

  • Last visited

  • Medals

Everything posted by Pac Man

  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. I've a simple yes no dialog. Like an addaction, is there anyway to determine whom pressed a button?
  7. 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:
  8. 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.
  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. 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
  13. Thanks for the replies. We've been trying to figure this pout for some hours now. Gonna try and report back asap.
  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];
  16. Pac Man

    Return a units pistol?

    You're my hero. Didn't even think to search for handGun! Thankyou very much.
  17. I can use primaryWeapon _someUnit & secondaryWeapon _someUnit to return a units weapon(s). Is there a simple way to return the pistol the unit is carrying? IE: Pistol _someunit Thanks, Pac Man
  18. I'm trying to pass the players primary weapon to a picture control. It tells me the picture isn't found, but I know 100% it exists. If I hard code the picture in there it shows up. So I'm doing something wrong here. Someone be my hero please and set me down the right path. RPT: Warning Message: Picture (configfile >> "cfgweapons" >> "[color="#FF0000"]arifle_mx_f[/color]" >> "picture") not found script.sqf disableSerialization; CreateDialog "DigitalLoadout"; _display = uiNamespace getVariable "Dload"; _nameCtrl = _display displayCtrl 61500; _weaponCtrl = _display displayCtrl 71500; _nameCtrl ctrlSetText format["%1: %2",rank player,name player]; [color="#0000FF"]_weaponCtrl ctrlSetText format["(configfile >> ""CfgWeapons"" >> ""%1"" >> ""picture"")", primaryWeapon player];[/color] Cheers, Pac Man ---------- Post added at 01:03 ---------- Previous post was at 00:41 ---------- Solved disableSerialization; CreateDialog "DigitalLoadout"; _display = uiNamespace getVariable "Dload"; _nameCtrl = _display displayCtrl 61500; _weaponCtrl = _display displayCtrl 71500; _nameCtrl ctrlSetText format["%1: %2",rank player,name player]; [color="#FF0000"]_picture = getText (configfile >> "CfgWeapons" >> primaryWeapon player >> "picture"); _weaponCtrl ctrlSetText format ["%1", _picture]; [/color]
  19. Pac Man

    setMarkerAlphaLocal

    Okay thanks. Doing it a bit differently. Using setmarkerPosLocal in client script seems to work well. Again, thankyou.
  20. I've 2 pre-placed editor markers named west_mhq & east_mhq. I wanted to have each marker track a vehicle. However I wanted to set the alpha of the opposite side's marker to 0, so players can't see the oppositions marker. As soon as the markers start to track the vehicles, both of their alpha returns back to 1 (visible). What is a better way I could achieve this? if (isServer) then { while {true} do { "west_mhq" setMarkerPos getPos mhqW1; "east_mhq" setMarkerPos getPos mhqE1; sleep 1; }; }; if (!isDedicated) then { waitUntil {!isNull player}; switch (side player) do { case west:{"east_mhq" setMarkerAlphaLocal 0;}; case east:{"west_mhq" setMarkerAlphaLocal 0;}; }; };
  21. On a dedicated server, how would I broadcast the sideChat message to just the unit (player) that is getting kicked out of the vehicle? The function works as intended on a dedicated server except it doesn't broadcast the side chat message. The mission can be found here. init.sqf TAG_Fnc_VCheckW = { _vehicle = _this select 0; _unit = _this select 2; if (side _unit != west) then { _unit sideChat "You can't use enemy vehicles"; _unit action ["getOut", _vehicle]; }; }; if (isServer) then { _veh = createVehicle ["b_mrap_01_hmg_F", getMarkerPos "vehMrk", [], 0, "NONE"]; _veh addEventHandler ["getIn",{call TAG_Fnc_VCheckW}]; };
  22. Pac Man

    Mods and ARMA 3 on the same level as FSX?

    Yeah there hasn't been one mod I'd have payed for so far. I think the only mods I would have even considered to pay for were for Arma1. cameron mcdonalds & shadowNXs russian federation units / weapons and also Cm's 1st infantry division. The bigger mods I've seen are usually really buggy and try to over extend features, which seem to not even work as intended half of the time. Which is what I would be afraid of. Paying for a jumbled up mess. In Short: payed content will kill this franchise. While there are some valid arguments for it, there's simply too many ways this could go wrong.
  23. -nologs idk if that may help. I do know it stops rpt reports.
  24. You an set other attributes aswell very simply. You may want to look into spot time and distance, aswell as aiming shake and speed. { _x setSkill ["general", 0.5]; _x setSkill ["aimingaccuracy", 0.13]; _x setSkill ["aimingshake", 0.1]; _x setSkill ["aimingspeed", 0.1]; _x setSkill ["endurance", 0.3]; _x setSkill ["spotdistance", 0.1]; _x setSkill ["spottime", 0.1]; _x setSkill ["courage", 1]; _x setSkill ["reloadspeed", 0.4]; _x setSkill ["commanding", 1]; } ForEach AllUnits;
  25. Or very readable and neat in an external script. I would never fully loadout a unit in the initilization box, that can be really messy and hard to read. But, yeah it would be nice to have the loadout editor that was talked about. It really doesn't take as long and isn't such a hassle as you make it out to be. The loadout editor would be great though, but it's trivial.
×