Getting positions????
by Killer Game Studios · in RTS Starter Kit · 04/02/2006 (6:09 am) · 5 replies
Hey guys need some help again,
just want to know if their is a yaw to get the x and y co-ordinates of a character??
i know the %obj.getPosition() call gets the x y and z but it doesnt realy help as i need the thre co-ordinates individualy,
can anyone help???????????
thanks
Ross
just want to know if their is a yaw to get the x and y co-ordinates of a character??
i know the %obj.getPosition() call gets the x y and z but it doesnt realy help as i need the thre co-ordinates individualy,
can anyone help???????????
thanks
Ross
#2
if i have the %player.getPosition(); how do i convert this to its X Y and Z co-ordinates????
thanks man
Ross :)
04/03/2006 (3:26 am)
Thanks man but just exactly how does this work????if i have the %player.getPosition(); how do i convert this to its X Y and Z co-ordinates????
thanks man
Ross :)
#3
if i have the %player.getPosition(); how do i convert this to its X Y and Z co-ordinates????
thanks man
Ross :)
04/03/2006 (3:40 am)
Thanks man but just exactly how does this work????if i have the %player.getPosition(); how do i convert this to its X Y and Z co-ordinates????
thanks man
Ross :)
#4
for y coordinate
04/03/2006 (4:22 am)
It would go a bit like thisfor y coordinate
// Get objects position %pos = %player.getPosition(); // Y is second in the list %y = getword(%pos,2); // Change coordinate %y=%y + 5; setword(%pos,2,%y);
%x = getword(%pos,1); %y = getword(%pos,2); %z = getword(%pos,3);
Torque Owner Johnathan Moore
If you mean getting the 2d cordinate of the unit on the gui I cant help
GetWord(text string, index);
%string = SetWord(text string, index,substitute value);