Jump to content

Making the supply drops more random


Recommended Posts

Right now this is the supply drop event that I'm using: https://www.dropbox.com/s/k9y24k796a88lfx/supply_drop.sqf?dl=0

 

I would like to know if there's a way to make the contents more random. Right now it chooses from a list of predefined items. For example:

 

[
["ItemHatchet_DZE"],
["ItemWoodStairs","ItemWoodStairs","ItemWoodStairs","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks","MortarBucket","CinderBlocks"]
],
There's 10 different lists. What I'd love to see is a list of all possible items, then when the event runs, it picks a random number of each item. The min/max numbers for each type of item would be defined in the script, so I could say, for example, that I want a maximum of 3 toolbelt items, 10 wooden items, 5 cinderblocks, etc.
 
I'm sure this can be done. I just don't know how. Can anyone help me out?
Link to comment
Share on other sites

  • 10 months later...

Currently about to head to sleep, can go into further information tomorrow, but take a look at the DZMS code, I think in scripts/Box.sqf there is such code - dealing with random gear being added to the crates at missions in the script. I've modified that file heavily on my server but original will be cleaner

Link to comment
Share on other sites

Since the supply drop event that I was trying to get this to work with is no longer linked in the OP, it's not going to be much help. A new post would be more appropriate because any "help" at this point will consist of someone telling someone else how to do it with a supply drop mission that may or may not have been the one I was referring to.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...