Game Development Community

Punch Kick

by rennie moffat · in Torque Game Builder · 09/17/2009 (1:27 pm) · 1 replies

Hi, I am looking to build a simple 2D scroll where my player can punch and kick. However I have looked through the boards with little to my liking, I was wondering if anyone here has some insight on this.

About the author

My thanks to Garage Games and the Garage Games Community combined with owned determination I got one game up, Temple Racer and I am looking to build more interesting, fun games for the mass market of the iOS app store.


#1
09/17/2009 (1:58 pm)
So far I have this, following the jump sequence of the platformer.


onLevelLoaded
moveMap.bindCmd(keyboard, "m", "playerMalee();", "playerMaleeStop();");

function playerMalee()
{
     if(!$player.punchKick)
     {
          $player.punchKick = true;
     }
}


in the setCurrentAnimation
if (%this.punckKick)
   {
   %this.playAnimation(playerPunchKickAnimation);
   return;
   }


it runs but will not trigger the animation.