Jump to content
  • 0

How would I?


MechDan

Question

The following is from Darth_Rogue's random loot crate spawn script. People have asked how we would get this script to spawn these loot boxes randomly across the map out of a choice of several different locations. I would assumer it would be in done in this part of this script? 

 

_fn_Run = {
 
private ["_cratePos","_lootType","_counter"];
_counter = 1;
// spawn and load a crate for each location in _lootBoxes
{
 
_cratePos = _x select 0;  // get crate position
_lootType= _x select 1;
[_cratePos, _lootType] call _fn_spawnCrate;
if (_smokeNearCrate) then
{
[_cratePos] call _fn_smokeAtCrate;
};
diag_log format["crateLoot spawning crate %1",_counter];
_counter = _counter + 1;
} forEach _lootBoxes;
 
How would you edit this function so it will only call a random set of classes for the crate positions? limited to whatever number you set it to? For example you have a class set of 50 and only want 25 loot crates to spawn on the map and have the function call these loot crate locations randomly?
 
Hopefully someone can help me/that thread out by comenting on here.
Full credit goes to Darth for this script and the people who helped him put it all together. I am just appealing on the scripting help section so we can get this working in these particular way =D
 
Thanks guys =D
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...