How can you do borderlands style random weapons and stat generation?
I have been trying to figure out how to make it so that I can have random stats and random parts to create weapons. I am not sure how to do this though. I did not try anything, because I am not sure where to start with this.
Answer by MitchWardle180 · Jun 03, 2015 at 01:14 PM
You could create 2 variables for each stat of the weapon like - maxPower, minPower, maxSpread, minSpread.
Then when you create the weapon you could set the stat to a random number between the minimum and maximum for example you would instantiate the random weapon and set the stats to random number using "Random.Range(min, max)".
Also you could set the stats when the player picks up the weapon using the same method.
Answer by shooshmashta · Nov 03, 2015 at 08:58 PM
You should build a basic gun class with an array for different parts of the gun. In start, randomly pick from a list for every piece and have that effect the gun's name, look, etc. then set up how bullets will look based on the parts of the gun and the stats that came along with it.
Your answer
Follow this Question
Related Questions
Weapons Names And Models Licensing 1 Answer
How can I "maintain" the variables of my randomly generated guns? 0 Answers
How to pass weapon owner name to projectile?, 0 Answers
3rd person weapon equiping 1 Answer
Photon Weapon View 1 Answer