Author Topic: Can't do this in torque? (multiarrays and such)  (Read 492 times)

Code: [Select]
$DDRP::landpoints[%pxp+%x][%pyp+%y].p = 8;
echo("Z" SPC $DDRP::landpoints[%pxp+%x][%pyp+%y].p);
(worked in C++ so I figured I'd try it)
The above gives me a syntax error so I tried this:

Code: [Select]
$DDRP::landpoints[%pxp+%x].row[%pyp+%y].p = 8;
echo("Z" SPC $DDRP::landpoints[%pxp+%x].row[%pyp+%y].p);

That dosn't give any console errors but in the echo it just returns "Z" and no number.

Can someone tell me how I can do something simular to a meta table in torque?

No you can't do multiple arrays like that, but you can do it like this:
$DDRP::landpoints[%pxp+%x,%pyp+%y] = 8;

No you can't do multiple arrays like that, but you can do it like this:
$DDRP::landpoints[%pxp+%x,%pyp+%y] = 8;
That's pretty much a multiarray though?
It looks like it will work, thanks!