Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > Code Gallery
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 03:55 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.