Jump to content
  • 0

Fill crate with random items from loot table


READTHESCROLL

Question

5 answers to this question

Recommended Posts

  • 0

It's already been done, all you have to is search and the answer is

 

thats not exactly loot from loot tables, its loot from loot arrays.

 

Same old loot gets boring and I'm getting tired of manually entering class names lol. I think it would be much better for crates to be filled with random items from the loot table. How would I go about doing this? Thanks for any help.

 

i made a custom function personally, but you could use the epoch default function to spawn loot in objects, like this:

[_object_item, _CfgMainTable_class] call EPOCH_serverLootObject;

however, this requires you to define most object you use (if not used by default in epoch) in CfgMainTable or it will most likely only spawn food or nothing at all.

Link to comment
Share on other sites

  • 0

Thanks guys. Yea the main reason is that I have mas weapons in the loots.h already and it would make things 100x better if I didn't have to manually add classnames and end up with extensive lists of items. I am also planning on replacing mas with CUP eventually and would hate to have to redo ALL the crate spawns in my missions. If they pulled from loots.h things would be much better IMO. Would this be somewhat similar to a piece of code that would equip AI with random weapons from the loot table? I'll check VEMF and see if I can learn something there.

Link to comment
Share on other sites

  • 0

Thanks guys. Yea the main reason is that I have mas weapons in the loots.h already and it would make things 100x better if I didn't have to manually add classnames and end up with extensive lists of items. I am also planning on replacing mas with CUP eventually and would hate to have to redo ALL the crate spawns in my missions. If they pulled from loots.h things would be much better IMO. Would this be somewhat similar to a piece of code that would equip AI with random weapons from the loot table? I'll check VEMF and see if I can learn something there.

A3EAI and, I believe, SEM are using this approach with the latest Arma 3 commands. You might check them out as well.

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