Printing a matrix for debugging
by DiegoGdVU · in Torque 2D Beginner · 08/03/2013 (9:46 pm) · 2 replies
Hi im new to Torque2D, i read most of the tutorials and guides and now im trying to build a prototype for a game and i'm having some minor problem, i want to print a matrix on the console.log like this.
11101
10101
01010
11000
The problem is when a print it with echo() it appears like this
1
1
1
0
1
...
You get the idea, this is the code that im using it's part of larger file.
11101
10101
01010
11000
The problem is when a print it with echo() it appears like this
1
1
1
0
1
...
You get the idea, this is the code that im using it's part of larger file.
for(%yi=0; %yi<$size_y; %yi++)
{
for(%xi=0; %xi<$size_x; %xi++)
{
echo($grid[%yi,%xi]);
}
echo("\n");
}
#2
Thanks Mike
08/04/2013 (11:31 am)
Well yea i could do that, i was hoping there were other output functions that made my job easier, but i'm fine with that. Thanks Mike
Associate Mike Lilligreen
Retired T2Der