So I’m making a game that generates random words, I want these words to add up one another so it can form a random sentence.
if (test <=40)
{
var variable1 = Random.Range(1,3);
if (variable1 == 1)
{
result.text = "variable1_text1";
}
if (variable1 ==2)
{
result.text = "variable1_text2";
}
if (variable ==3)
{
result.text = "variable1_text3";
}
}
if (test > 40)
{
var variable2 = Random.Range(1,2);
if (variable2 == 1)
{
result.text = "variable2_text1";
}
if (variable2 == 2)
{
result.text = "variable2_text2";
}
So when I click the button it outputs “variable1_text2”, when i click on it again i want it adds up “variable2_text1”, so it will be “variable1_text2, variable2_text1”.