Prasoc
August 17th, 2006, 13:35
Hi, I was wandering if there was a command to split all of a string into arrays for my game that uses text files to show the level. It is in the format:
0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,
0,0,0,0,2,1,1,1,1,1,1,1,1,1,2,
0,0,0,0,2,1,1,1,1,1,1,1,1,1,2,
0,0,0,0,0,1,1,1,1,1,1,1,1,1,2,
0,0,0,0,2,1,1,1,1,1,1,1,1,1,2,
0,0,0,0,2,2,2,2,2,2,2,2,2,2,2
which "0" is blackness, "1" is wooden flooring and "2" is the wall.
0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,
0,0,0,0,2,1,1,1,1,1,1,1,1,1,2,
0,0,0,0,2,1,1,1,1,1,1,1,1,1,2,
0,0,0,0,0,1,1,1,1,1,1,1,1,1,2,
0,0,0,0,2,1,1,1,1,1,1,1,1,1,2,
0,0,0,0,2,2,2,2,2,2,2,2,2,2,2
which "0" is blackness, "1" is wooden flooring and "2" is the wall.