Jump to content

jshock

Member
  • Content Count

    3059
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by jshock

  1. Hello Scripting Community, I am trying to alter an array that counts all units of a side, but I have two separate groups that I want either excluded from that count, or later subtracted out of that "umbrella-ed" array that counts all units of the side. This is what I have so far: faction = (_this select 0); thoseSideUnits = []; _excludedindv = [indv1, indv2]; _grps = [grp1, grp2]; { if (side _x == faction) then { thoseSideUnits set [count thoseSideUnits, _x];}; } foreach allunits; _excludedgrps = ???? final = thoseSideUnits - _excludedindv - _excludedgrps; Obviously the ???? is where I'm stuck, unless there is another way to accomplish this. grp1 and grp2 are the respective group leaders of the units I would like to exclude. Any help is greatly appreciated!
  2. Works perfectly! Thanks to both of you again, it was a great help to my endeavor .
  3. The globals were mainly for testing through the debug console. But for the last line you changed up, how would I be able to take that returned value and use it in another script because this is the unit setup script that goes into another script that does what I want to all of the non-excluded units? Thanks for the adivce about naming conventions I have noticed myself being a little too "general" at times, sorry for any confusion it may have caused you. I'm still learning some of the ropes in the scripting world (as you can tell), so I thank you both for your time and experience that you both have shared thus far.
  4. The only problem with your structure of it is if say (extreme example) I had 50 different groups that I wanted to exclude, at that point there is a lot of extra code. So that is the reason for filtering down into another variable, basically I want to take all the group leaders' variable names and be able to include them in the _grps arrays, take all units of that side and put them in the empty array thoseSideUnits, then be able to in just a line or two of code have the script run through every group leader that I have in the _grps array and add them and their grouped units into the _excludedgrps array so I can subtract them from the overall count of the side. I hope that makes sense, because I want to do something with the rest of the units that I don't exclude from the "final" array.
  5. I'm not having any issues with it Foxhound, did you possibly grab it while the file was still re-uploading? Or what seems to be the issue?
  6. I always enjoy questions :). And I may add the googles to the main script as well. I have an idea what to do for EOS and the sort, but I'm just not to the point of making and testing it out. ---------- Post added at 18:25 ---------- Previous post was at 18:22 ---------- ****UPDATE**** Current Version - 1.17.1 Previous Version - 1.17 >> Added a goggles array for more redressing options.
  7. I've been trying to think of a way but just haven't had enough time to sit down and stare at it long enough ;).
  8. If the randomization is the only issue I can put together something for you, but to answer your question, yes for each classname it would follow the format of the special units.
  9. There is not a specific unit loadout, by classname I assume, except for the "special" units (AT, AA, Medic). You could go in and alter these static loadouts that I have placed in there for these specific unit classnames, if you have enough scripting knowledge, or you could make the separate empty arrays and count arrays for each classname you are looking to redress and then the actual redress function at the end. But I do not plan on having a loadout specific script section for each unit classname for this particular script, I had something similar to that in the initial release of the script, and the demand was to dress the whole side of Blufor/Opfor/Independents, which has now transferred into needing more of a group based system, not side based, but there just isn't enough demand for a classname by classname specific redressing script.
  10. That could be reach by copying and pasting the script with a different name (i.e. jsere_redress2.sqf) and then change out the arrays as need for those loadouts, and do a separate call to the #2 script. Well and of course if I can sort out the separation of units, you could say this group gets this script call and that group gets another.
  11. Sorry I haven't had much activity recently, life is a pain at times ;) , I have started the task of separating out specific units and/or groups from being "redressed", but I've just been busy. Any issues that have popped up after this last update?
  12. I will be working on the limiting units feature, but the not getting redressed fully was more pressing. Thanks for all your patience :ok:
  13. ****UPDATE**** Current Version - 1.17 Previous Version - 1.15 >> Fixed the uniform not being "redressed" issue. *****Side note, the classnames on the Arma 3 Assets page do not work, at least through my testing, they will work if you take off "Item_" from each classname.
  14. Not at the moment, I have gotten another request for such a feature, I will look into it.
  15. Well I was finally able to sit down and look at this, I have the same issue popping up with the uniforms, but with the new classnames, except my units are "naked" with no uniform at all, which shows me that Bohemia must have changed how the uniforms are called on, unless I'm in the wrong, but it's such a weird issue because I have every other item working properly except the uniform....
  16. From what I saw all the classnames got "Item_" added to the front of them, my example for the script does not have this change. But yes all of the names are the same (being Guerilla Smocks 1), but the classnames are different (i.e. "Item_U_IG_Guerilla1_1).
  17. Ok, well....that works....
  18. I just found out that the classnames were changed in the last update of Arma 3, please reference the link below and do a control find for "guerrilla" and you will find all of the smocks with their new classnames. I will be updating the script to reflect these changes here in the near future. https://community.bistudio.com/wiki/Arma_3_CfgVehicles_EMPTY ---------- Post added at 04:16 ---------- Previous post was at 04:12 ---------- Is that through the init.sqf or one of the init type files in EOS, because unless I'm just confused on how EOS works (I have never used it myself for a mission, but know it is used in insurgency) my script is a "one and done" not constantly updating for newly spawned units? But if it works when new units are spawned in through EOS, that's great, and thanks for the feedback!
  19. Not at the current moment, I wouldn't think the exclusion portion would be hard, but the secondary "redress" for those units may be a little tougher, will look into it. And if you wouldn't mind private messaging me or posting here exactly how to make it work properly with EOS because I have a lot of requests on how to make it work, and I've been just to busy to have the time to pull my brain around it.
  20. Double check that the classname is spelled correctly, if that wasn't the issue please copy the whole classname dependent section and share it here so I can check it as well.
  21. Glad you found it useful....now if only I can get it to work with things such as ALIVE, MCC, Zeus, and EOS......
  22. "GroupName" may not be in quotes. If that isn't it you may need to put in a: _group = createGroup EAST; Then: if (group _x == _group) If neither of these help, let me know I have an idea, but can only do so much from my phone.
  23. I feel that an event handler could handle both Alive and the EOS systems, but as I said I don't have experience enough with such things, I can look into it, but if any of you know someone that knows event handlers well that would be a great help.
  24. SturmFalkeRDA, You could easily alter the line below: if (side _x == _faction) then { _units set [count _units, _x];}; to follow this format: if (typeOf _x == "UnitType") then { _units set [count _units, _x];}; or if your doing it by group: if (group _x == "GroupName") then { _units set [count _units, _x];}; in regards to your event handler, I don't have much experience in such matters, so hopefully someone else can help you in that regard. Hopes this helps!
  25. I have not received any messages back.
×