I am building a 1v1 map and i want to build a buff pool and before every round player would get 3 options to choose from. Those 3 options would be randomly selected from the buff pool. I do not have experience with coding and ai give me verse codes with ton of errors. Can someone help me or explain me how to make this random buff system?
Hi Ajzberg, Welcome to the Forums.
I first wonder about the nature of your buffs. If they are all buffs that involve different settings that can be achieved through the class designer, then I can imagine a system where the player is presented the option of choosing between 3 different classes out of the larger class pool. (Possibly using ‘Class Selector’ device, but it’s not clear to me if there is a way to programmatically change the ‘Class to Switch to’ option or how the ‘Change Player to Class’ array would be changed via Verse)
Another aspect of this problem is getting 3 random classes to present to the player. Even if you don’t end up using classes, figuring out how to randomly get 3 items out of an array of integers seems like a foundational skill. I think one path would be using the ‘Shuffle’ and then ‘Slice’ functions to randomize the array and “slice” off just the top 3.