View Single Post
  #1  
Old 05-29-2007, 06:48 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Strafe [could be used as a shield block]

Well, here's a stafe thing.
HTML Code:
//#CLIENTSIDE
function onCreated()
{
  movement = this;
}

public function onStaticDirection(newDirection)
{
  if (playerDirection != temp.newDirection)
  {
    playerDirection = temp.newDirection;
  }
  if (keydown2(160, true) && playerShield)
  {
    setani("c_shieldblock", "");
    player.dir = playerDirection;
    scheduleevent(0.05, "StaticDirection", playerDirection);
  }
   else
  {
    playerShield = false;
  }
}
How it's called

HTML Code:
//#CLIENTSIDE
function onKeyPressed(letterCode)
{  
  switch(temp.letterCode)
  {
    case 160:
      playerShield = true;
      movement.onStaticDirection(player.dir);
    return true;
  }
}
Advise, make all the keyPressed actions all in one weapon, and then just send it through there
__________________
Reply With Quote