zagor64bz 1225 Posted September 4, 2019 On 9/4/2019 at 6:35 PM, Grumpy Old Man said: Hey, just saw the PM and gonna post here in case anyone else might want to do the same. You can tweak the detection range in scripts\GOM\functions\GOM_fnc_aircraftLoadoutInit.sqf within GOM_fnc_aircraftLoadoutResourcesCheck line 1687 and within GOM_fnc_updateVehiclesLB line 1952, 50 is default value, adjust this value in both lines to your needs. Cheers Thanks!! Since I'm here... any way to get a blacklist of planes in range? I want the player to be able to change pylons load-outs only to certain planes. Share this post Link to post Share on other sites
zagor64bz 1225 Posted September 10, 2019 Not possible? Share this post Link to post Share on other sites
Grumpy Old Man 3545 Posted September 11, 2019 Sure it's possible, depends on how you want to implement it though. Since you could blacklist either entire vehicle classes, only certain named objects, objects that hold a lockout variable etc. Better to implement it the way you want it to work, there's not really a one in all solution for this. Cheers Share this post Link to post Share on other sites
zagor64bz 1225 Posted September 11, 2019 4 Advanced issues found ▲ 10 hours ago, Grumpy Old Man said: Sure it's possible, depends on how you want to implement it though. ...only certain named objects....objects that hold a lockout variable... Better to implement it the way you want it to work, there's not really a one in all solution for this. Cheers Great news then. Selfishly speaking, the "variable name" and lockout variable will be the ones I'm looking for. Again, thanks a lot for the help, GOM. Share this post Link to post Share on other sites
martinezfg11 334 Posted September 28, 2019 Hi, what's your license? Can I incorporate this into a mod? Share this post Link to post Share on other sites
Grumpy Old Man 3545 Posted September 28, 2019 1 hour ago, martinezfg11 said: Hi, what's your license? Can I incorporate this into a mod? Sure, as long as you give credit and document any changes made to the original files. Cheers 1 Share this post Link to post Share on other sites
Bukain 86 Posted October 5, 2019 Wow this one is great!! Thx me i found this! 1 Share this post Link to post Share on other sites
beeper 10 Posted January 15, 2020 Tried to repair and: https://i.ibb.co/wNq1mVN/1.jpg After I try to repair again, it always says "All repair sources are currently busy" What's wrong? (Really helicopter still damaged) Share this post Link to post Share on other sites
Grumpy Old Man 3545 Posted January 16, 2020 On 1/15/2020 at 10:22 PM, beeper said: Tried to repair and: https://i.ibb.co/wNq1mVN/1.jpg After I try to repair again, it always says "All repair sources are currently busy" What's wrong? (Really helicopter still damaged) Try putting this in the editor console or similar: damage vehicle player Could be the returned value is 0, even when some sub selections of the vehicle are clearly damaged. Can remember running into this with another vehicle once, almost destroyed tyre, damage still returned 0. Judging from a comment on the wiki you can try to replace line 1025 in scripts\GOM\functions\GOM_fnc_aircraftLoadoutInit.sqf with this: _curDamage = getAllHitPointsDamage _veh #2 # (0 max (getAllHitPointsDamage _veh #2 findIf {_x > 0})); Might solve the issue. Edit: fixed wrong snippet, confusion on my part. Cheers Share this post Link to post Share on other sites
beeper 10 Posted January 16, 2020 10 hours ago, Grumpy Old Man said: _curDamage = getHitPointDamage _veh; Script completely stop working after that change May be it needs arguments? "Return current level of damage for a specific Hit Point (specified by its config class)." Share this post Link to post Share on other sites
Grumpy Old Man 3545 Posted January 17, 2020 On 1/16/2020 at 10:37 PM, beeper said: Script completely stop working after that change May be it needs arguments? "Return current level of damage for a specific Hit Point (specified by its config class)." Indeed, disregard that and use _curDamage = getAllHitPointsDamage _veh #2 # (0 max (getAllHitPointsDamage _veh #2 findIf {_x > 0})); instead. Should return the damage amount of the most damaged selection, or 0 if there is no damage. Also edited above post to prevent further confusion, heh. Cheers Share this post Link to post Share on other sites
beeper 10 Posted January 17, 2020 Now working again, but once I have stuck with repair again. It was "hitengine" and "hitavionics" unequal zero, but I have not save whole string. I will try to reproduce and give feedback. Share this post Link to post Share on other sites
beeper 10 Posted January 20, 2020 Looks like script disables menu items (repair, refuel, rearm) for ground vehicles too? They still can be serviced just by standing near source, but will ever these menus back to ground vehicles? Sometime it useful. Share this post Link to post Share on other sites
Grumpy Old Man 3545 Posted January 20, 2020 33 minutes ago, beeper said: Looks like script disables menu items (repair, refuel, rearm) for ground vehicles too? They still can be serviced just by standing near source, but will ever these menus back to ground vehicles? Sometime it useful. It sets ammoCargo/fuelCargo etc. to 0 and replaces that functionality with my own system, since vanilla A3 support vehicles are technically infinite, holding 1*10^12 (yes, that's a 1 followed by 12 zeroes) resources for whatever reason. You can adjust this using either the settings inside GOM_fnc_aircraftLoadoutParameters.sqf or by using setFuelCargo etc. on the vehicles. Cheers 1 Share this post Link to post Share on other sites
7erra 629 Posted January 21, 2020 23 hours ago, Grumpy Old Man said: holding 1*10^12 (yes, that's a 1 followed by 12 zeroes) resources That's interesting 😆. I did the math (for a fuel truck, assuming resources are liters): density(Diesel) = 0.84 g/cm^3 = 840 kg/m^3 volume = 10^12 l = 10^9 m^3 density = mass/volume <=> mass = density * volume mass = 840 kg/m^3 * 10^9 m^3 = 8.4 * 10^11 kg Or one fifth of the world's crude oil production in 2009. 2 Share this post Link to post Share on other sites
beeper 10 Posted January 21, 2020 Stuck again with repair damaged helicopter, getAllHitPointsDamage vehicle player returns: [["hithull","hitengine","hitavionics","hitvrotor","hithrotor","hitengine1","hitengine2","hitmissiles","hitfuel","hitrglass","hitlglass","hitengine3","hitwinch","hittransmission","hitglass1","hitglass2","hitglass3","hitglass4","hitglass5","hitglass6","hitlight","hithydraulics","hitgear","hithstabilizerl1","hithstabilizerr1","hitvstabilizer1","hittail","hitpitottube","hitstaticport","hitstarter1","hitstarter2","hitstarter3","#l svetlo"],["","motor","elektronika","mala vrtule","velka vrtule","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],[0,0.426307,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]] And damage vehicle player returns 0 Share this post Link to post Share on other sites
Grumpy Old Man 3545 Posted January 21, 2020 On 1/21/2020 at 10:39 PM, beeper said: getAllHitPointsDamage vehicle player I guess you missed the edited snippet above, so just in case replace line 1025 in scripts\GOM\functions\GOM_fnc_aircraftLoadoutInit.sqf with: _curDamage = getAllHitPointsDamage _veh #2 # (0 max (getAllHitPointsDamage _veh #2 findIf {_x > 0})); Cheers Share this post Link to post Share on other sites
beeper 10 Posted January 22, 2020 No, I have done these edits. These second edits back script to live, after first edit you provided. All that time I tried to reproduce this glitch, and some time repairs work right, but now I have catch this stuck again, once. If I can catch it again, how can I provide more debug info to solve? Share this post Link to post Share on other sites
Grumpy Old Man 3545 Posted January 22, 2020 44 minutes ago, beeper said: No, I have done these edits. These second edits back script to live, after first edit you provided. All that time I tried to reproduce this glitch, and some time repairs work right, but now I have catch this stuck again, once. If I can catch it again, how can I provide more debug info to solve? Seems odd, getAllHitPointsDamage returns all data needed, unless there's something off with the vehicle (mod I assume?). Can you try with a vanilla chopper and see if it's the same issue? Cheers Share this post Link to post Share on other sites
beeper 10 Posted January 22, 2020 Yes, it's Ka-50 from CUP, you think non vanilla can glitch this way? Share this post Link to post Share on other sites
soolie 189 Posted January 24, 2020 Really love this. I overhauled the UI. Somehow broke the RscEdits and the delete button(i think from adding stuff into your updating code). Here's a video of how it looks. If you like it, it's yours. Especially if you want to fix it 😂 1 Share this post Link to post Share on other sites
Grumpy Old Man 3545 Posted January 24, 2020 On 1/22/2020 at 3:49 PM, beeper said: Yes, it's Ka-50 from CUP, you think non vanilla can glitch this way? Could be, the snippet I posted should return any damage on any hitparts of the vehicle, so not sure why it's not working, would be worth investigating further if vanilla vehicles are also affected. 5 hours ago, soolie said: Really love this. I overhauled the UI. Somehow broke the RscEdits and the delete button(i think from adding stuff into your updating code). Here's a video of how it looks. If you like it, it's yours. Especially if you want to fix it 😂 Nice, I like it, keeps the center of the screen free to observe, heh. Cheers Share this post Link to post Share on other sites
Grumpy Old Man 3545 Posted January 24, 2020 Just did some more testing of the damage stuff: onEachFrame { _veh = test; _part1 = getAllHitPointsDamage _veh # 2; _part2 = getAllHitPointsDamage _veh #2 findIf {_x > 0}; _part3 = getAllHitPointsDamage _veh #2 # (0 max (getAllHitPointsDamage _veh #2 findIf {_x > 0})); hintSilent format ["Hitpoints Damage:\n%1\n\nHitpoint Index:\n%2\n\nReturned Damage:\n%3\n\nVehicle Damage:\n%4",_part1,_part2,_part3,damage _veh]; } This can be used to test certain vehicles for damage, returning a hitpoints damage values array, the index of a damaged hitpoint (-1 if not found), the damage amount of the first found damaged hitpoint (0 if nothing is damaged) and the vehicle damage (which for some reason will return 0 even if a vehicle has some damaged hitpoints). So to return if ANY part of a vehicle has been damaged, the _part3 variable will do, like so: //line 1025 in scripts\GOM\functions\GOM_fnc_aircraftLoadoutInit.sqf _curDamage = getAllHitPointsDamage _veh #2 # (0 max (getAllHitPointsDamage _veh #2 findIf {_x > 0})); This should work, unless there's something odd at play, maybe some .rpt logs might provide further info if it still doesn't work. Cheers Share this post Link to post Share on other sites
beeper 10 Posted January 24, 2020 13 hours ago, soolie said: Really love this. I overhauled the UI. Somehow broke the RscEdits and the delete button(i think from adding stuff into your updating code). Here's a video of how it looks. If you like it, it's yours. Especially if you want to fix it 😂 Can you share this code? 1 Share this post Link to post Share on other sites
soolie 189 Posted January 26, 2020 (edited) On 1/24/2020 at 9:43 AM, beeper said: Can you share this code? http://bit.ly/GomAirLoadoutSoolie Like I said, it's kind of broken. Please share if you fix it. Everything I touched in the functions, I commented. Search for "Soolie" Edited January 26, 2020 by soolie Share this post Link to post Share on other sites