![]() |
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:
|
Re: Re: keydown
Quote:
|
NPC Code: i think this would work too |
Quote:
That script would just allow you to hold down the key, and that is exactly what i don't want. |
~AlphaFlame~
Using your original method... //Check for Keydown if (keydown(0)) { if (this.keyd1==0 && this.fruit<=5) { this.keyd1 = 1; this.fruit++ } }else{this.keyd1 = 0;} if (keydown(2)) { if (this.keyd2==0 && this.fruit>=0) { this.keyd2 = 1; this.fruit--; } }else{this.keyd2 = 0;} |
Just to let you guys know, it has already been fixed.
So no need to keep posting answers. Kaimetsu, can you delete this thread now? |
Quote:
|
Yeah...well I had the same problem with keydown stuff, but I still don't get how to incorperate arrays like Kaimetsu said...
|
Quote:
|
Umm...ok!
|
| All times are GMT +2. The time now is 03:17 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.