GetPositionX/Y don't work?
by StickFigs · in Torque Game Builder · 08/10/2007 (6:59 pm) · 2 replies
I'm trying to use this code to set an object's position:
But it keeps telling me I don't have enough parameters for the setPosition and if I echo the $posX and $posY it shows up as blank.
It seems like getPositionX and Y aren't working properly for some reason. Am I using them wrong?
$posX = $pGuy.getPositionX; $posY = $pGuy.getPositionY; $pGuy.setPosition($posX,$posY);
But it keeps telling me I don't have enough parameters for the setPosition and if I echo the $posX and $posY it shows up as blank.
It seems like getPositionX and Y aren't working properly for some reason. Am I using them wrong?
About the author
#2
Whenever you see code like getXXX it is typically a function. Functions require you to add parentheses at the end. So you'll end up with code like getXXX().
11/11/2007 (5:14 pm)
Aun is right. To expand a litte for the newbs...Whenever you see code like getXXX it is typically a function. Functions require you to add parentheses at the end. So you'll end up with code like getXXX().
Torque 3D Owner Aun Taraseina
Aun.