Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-29-2001, 11:04 AM
Cybnext_Design Cybnext_Design is offline
Registered User
Join Date: Jun 2001
Posts: 244
Cybnext_Design is on a distinguished road
Send a message via AIM to Cybnext_Design
keydown

How can i make it so that you cant hold down a key and the action keep going over and over?

Kind of like the sword swing.

You hit 'S' and you swing ur sword, but if you hold it down nothing happens. And you release it and hit it again, and it swings again.

I need this so that i can make something scroll differently, i have tried many ways and here is one of them:

PHP Code:
  //Check for Keydown
    
if (keydown(0)) {
      if (
this.keyd==&& this.fruit<=5) {
        
this.keyd 1;
        
this.fruit++
      }
    }else{
this.keyd 0;}

    if (
keydown(2)) {
      if (
this.keyd==&& this.fruit>=0) {
        
this.keyd 1;
        
this.fruit--;
      }
    }else{
this.keyd 0;} 
__________________
Graal2001 NPC Maker
Frolic Owner
Aim: C Y B N E X T
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:34 PM.


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