- Home /
Question by
Griffo · Jun 23, 2013 at 04:38 PM ·
arraysmultidimensional arraymultidimensional
create mixed multidimensional array
is it possible to create a mixed multidimensional array, say
public var MusicPlaying : boolean[,] = new boolean[10,10];
but where the firs part of the array is a int and the second a boolean?
Comment
Answer by Eric5h5 · Jun 23, 2013 at 04:42 PM
You can create an Object array (`var foo : Object[,];`), however it's unlikely that's what you really want to do. It would be better if you said what this was actually supposed to do. My guess is that you'd be better off with an array of a custom class.
Erric, say I have 6 clans each with 6 members, tagged as member1, member2 ect .. say I'd like to check member4 in clan 6 to see if his boolean was true so I'd be looking at something like -
public var $$anonymous$$usicPlaying : boolean[6,4] = new boolean[10,10];
I asked something along the same line here but then thought of a multidimensional array.