I am working on setting up the logic for generating a weapon with random perks.
I have a data struct that holds the info for the weapon.
The base weapon data is chosen randomly from a data table and stored in the struct.
From there I need to generate four random perks for the weapon. The perks are chosen randomly from a data table the same as the weapon.
The dilemma that I have is I need to be able to check the category of the perk, and if it is the default value of ‘None’ then I need get another random perk.
Every different way I have tried this I end up getting and infinite loop error.
I have attached an image of a stripped down version of what I was trying and this is causing the error.