Question by
wizwag · May 09, 2017 at 05:14 PM ·
booleanif-statements
&& if-statement not working
Hello fellow coders,
I'm not sure what I am missing here, but it just doesn't activate the if-statments with the boolean comparison. without them (just the random value) it works.
bool isStackable = true;
int randomProperty = Random.Range(0, 6);
if (randomProperty == 3 && isStackable == true)
{
do stuff then bool isStackable = false; // so it doesn't get chosen again
}
Help would be appreciated!
Comment
Having a similar issue... Did you ever get to solve this??
Your answer
![](https://koobas.hobune.stream/wayback/20220612121642im_/https://answers.unity.com/themes/thub/images/avi.jpg)