Jump to content

Recommended Posts

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

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
 
 
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
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

  • Thanks 1

Share this post


Link to post
Share on other sites

Wow this one is great!! Thx me i found this!

  • Like 1

Share this post


Link to post
Share on other sites
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
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
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

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

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
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

  • Like 1

Share this post


Link to post
Share on other sites
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.

  • Like 2

Share this post


Link to post
Share on other sites

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

 

1.jpg

Share this post


Link to post
Share on other sites
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

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
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

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

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 😂

 

  • Like 1

Share this post


Link to post
Share on other sites
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

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
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?

  • Like 1

Share this post


Link to post
Share on other sites
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 by soolie

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×