Thread: Matrix?
View Single Post
  #2  
Old 01-21-2003, 04:26 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Re: Matrix?

Quote:
Originally posted by HoudiniMan
I'm making a little game based on "DDR". For those unfamiliar with it you hit buttons coodinated with shapes that rise towards the top of the screen and you try to time it right...

Is there a way i could use a matrix or some other type of thing so that if i had say, 3 shapes to pick from i could organize it this way:

1=there 0=not there

0,1,0
0,0,0
0,0,0
0,1,1
0,0,0
1,0,0
0,0,0
1,0,1
1,1,0


etc...
i could use a string for each... but what would be the easiest way for the npc to interact with it and to put a shape there when needed by reading it? (also, i would want it to read 1 whole set of 3 at once)
you could do
for(i=0;i<arraylen(this.array);i+=3){
this.shape1 = this.array[i];
this.shape2 = this.array[i+1];
this.shape3 = this.array[i+2];
}
o_O
Reply With Quote