Animation, States and Input, HELP
by Dave Gilligan · in Torque Game Builder · 11/26/2008 (5:03 pm) · 1 replies
I'm having an issue with TGB.
I can't figure out how to get my character to duck. All I want is for the duck animation to play when I press down. I've been trying to do this forever, but it's not happening, I'm missing something! If you guys could help me out with this, it would open me up to creating more actions and animations, and I would greatly appreciate it! Please, any advice would help!
I can't figure out how to get my character to duck. All I want is for the duck animation to play when I press down. I've been trying to do this forever, but it's not happening, I'm missing something! If you guys could help me out with this, it would open me up to creating more actions and animations, and I would greatly appreciate it! Please, any advice would help!
Torque Owner Dave Gilligan
moveMap.bindCmd(keyboard, "down", "playerDuck();", "");
function playerDuck()
{
$pGuy.duck = true;
}
if(%this.duck == true)
{
%this.playAnimation(playerduck);
}