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