Scripting question. Solved...I figured it out then I felt like an idoit...becuase it was so simple....
by Bryan Mackenzie · in Torque Game Builder · 07/28/2009 (3:47 pm) · 2 replies
Ok so I have add movement to the character. I have left, right, up and down functions. Now I want to make the character turn in the direction of the movement. I add the following to the move left function:
$Player.setFlipX(true);
Now it works fine, but when I turn the character in the other direction (Right) it does not face that direction. So once the player moves the character left it faces that direction but moving right after that does not turn the character in that direction.
I've tried adding the line into the right function, but it does not work.
Thank you for your help in advance,
BAM
Solved: I added the following line to the right function:
$Player.setFlipX(false);
Then like magic it worked.
$Player.setFlipX(true);
Now it works fine, but when I turn the character in the other direction (Right) it does not face that direction. So once the player moves the character left it faces that direction but moving right after that does not turn the character in that direction.
I've tried adding the line into the right function, but it does not work.
Thank you for your help in advance,
BAM
Solved: I added the following line to the right function:
$Player.setFlipX(false);
Then like magic it worked.
#2
Thank you for your time,
BAM
07/28/2009 (6:29 pm)
It worked I posted this, then about two seconds later it click. I left this up just inCase someone has the same problem. Thank you for your time,
BAM
Associate Phillip O'Shea
Violent Tulip