Game Modding | Call of Duty: Black Ops 3 | Scripting
Thread By: Wild
Hey, as some of you may or may not know from my last post, I have been learning to script. I have started my next few projects. The next project that I am started involves a random drop system, similar to how the Origins dig site have random drops. Basically what I am asking is in a script how to you make a list of items, have the script only choose one to spawn and have it be random and have the drop/item spawn at a specific point, for example at the origin of the trigger. I would assume for the list of items/drops you would use some sort of array I think and have the script pick 1 of them. So yeah, how do you set up the list, have one item randomly selected and then spawn at the origin of the trigger or a set point. Any help is appreciated! Thanks.
Reply By: Akrime
I'd do something like this. Remember, if you're going to copy & paste this code, you need to set the targetname for your trigger to "droptrigger". If you need to add more drops to the array, just add them behind "part_drop" and seperate them with a blank space like in the code or delete the previous items.