Thread: keydown()
View Single Post
  #3  
Old 11-21-2002, 11:04 PM
emortylone emortylone is offline
Registered User
Join Date: Apr 2002
Location: Control-NPC
Posts: 834
emortylone is on a distinguished road
You're assuming it as an action. Unlike keypressed, where it calls the action, keydown and keydown2 are best used in a timeout. Generally I do a clientside timeout of .05 and then do it. so:
NPC Code:

if (timeout)
{ if (keydown(0))
{ playery = playery-.1;}
timeout=0.05;
}


I can guarantee you that will work Also, if you're using keydown2 it requires(key,true/false) I believe. So if keydown2(8,true) then it will perform the function. It AGAIN is NOT an action but a function as Kai calls them. To me, everything in an if statement is an action or a non-action. If you can use it like if (playerchats) || if (playertouchsme) kind of stuff, then it's an action. if (strequals(#a,Projectshifter)) however is not. That does not run by itself. hope it helps, enjoy.
---Shifter
__________________
Quote:
*Stefan: it seems sometimes they hire newbie scripters everywhere x-x
*Stefan: scripters are sometimes like people that draw paintings
*Stefan: all that counts is that it looks nice
Reply With Quote