Hmmmm. This opens a different can of worms.
Let's say that I have a player and 3 enemys, all of type t_Tank on a chessboard. If I wanted to store the values of the next five moves they made, I couldn't just use an array of Types, could I? For example, the first array (call it "board_position"), even if it had 5 spaces in it's array, couldn't be stepped through using For-Each, could it.
Here's what I'm thinking:
Would that work?
Let's say that I have a player and 3 enemys, all of type t_Tank on a chessboard. If I wanted to store the values of the next five moves they made, I couldn't just use an array of Types, could I? For example, the first array (call it "board_position"), even if it had 5 spaces in it's array, couldn't be stepped through using For-Each, could it.
Here's what I'm thinking:
const NUM_VEHICLES=4 ;total number of tanks on the screen Type t_board_position ;making the Type to hold the 5 moves on the chessboard Field x,y,z End Type Dim board_position.t_board_position(5) ;sets up the board position holders For tank.t_tank = Each t_tank ;runs through each tank For x=1 to 5 board_position.t_board_position(x) = new t_board_position ;sets up the 5 separate board holdes for each Next Next ;OK, now I'm stuck. How do I know which board_holder to ;use for which tank? Can I just For-Each my way through ;them, or would I First-Next? Something like: board_position.t_board_position = First board_position For tank.t_tank = Each t_tank For num=1 to 5 board_position(num)\x=12 ;whatever I wanted to put in board_position(num)\y=12 board_position(num)\z=12 Next board_position= After board_position Next
Would that work?