Multiple condition case
Is it possible to make a multiple condition case
I have 3 variables a,b,c and they can all go from 1-3. I want to be able to make a case for every situation possible.
For example :
if a =1, b=1, c=1
trace(1)
if a=2, b=2, c=2
trace(2)
....
I want a condition for every possible situation, but with if`s it takes a lot of code and doesnt look neat. I was wondering if you could use cases to do so.
var a:int = 1-3; (randomized form 1 to 3)
var b:int = 1-3; (randomized form 1 to 3)
var c:int = 1-3; (randomized form 1 to 3)
switch (a,b,c)
{
case (1,1,1):
trace("1")
break;
case (2,2,2)
trace("2")
and every other possible combination....
}
I tried it and it traced 1 when a,b or c was equal to 1, not all three of them at the same time.
Is it possible to do that with cases? If not what would be the easiest way to do trace something for every possible situation?
Thanks
