Game Development Community

Parsing .getPosition() results

by Jason McIntosh · in Torque Game Builder · 02/28/2005 (11:19 am) · 2 replies

I'm probably having yet another "doh!" moment (I can't keep track of them all now), but how do I get results from a .getPosition() call into an X and Y variable? Is there a function to tokenize a string into an array with a regular expression or something?

*digging back into scripting docs*

#1
02/28/2005 (11:20 am)
%position = %obj.getPosition();
%x = getWord(%position,0);
%y = getWord(%position,1);
#2
02/28/2005 (11:25 am)
Ah, so that literally means word! :) I was thinking it meant one half of a 32-bit integer (2 words wide).

DOH! (I wish I could make the font huge, as this deserves it for sure.)