Jump to content

[RELEASE] Random Loot Crates v1.25


Darth_Rogue

Recommended Posts

I'd start the discussion over on his thread and see where that takes you.

 

Make a post and i'll see what i can do :)

 

However, my reply is for your crates Darth, for some reason they ignore the height :unsure: position is right but no matter what height i choose they spawn on the ground.

Any ideas why ?

 

But and this is strange, if i set smokeNearCrate to true it spawns on the right height, I just get a smoking wreck with it :lol: not helpful when i want to hide the crate on a roof though.

Link to comment
Share on other sites

Just a quick request on this one, is it posoble when the crate spawns for it to create a marker on the map? Kinda like the containers that spawn on the coast? I would prefer to have a 100m radius marker on the crate location that has a low opacity so you are not 100% where the crate spawns. :)

Link to comment
Share on other sites

I'm not sure how you're trying to get this to work with Richie's script.  The crate spawner requires coords to be entered into an array so it knows where to place the crates.  In order for what you're trying to do to work you'd have to have Richie's heli crash script pick the coords then somehow pass them to the crate spawner, which would mean that you would have to guarantee that the crash spawner runs first before the crate spawner every time, which would be quite difficult if not impossible.  I'd have to think about it but it seems at first glance that you would be better off to include a call to the fn_crate_spawner file in Richie's heli crash spawner PBO and call it as part of the heli crash process.  And even then you still have to pass the coords from one to the other, otherwise the crate script will have no way to know where to spawn the crates.  

I have added a global variable to Richies HeliCrash spawner with which you can record the locations of the crashes for some other purpose, such as to insure that missions spawn elsewhere, or to help with situations where you would like to spawn AI at the locations of the the crashes in situations where they are spawned before A3EAI has loaded.

 

 

Somewhere near the top add this:

DBD_HeliCrashSites = [];

 

I added this:

_CrashName = format ["Crashsite_%1",_j];  // From the code by second_coming for setting up spawns at crash sites using A3EAI

DBD_HeliCrashSites = DBD_HeliCrashSites + [[_posOfCrash,_CrashName]];

 

under this:

 

_posOfCrash = [_spawnCenter,_min,_max,_mindist,_water,20,_shoremode] call BIS_fnc_findSafePos; // find a random loc

Link to comment
Share on other sites

I cant get this ti work :(

 

All I did was change the coordinates for the bottom set on of the 4 for Altis.. as follows.

 

[[12442.4,15203.8,74.0492],0]

 

.rpt shows everything loaded... 

 

I got the coordinates by dropping into the editor and reading them off from the bottom of the 2D map.... that should be correct right?

 

Thanks in advance for any assistance.

Link to comment
Share on other sites

Hey buddy, this section in your fn_random_crateLoot.sqf

 

/////////////           _lootBoxes = [];                  /////////     

 

If i make it say _lootBoxes = ["10"];

This means that it will choose 10 box locations out of the locations for my map and spawn them?

Just want to check what this means, I would like to have area's where random loot boxes spawn each restart, and to hide them all over in that area, so players have to travel there after restart and check every spot they can for a loot box.

 

Example, have a marker on the map, 500m radius, which means it is a loot box area. have 3-4 of these on the map. I go and create 200+ locations that the boxes can possibly spawn on the map in those area's, the script will then grab 10 out of those 200+ places on restart and place a box there. Just a sorta fun idea that will happen on each restart, but having a large amount of possible locations means the players will always be searching the area, instead of always knowing where the box will spawn.

Link to comment
Share on other sites

It won't work that way with the current code.  The _lootBoxes array is meant to house a set of coordinates where crates can spawn.  That being said, with a little bit of work it could probably be set to randomly pick a set of 10 different coords from a group of say, 20 sets and randomly spawn the crates around the map at those locations.  That would make for a good treasure hunt event or something.  I may look at that at some point as an option.  

Link to comment
Share on other sites

Hey buddy, this section in your fn_random_crateLoot.sqf

 

/////////////           _lootBoxes = [];                  /////////     

 

If i make it say _lootBoxes = ["10"];

This means that it will choose 10 box locations out of the locations for my map and spawn them?

Just want to check what this means, I would like to have area's where random loot boxes spawn each restart, and to hide them all over in that area, so players have to travel there after restart and check every spot they can for a loot box.

 

Example, have a marker on the map, 500m radius, which means it is a loot box area. have 3-4 of these on the map. I go and create 200+ locations that the boxes can possibly spawn on the map in those area's, the script will then grab 10 out of those 200+ places on restart and place a box there. Just a sorta fun idea that will happen on each restart, but having a large amount of possible locations means the players will always be searching the area, instead of always knowing where the box will spawn.

 

@MechDan, I modified the script for our servers with just this in mind. Feel free to PM me if you would like an example.

 

Darth, I would be happy to send what I did to you as well to be shared with the community more broadly. I can PM you with a link to what we are using if you would like to take a look.

Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×
×
  • Create New...