Simple scripting question
by James Petruzzi · in Torque Game Builder · 04/26/2007 (10:18 pm) · 2 replies
I'm sure this is completely simple, but how to do you grab one value from a list returned from a function? i'm calling getTileCollision(%tileX, %tileY) and its returning a bunch of values in a string
my code is something like:
%tmp = mainTileMap.getTileCollision(%x, %y);
%tmp then has: active xScale yScale edgeCount x1 y1 x2 y2.. how do i assign just one of those values, namely active, to a variable?
thanks!
my code is something like:
%tmp = mainTileMap.getTileCollision(%x, %y);
%tmp then has: active xScale yScale edgeCount x1 y1 x2 y2.. how do i assign just one of those values, namely active, to a variable?
thanks!
Torque Owner Tetraweb
%tmp = mainTileMap.getTileCollision(%x, %y);
%isactive = getWord(%tmp,0);
%xscale = getWord(%tmp,1);
etc..
G