Thread: keydown2
View Single Post
  #21  
Old 02-16-2008, 01:47 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by Chompy View Post
Err, I just remembered why I lower cased the key.. I made the battle system on symp.. err 5-6 months ago? Anyways, I thought that the event would return "s" and "S". So using
PHP Code:
switch(key) {
  case 
"s":
  break;
  case 
"S":
  break;

Would be unnecesary so I just lowercased the key so I would only need the "s" part..

But back then I didn't check if it returned "s" and "S", I just added it because I thought the event would return "s" and "S"..
If it returns "s" and "S", doing the following is probably easier:

PHP Code:
switch (key) {
  case 
"s":
  case 
"S":
    
//stuff
  
break;

Reply With Quote