Jump to content
Sign in to follow this  
RS30002

LARs_searchLoot question

Recommended Posts

Hello all, started using this nifty script and it's great for immersion (expanded the items list to make almost every box-y or trash-y object on the map interactable),  just have one problem.

When the items to be searched are over water, let's say a box on a wooden settlement in the middle of the sea, the action fizzles out right at the beginning. Everything works great on solid ground island.

 

Any easy way to solve this maybe?

 

cc: @Larrow

(sry to tag, dont want to be intrusive, but seeing its your script, figured you'd know best)

 

ty for any suggestions in advance

Share this post


Link to post
Share on other sites

Okay, didn't want to revive this, but just had an idea!

 

Is there a way to code the objects through holdaction settings of the object (in the editor)?

In a way that would just mimic loot table of the main script and have none of that nasty lineintersect AGLtoASL yadayadayada (im thinking that's where it goes wrong, tho i did look at the acronyms and one of these should account for water surface, or idk....?

 

I could manually do them, there's like 20 objects on the piers over open water, piece of cake compared to what i otherwise build lol

Share this post


Link to post
Share on other sites

ait nvm, OCD got the better of me

 

the solution is:

LARs_searchPos = getPos _caller;

 

instead of getposATL _caller 

 

Crisis averted lmaoooo

 

PS: sry for spam  

 

#edit: nvm its not working lol, just the action worked, but i dont get the loot window

 

#edit2: idk, tried every getPos and none of it works, would have to somehow put an "overwater check" above that line, idk something like "if overwater LARpos=ASL _caller else LARpos=ATL _caller"

Share this post


Link to post
Share on other sites

yoyoyo happy to report that through the power of pure autism i managed to solve it!  :wine:

 

Had rocks under the settlement, just below the surface of the water, giant 4x scale objects that represented a foundation on which the settlement on stilts stands. 

This *somehow* interfered with the script because when i removed them it all started working, just had to adjust distance.

 

I had to redo things a bit, so now it looks like this and wherever there's rocks below the surface there's no lootable objects on the piers, but that's fine, can work around it.

 

fdfdf.jpg

 

 

*spam over!!!

Share this post


Link to post
Share on other sites

I downloaded @Larrow's SearchLoot mission. In the editor, I placed a wooden pier in the middle of the sea, with the typical "pile of garbage bags" object sitting on it. Everything worked fine. There might be something else in your mission causing your issue.

Share this post


Link to post
Share on other sites
3 hours ago, Harzach said:

I downloaded @Larrow's SearchLoot mission. In the editor, I placed a wooden pier in the middle of the sea, with the typical "pile of garbage bags" object sitting on it. Everything worked fine. There might be something else in your mission causing your issue.

 

Rocks (boulders) just below the lootable objects were the problem. After rearranging them so they aren't directly below it started to work with no issue.

Share this post


Link to post
Share on other sites

I placed a few different rocks of different sizes under the pier with no issue.

Share this post


Link to post
Share on other sites
1 minute ago, Harzach said:

I placed a few different rocks of different sizes under the pier with no issue.

 

 

Good for you i guess, idk what else to say really? I had big problems, couldnt even get the action to work until i set the search distance in settings to 45 meters. idk

Share this post


Link to post
Share on other sites

I'm not bragging, friend. I'm telling you that 

4 hours ago, Harzach said:

There might be something else in your mission causing your issue.

 

Personally, I would take a clean version of the searchLoot system and build a simple test mission to troubleshoot. Or share a version of your mission with the default searchLoot system so others can giver you a fresh perspective.

Share this post


Link to post
Share on other sites
22 minutes ago, Harzach said:

I'm not bragging, friend. I'm telling you that 

 

Personally, I would take a clean version of the searchLoot system and build a simple test mission to troubleshoot. Or share a version of your mission with the default searchLoot system so others can giver you a fresh perspective.

 

 

so i just tested it again and it does not work in this setup on the pic below.

 

depth is 50 meters, box is "Land_vn_drevena_bedna", rock is "Land_BluntRock_monolith" and if its set under the pier like in the pic, the UI loot window appears for quarter of a second then vanishes. If i remove the rock, it works. 

 

idk..i can make a video and upload to youtube but am rly lazy right now tbh. In any case i managed to find a work around, so..all good

 

sfsf.jpg

Share this post


Link to post
Share on other sites

OK, I managed to set up my test mission such that I was seeing your issue (using the default searchLoot.)

 

I changed line 16 in fn_initSearch.sqf:

_searchPos = getPosATL _player;

//change to 

_searchPos = getPos _player;

and everything worked as expected.

 

I'm staying with this because you shouldn't have to employ workarounds that compromise your intent.

 

getPos uses PositionAGLS, so if your waves are high enough, it may throw things off a bit. Though this may only require increasing LARs_searchRadius in LARs_lootSettings.sqf by however high the waves are.

Share this post


Link to post
Share on other sites
5 hours ago, Harzach said:

OK, I managed to set up my test mission such that I was seeing your issue (using the default searchLoot.)

 

I changed line 16 in fn_initSearch.sqf:


_searchPos = getPosATL _player;

//change to 

_searchPos = getPos _player;

and everything worked as expected.

 

I'm staying with this because you shouldn't have to employ workarounds that compromise your intent.

 

getPos uses PositionAGLS, so if your waves are high enough, it may throw things off a bit. Though this may only require increasing LARs_searchRadius in LARs_lootSettings.sqf by however high the waves are.

 

 

Ya, i see. It's working now. Even over the rock.

Did try getpos as the first thing i attempted, but it didn't work both over water (over rock) and over land. The action fizzled out.

That was before "i figured" (had some help from someone on steam) about setting search distance to higher which got me first progress (action working over land and water - even if lootUI didn't display over water yet) so i kinda forgot about getpos thinking it doesnt work and the only way to solve this is just through distance settings and object placement in editor.

Share this post


Link to post
Share on other sites

I was playing around with this some more this morning and it seems that my "fix" isn't a fix at all. With getPos there are cases where the search aborts itself, just as with getPosATL. 

 

I think getPosATL was probably the best option, with your scenario creating an edge case where it fails. We can hope that Larrow will be able to take a look at this and maybe implement a solution. 

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
Sign in to follow this  

×