Jump to content


  • Content Count

  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by Undeceived

  1. Sorry for the double post: bad benson's result array brought up a last question: There's a way to remove the brackets so that the array looks like this, isn't it? ["hgun_P07_F","30Rnd_65x39_caseless_mag","30Rnd_65x39_caseless_mag","30Rnd_65x39_caseless_mag","FirstAidKit","B_AssaultPack_rgr_LAT"] Nevermind, I messed something up while writing the post above. bad benson's array result looks like this: [["hgun_P07_F"],["30Rnd_65x39_caseless_mag","30Rnd_65x39_caseless_mag","30Rnd_65x39_caseless_mag"],["FirstAidKit"],["B_AssaultPack_rgr_LAT"]] I checked it and for the achievement of my ultimate goal (fill the stuff into a crate) it's not needed to have all weapons+mags+items+backpacks in one array altogether. This will put the output of bad benson's code into a container: {crate addWeaponCargoGlobal [_x,1]; } forEach (_stuff select 0); {crate addMagazineCargoGlobal [_x,1]; } forEach (_stuff select 1); {crate addItemCargoGlobal [_x,1]; } forEach (_stuff select 2); {crate addBackpackCargoGlobal [_x,1]; } forEach (_stuff select 3);
  2. bad benson, yeah, that did the trick. Many thanks, man! To summarize the thread for mission designers that might have the same question: With this code you can create an array with items, magazines, weapons and backpacks that are laying on the ground in a trigger area: //Code by bad benson with elements of Schatten's function: _trigger = trigger_0; _stuff = [[],[],[],[]]; _objs = (nearestObjects [_trigger, ["WeaponHolder", "WeaponHolderSimulated"], selectMax ((triggerArea _trigger) select [0, 2])]) select {_x inArea _trigger}; _objs inAreaArray _trigger apply { (_stuff select 0) append (weaponCargo _x); (_stuff select 1) append (magazineCargo _x); (_stuff select 2) append (itemCargo _x); (_stuff select 3) append (backpackCargo _x); }; To show the array: hint str (_stuff); @bad benson's code creates an array with classname strings for each individual item. E.g.: [["hgun_P07_F"],["30Rnd_65x39_caseless_mag","30Rnd_65x39_caseless_mag","30Rnd_65x39_caseless_mag"],["FirstAidKit"],["B_AssaultPack_rgr_LAT"]] If you need an array that looks like this: [[["hgun_P07_F",1]],[["30Rnd_65x39_caseless_mag",3]],[["FirstAidKit",1]],[["B_AssaultPack_rgr_LAT",1]]] then you can use @Schatten's function: SCH_fnc_getStuffInsideTrigger = { private _allStuff = [ [], [], [], [] ]; params [ ["_trigger", objNull, [objNull]] ]; if ((isNull _trigger) or {(typeOf _trigger) != "EmptyDetector"}) exitWith {_allStuff}; private ["_className", "_classNames", "_index", "_quantities", "_quantity", "_stuff", "_stuffOfType", "_weaponHolder", "_weaponHolders"]; _weaponHolders = (nearestObjects [_trigger, ["WeaponHolder", "WeaponHolderSimulated"], selectMax ((triggerArea _trigger) select [0, 2])]) select {_x inArea _trigger}; { _weaponHolder = _x; { _classNames = _x select 0; _quantities = _x select 1; _stuffOfType = _allStuff select _forEachIndex; { _className = _x; _quantity = _quantities select _forEachIndex; _index = _stuffOfType findIf {(_x select 0) == _className}; if (_index >= 0) then { _stuff = _stuffOfType select _index; _stuff set [1, (_stuff select 1) + _quantity]; } else { _stuffOfType pushBack [_className, _quantity]; }; } forEach _classNames; } forEach [ getWeaponCargo _weaponHolder, getMagazineCargo _weaponHolder, getItemCargo _weaponHolder, getBackpackCargo _weaponHolder ]; } forEach _weaponHolders; _allStuff }; Show the result / call the function with: hint (str ([trigger_0] call SCH_fnc_getStuffInsideTrigger)); Many thanks to you both, guys.
  3. @bad benson Cool, thanks for the addition / change. When using this, the code worked: _trigger = myCollectorTrigger; _stuff = [[],[],[],[]]; _objs = (nearestObjects [_trigger, ["All"], selectMax ((triggerArea _trigger) select [0, 2])]) select {_x inArea _trigger}; //taken from Schatten's code _objs inAreaArray _trigger apply { (_stuff select 0) append (weaponCargo _x); (_stuff select 1) append (magazineCargo _x); (_stuff select 2) append (itemCargo _x); (_stuff select 3) append (backpackCargo _x); }; The only problem left now is that all stuff that the units in the trigger have (and also the stuff that is in vehicles) is also added to the arrays. Is there a way to exclude everything so that only the stuff on the ground is collected? EDIT: Btw. this is what I need: One individual string for every item.
  4. Thanks badbenson, I tried out this code but unfortunately the vehicles thing didn't work, so _stuff didn't have anything. As it seems to me, there are no vehicles in the trigger (I dropped an item, a mag and a rifle). Your explanations after this code were too much for my brain - couldn't understand it - sorry. EDIT: _objs = vehicles select {_x isKindOf "Car"}; worked when I placed a quad. But searching for the weaponholders didn't work.
  5. Undeceived

    Forums Upgrade

    I'd like to come back to the search restriction "Wait 255235235 seconds until you can search again." Could you please remove that, BI? That would be much appreciated.
  6. Undeceived

    Eagle Wing Campaign Remake

    Nice!! I assume @moricky will be pleased to see this in A3.
  7. Undeceived

    Dirty Respirators

    @johnnyboy needs this for Dr. Sanjay!
  8. Great idea, @POLPOX. I used the 25 cm sphere, set its texture to #(argb,8,8,3)color(0.898039,0.403922,0.133333,0.000000,ca) (invisible), changed the code for the addAction and it works great now. The only disadvantage is that when looking at it, there appears the name "Geometry sphere" on the screen, but it's not a big deal. Thanks a lot!
  9. Hello guys. The problem: I have an addAction on an object ("Take object"), which appears when the player looks at it (means when the center of the screen is on the object - I think it's the same as cursorObject or cursorTarget). This normally works fine but I noticed that in some cases it doesn't. The action appears when the player looks somewhere under or beside the object (I'm using a leaflet) but not when he looks right AT it. I think this is related to the fact that the leaflet is placed on the ground of a shed which I placed in the editor. On the ground itself (outside) it works ok. Because of this problem I fear that the player would look at the object but go on because the action doesn't appear. ThereforeI want to expand the area on which the player can look to activate the action. And what else could be better than a 3D trigger. Now, is there a way to check if the player is looking into the dimensions of this trigger cube? Any input (other ideas too) is appreciated, thanks.
  10. Undeceived

    SP Mission pack CWR2 "The last war"

    Awesome stuff! Didn't play it yet but will as soon as I find some more time. Love that era and the OFP style! Thanks for your work, guys!
  11. Cool stuff, thanks a lot! One question: Is there a way to (scriptwise) color the footprints, e.g. red, like if the guy stepped into a pool of blood?
  12. Hi guys! Is there a way to (scriptwise) save the game in a way that multiple save-game slots are created, just like when the player saves manually via the ESC menu (there are 8 slots or so)? In many of my missions I offer the player unlimited saves via the radio menu 0-0-0, but here I use the saveGame command, which has only "one slot", which again means that the newest save-game overwrites the previous one. If the player then (we all know these situations ) gets in a bad situation (e.g. suddenly is overwelmed by 1000000 soldiers and 400 tanks just one second after using this save-game) AND if he didn't use the alternative "User Save" from the menu, which creates the save-game at another location, then... well, he's screwed and he will have to restart the whole mission, which is kinda frustrating. This is why I'm looking for another way to use the radio menu save-game. The saveGame command is ok, but absolutely fails in the situations mentioned above. So: Is there a way to scriptwise make a User Save? Or is there a way to create multiple slots for the saveGame command (two would already be ok). Looking forward to your ideas, thanks.
  13. Ok, I'm starting right away to write these scripts then... Hm, that sounds like an impossible task. Yeah, but this is not always predictable. And you're right - this was the way in OFP that you knew that something was gonna happen soon. Anyway, thanks for your replies.
  14. Wow, this is amazing, Rismarck! Fantastic job and thanks! And X-Cam ( @silola)! Just a note - the pictures in the OP seem to be broken - for me at least.
  15. Undeceived

    Thank you BI [2018 Roadmap Update]

    Good roadmap for the rest of this year. Looking forward to it and thanks, BI. The story of (Grumpy ) Old Man sounds exciting. And I really expect a continuation of Miller's story line. You heard it, BI! Glad that the next Arma is still years away - this way we have some more time to finish one or another project.
  16. Hi guys, is there a way to (code-wise) add a compatible weapon attachment - here: suppressor - to the currently selected gun? In my case it's an AK from the CUP mod (if this is relevant at all). Thank you very much!
  17. Thanks a lot, 7erra! Much appreciated. At first it didn't work, but then I checked the config and found what to change -> the part in the "WeaponSlotsInfo". In vanilla it is "MuzzleSlot", in CUP it's "CUP_EastMuzzleSlotAK". This means that the code is not totally "universal", but in my case it's absolutely sufficient as there are no Western weapons in the corresponding mission. Thanks again! The code looks like this now: _cfgArray = getArray (configfile >> "CfgWeapons" >> (currentWeapon player) >> "WeaponSlotsInfo" >> "CUP_EastMuzzleSlotAK" >> "compatibleItems"); _supressor = [nil, selectRandom _cfgArray] select (count _cfgArray > 0); player addPrimaryWeaponItem _supressor;
  18. Undeceived

    Does anyone else not use WASD for movement?

    Arrow keys 'til the death here (for the Arma series). Reasons: Tribute to OFP I don't want to miss the extra amount of keys of the numpad. Playing WASD there are only a few keys at one side (left) - with the arrow keys I have plenty of them at both sides.
  19. Only saw this now. What a fantastic idea! Great work so far!
  20. UNDERDOGS Author: UndeceivedVersion: 1.7 (updated May 24, 2018) D E S C R I P T I O N "We were totally excited when we finally got the green light for the job that our contact Manos had told us about. Just a simple burglary - a pile of money waiting for us in return. At that moment we didn't know that this would be the trigger of a terrible nightmare and a wearying run for our lives..." A story-driven mini-campaign (5 missions, cutscenes, multiple endings) about a group of Altian kids trying to survive the consequences of a deadly coincidence. T R A I L E R S F E A T U R E S Story-driven SP mini-campaign (5 missions) A civilian style "crime thriller" - take a refreshing break from the daily military duties Cutscenes Multiple endings Many ways to solve certain tasks Crafting of certain needed improvised items You can adjust the brightness in night missions A V A I L A B L E L A N G U A G E S R E Q U I R E M E N T S Max Life Pack (download @ Steam Workshop or @ Armaholic) Some other addons but they are all part of the campaign file already I S S U E S Playing with other mods apart from the required ones could break the missions or cause bugs. Other than that I have no clue what happens in the Arma dev version, so better play in the stable version. A D D I T I O N A L I N F O R M A T I O N D O W N L O A D S Underdogs v. 1.7 Underdogs v. 1.7 Please note: If you like my missions and campaigns, please give feedback in form of comments and rate them! The biggest motivation comes from reading how you liked them and what I can improve.
  21. Undeceived

    [SP/CAMP] Underdogs

    Good day, a new version is up - just a small script fix after a change in the Max Life Pack mod. Start the run for your life now with v. 1.7 in the first post! Btw. as a small advertisement: I've recently got some pleasant feedback from a friend that had replayed it and realized that there is a whole alternative campaign end, depending how one of the missions is played. In total there are three endings to be found out. Cheers to @Kalle M.
  22. Yes, at last! Looks great, good job so far and good luck! And I loved the humor in the announcement post.
  23. Thanks, CUP team for another great update!
  24. I totally agree with you, but on the other hand exactly this is why positive ratings are important. Reality is that this bad SW rating systems is there and players look at the stars while searching for good missions. Comments are great and as I said earlier they are what motivates more and are useful and stuff but they are only seen if the player enters the mission web page. And that's what positive ratings are needed for. Therefore I can just encourage you to give it (and every mission/campaign/addon you like) a .