So I understood the part about how to use a random. But I'm a bit confused with the if statements as I'm used to how simple and easy it is to have a .random in unity be equal to a variable. But I'm not 100% on how to do that here.
All I need is a random:1,6 to be checked in an if statement. I found a lot of different questions from searching and they seem too advanced. Like arrays for example. (I have a limited experience in unity and 0 knowledge of HTML, so please forgive me)
Comments
Now, you haven't really given much detail about what you're trying to accomplish. You mention a random 1–6 and a variable, but that's a bit vague, honestly. In the future, it would be wise to be as specific as possible and give as many details as possible.
That said, here's a simple example of what I think you're looking for: Shown: <<set>> macro, <<if>> macro, random() function, and variables.
Again, that was a simple example. If that's not what you were looking for, then you'll need to give some details about your specific needs.
Sorry for not being clear but I meant feeding a random whole number into a variable. Then checking the variable each time.
Because your current way would involve about 6 times the dice rolls compared to one dice roll being handled over 6 different if statements.
I mean it probably doesn't matter performance wise, but it could lead to luck problems where either 2 or more of the dice rolls match a condition and conflict two actions at the same time or none of the six dice roll the correct number and therefore nothing happens.
I'm not trying to be mean, however, you really should have been able to figure that out from my previous example, as all of the necessary components were there.
Regardless. Try something like the following: Shown (since last time): <<switch>> macro.
It just keeps telling me that it's missing a ( after the argument list which I thought was the (1, 6)
So unless I'm translating it wrong as far as the inner brackets go (which I have tried every possible inner bracket I could think of) then I just don't know.
If your tag is correct, then the following is what you want: There is no translating, that is the exact code you need to enter.
Yes. I was going to write something else but it didn't make sense so without a delete post function I edited my post into something.