Jump to content

scottb613

Member
  • Content Count

    762
  • Joined

  • Last visited

  • Medals

Everything posted by scottb613

  1. scottb613

    Formatting a Multiline Hint

    Hi Folks, Thank you again as well. Hah - I know I'm not much of a coder and my solutions aren't very elegant. Seeing better ways of coding is very helpful and appreciated. Let me play with this as well and see if I can grasp all of what you're doing. 🙂 Regards, Scott
  2. scottb613

    Formatting a Multiline Hint

    Hi Folks, Thanks - I'll give that a shot. I've found that when using "heal and revive" scripts the unit numbers and team assignments are lost on occasion - needing me to reevaluate the number assignments periodically. Regards, Scott
  3. scottb613

    S.O.G. Prairie

    Mig Alley was in the Korean War up near the Yalu River - wrong war - buddy. Sometimes it's far better to remain silent... Regards, Scott
  4. scottb613

    Formatting a Multiline Hint

    Hi Folks, I've updated my script based on the help I've gotten here. It's working pretty well from my perspective. Two more questions come to mind. Question: Is there a way to get the unit number assigned to a unit in the HUD (1,2,3,4 for F1, F2, F3, F4 respectively)? Question: I split the "weapon" variable via [splitString] as most of the info I didn't feel was needed in the display. For SOG - I just needed field 1 as their weapon syntax made it pretty easy. The issue is that [splitString] introduced a trailing quote on my status display and I don't know how to remove it. It's not impacting the output very much - just irksome. Updated Script Thanks... Regards, Scott
  5. Hi Folks, I'm on a coding spurt - LOL. Doing some simple quality of life scripts. Learning as I go. I made a self-destruct script to destroy any ammo pallets left over after I rearm my units. I learned how to add actions to objects now - new to me - very cool. The script "works" as is. Question: When I [attachTo] - the relative positioning doesn't seem to work. I can never see the charge - no matter the values (assumed buried in object). Shouldn't I be able to move the explosive around on the object (ammo pallet) using the position array? Question: If I use the "scripted charges" this works - however - I originally wanted to place a SOG incendiary grenade on the pallet (better effect) - but that doesn't work using the classname - ideas? //SCOdestruct.sqf private _target = _this; private _posit = getpos (_this select 0); // create and attach charge private _charge = "DemoCharge_Remote_Ammo_Scripted" createVehicle _posit; _charge attachTo [_target, [1.0, 1.0, 1,0]]; // now detonate charge sleep 2; hint "----RUN---RUN---RUN----"; sleep 3; hint "---------10"; sleep 1; hint "--------9"; sleep 1; hint "-------8"; sleep 1; hint "------7"; sleep 1; hint "-----6"; sleep 1; hint "----5"; sleep 1; hint "---4"; sleep 1; hint "--3"; sleep 1; hint "-2"; sleep 1; hint "1"; sleep 2; hint ""; _charge setDamage 1; Thanks. Regards, Scott
  6. scottb613

    Simple Destruct Script

    Hi Folks, Hah - I've gotten a great deal of help lately - thank you. 🙂 I'll work on putting all this great new information to use. Regards, Scott
  7. scottb613

    Formatting a Multiline Hint

    Hi Folks, Hah - now that’s hardcore ArmA… 🙂 Regards, Scott
  8. scottb613

    Formatting a Multiline Hint

    Hi Folks, Thanks again @Larrow - hmm - I must have bungled my test of [format] - I'll go over that again. 🙂 Regards, Scott
  9. Hi Folks, Working on a simple "Rearm" script using the vanilla "Rearm Action" - as it's obvious the default menu "Rearm" actions are really unusable. The "Rearm" action is intended to be initiated from an Ammo Crate Action Menu. You can select "Rearm" by Player Squad or Team. There is a self-destruct mechanism included to destroy any ammo not taken - to prevent it falling into enemy hands. Question [SCOammo.sqf]: I get the yellow "out of ammo" indications on the HUD for the unit - it doesn't clear after they rearm - is there a way to force the HUD Indicator back to normal? Question [SCOammo.sqf]: Is there a way to detect the end of a reload animation of a unit - like [waitUntil]? The reload times vary greatly between weapon/unit. Question [SCOdestruct.sqf]: When I [attachTo] the charge to the pallet - the relative positioning doesn't seem to work. I can never see the charge - no matter the values (assumed buried in object). Shouldn't I be able to move the charge around on the object (ammo pallet) using the position array? Question [SCOdestruct.sqf]: If I use the "scripted charges" this works - however - I originally wanted to place a SOG incendiary grenade on the pallet (better effect) - but that doesn't work using the classname - ideas? //SCOinitAmmoCrate.sqf //Insert into Init Field of Desired Ammo Crate. this addAction ["Rearm Squad","SCOammo.sqf","ALL",1.5,true,true,"","true",5]; this addAction ["Rearm Team_W","SCOammo.sqf","MAIN",1.5,true,true,"","true",5]; this addAction ["Rearm Team_R","SCOammo.sqf","RED",1.5,true,true,"","true",5]; this addAction ["Rearm Team_G","SCOammo.sqf","GREEN",1.5,true,true,"","true",5]; this addAction ["Rearm Team_Y","SCOammo.sqf","YELLOW",1.5,true,true,"","true",5]; this addAction ["Rearm Team_B","SCOammo.sqf","BLUE",1.5,true,true,"","true",5]; this addAction ["<t color='#FF0000'>Destruct</t>","SCOdestruct.sqf","nil",1.5,true,true,"","true",5]; //SCOammo.sqf //Need Classname of desired Ammo Crate on line 4. private _choseTeam = _this select 3; private _logger = format ["Rearm %1", _choseTeam]; hint _logger; sleep 3; //Check Ammo Box Range private _ammoBox = nearestObject [player, "vn_b_ammobox_supply_01"]; private _ammoRun = 1; if (isNull _ammoBox) then { hint "No Ammo in Range"; sleep 5; hint ""; _ammoRun = 0; }; while { _ammoRun == 1 } do { private _ammoPos = getpos _ammoBox; private _unitArr = units player; _unitArr deleteAt 0; { // Unit Info and Team Membership private _unit = _x; if (!alive _unit) then {continue}; private _priWeap = primaryWeapon _unit; private _unitMagArr = magazines _unit; private _compMagArr = compatibleMagazines _priWeap; private _totCnt = 0; private _assTeam = assignedTeam _unit; if (_choseTeam == "ALL") then {_assTeam = "ALL"}; if (_choseTeam != _assTeam) then {continue}; // Count Primary Weapon Magazines { private _compMag = _x; { private _unitMag = _x; if (_compMag == _unitMag) then {_totCnt = _totCnt + 1}; } foreach _unitMagArr; } foreach _compMagArr; // If Unit Above Threshold - Continue if (_totCnt > 4) then { _logger = format ["%1 - I'm good.", _unit]; hint _logger; sleep 1; continue; }; // Get Ammo _unitPos = getpos _unit; _logger = format ["Rearm %1",_unit]; hint _logger; _unit doMove _ammoPos; waitUntil {sleep 1; (_unit distance _ammoBox) < 5}; _unit action ["rearm", _ammoBox]; _unit doMove _unitPos; } foreach _unitArr; _ammoRun = 0; }; hint ""; //SCOdestruct.sqf //Destroy Ammo Crate private _target = _this; private _posit = getposATL (_this select 0); // create and attach charge private _charge = "DemoCharge_Remote_Ammo_Scripted" createVehicle _posit; _charge attachTo [_target, [1.0, 1.0, 1,0]]; // now detonate charge sleep 2; hint "----RUN---RUN---RUN----"; sleep 3; hint "---------10"; sleep 1; hint "--------9"; sleep 1; hint "-------8"; sleep 1; hint "------7"; sleep 1; hint "-----6"; sleep 1; hint "----5"; sleep 1; hint "---4"; sleep 1; hint "--3"; sleep 1; hint "-2"; sleep 1; hint "1"; sleep 2; hint ""; _charge setDamage 1; Thanks. Regards, Scott
  10. scottb613

    Simple Rearm Script

    Hi Folks, Thanks - @Larrow and @Ibragim A really appreciate the help - I have much to play with. I'll post an update after I make some progress. Regards, Scott
  11. scottb613

    Formatting a Multiline Hint

    Hi Folks, Thanks so much as well. I'm a novice - so corrections and critical feedback is ALWAYS most welcome. It's how I learn. Let me go over your posts in detail. I'll see if I can figure out my mistake. I'll have to correct it elsewhere - as I've used that block before. 😉 Regards, Scott
  12. scottb613

    Formatting a Multiline Hint

    Thank you - kindly. I'll take a gander. Regards, Scott
  13. scottb613

    Simple Rearm Script

    Hi Folks, Consolidated a couple threads into this one - I'll keep post #1 up to date - scripts are updated with progress and functional. I see from how @thy_ did it - I need to delete all magazines - from unit and ammo box - then replace with what I want after I update the quantities - respectively. I think I have it. I'll be working on implementing same. I posted my remaining active questions in post #1. Regards, Scott
  14. Hi Folks, Spinning my wheels on this one - [magazines] works fine on the player - however - [magazines] doesn't work on the Players AI Group Members? I've tried everything I can think of. I gave the AI Units Variable Names - I also tried the default names returned from a [units player] command - nothing seems to provide me with the magazines of the AI units - it returns null. The [magazines player] works absolutely fine. What am I missing? //U2-U6 Variable Names assigned to AI Player Group Members. private _units = [U2,U3,U4,U5,U6]; //private _units = units player; private _mags = magazines player; _logger = format ["PLAYER || %1", _mags]; hint _logger; sleep 5; { private _mags = magazines _x; _logger = format ["%1 || %2", _x, _mags]; hint _logger; sleep 5; } foreach _units; hint ""; Thanks. Regards, Scott
  15. Hi Thomas, Thanks so much. Bingo. Bad test units. I had units where I used the ACE Arsenal to empty all containers via the "trashcan" icon for my testing - - - however - - - I knew they didn't have magazines - so I went back into ACE Arsenal and added magazines. Apparently - this doesn't work and these units appear broken. After your feedback - I added a fresh unit to my test - untouched by the ACE Arsenal - works like a champ. Spent hours on this issue. A fresh set of eyes is always helpful - much appreciated. Regards, Scott
  16. scottb613

    Simple Rearm Script

    Hi @thy_ Thanks - it always helps to see how others do it. Let me go over this and see if I can figure it out. I've seen the following done before - but - I'm not exactly sure what it's doing. I assume it's reading some master config file for Arma. I'll look deeper into this as well. Thank You! 😉 Regards, Scott
  17. scottb613

    String Comparisons

    Hi Pierre, EXCELLENT - that was the piece of the puzzle that had me stalled on completing this script - I didn't know how to find the respective magazines for each weapon. Thanks! Regards, Scott
  18. Hi Folks, Working on a simple script where I want to redistribute remaining mags among team members - after a firefight - as I would expect would happen in real life. I plan to count all the primary weapon magazines and distribute the remaining evenly among respective weapon users. I haven't figured out how to handle a unit that may have different types of magazines for their primary weapon - yet. It's been a while since I've done any heavy Arma scripts. What am I doing wrong? I simply want to count the remaining mags of the primary weapon. The string comparison never increments the counter. I tried making both a STR. I looked at each value and the array element includes brackets and quotes which is probably the cause. _priWeap = primaryWeapon player; _priMag = primaryWeaponMagazine player; _magsArr = magazines player; _cntMags = count _magsArr; _logger = format ["%1 Mags",_cntMags]; //hint _logger; _cnt1 = 0; { if (_x == _priMag) then { _cnt1 = _cnt1 + 1; }; } forEach _magsArr; _logger = format ["%1 Mags",_cnt1]; hint _logger; Thanks. Regards, Scott
  19. scottb613

    String Comparisons

    Thanks for the explanation - let me give that a try. It's amazing how much time you can spend attempting to overcome a simple hurdle. Regards, Scott
  20. Hi Folks, By default - most AI driven vehicles seem to be racing around at cartoon like speeds. Has anyone made a mod to limit the speed on all AI driven vehicles for a given scenario? If not - how would I find all the ground vehicles in any scenario to impart said speed restrictions? I guess I would need to leave the script running for the duration to control newly spawned vehicles as well. This is really for missions ran by ALiVE or Drongo's Map Population... Thanks. Regards, Scott
  21. Hi Folks, Thanks so much - yeah - I've used limitSpeed before - the thing I'm uncertain about is identifying ALL ground vehicles - in a given mission - to apply limitSpeed to... Regards, Scott
  22. scottb613

    AI use of Launchers?

    Please Disregard...
  23. Hi Folks, Hah - looking forward to getting some time to try this. You make some great missions there - sir. I can't get enough of SOG. A-n-t-i-c-a-p-a-t-i-o-n... Regards, Scott
  24. scottb613

    Arma 3 Notepad++ Syntax Highlighting

    Hi Folks, Why thank you kindly... Regards, Scott
×