using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class statroll : MonoBehaviour {
void Start() {
for(int x = 0; x < 20; x++)
{
int str = 0, agi = 0, inte = 0;
int statroll = Random.Range(1,3);
switch (statroll)
{
case 3:
str++;
break;
case 2:
agi++;
break;
case 1:
inte++;
break;
default:
Debug.LogError("Something went wrong, probbably with my Random.Range bounds!");
x--;
break;
}
}
}
}
I’m trying to make a button that rolls your stats, but I’m not sure what to do with this script. I tried attaching to a button, but it doesn’t do anything.