using System.Collections.Generic;
using System.Collections;
using UnityEngine;
public class PerkCreator : MonoBehaviour
{
public Perks perk;
public int random;
public int currentperks;
public int maxperks;
public bool randombool;
void Start()
{
maxperks = 3;
CreatePerk();
}
public void CreatePerk()
{
for (int i = 0; i < randombool.Length; i++)
{
randombool _= randombool*;*_
int rng = Random.Range(1, 2);
if (rng == 2)
{
randombool = true;
currentperks++;
}
else
{
randombool = false;
}
Debug.Log(“works”);
}
perk = new Perks(perk, randombool[0], randombool[1], randombool[2], randombool[3], randombool[4]);
}
}
I’m trying to roll a number for each number of items in my list. To change the bools on my bonus system. It just rolls once than stops. I’m not sure why.