Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Keys (https://forums.graalonline.com/forums/showthread.php?t=65450)

Bl0nkt 04-17-2006 04:53 AM

Keys
 
Well, I don't think keydown2 and keycode are all I need to know for dealing with pushing keys. I'm trying to do something where as you hold down f, it shows an animation, but if you release f, it shows another. I'm just looking for the right way to do this.

ApothiX 04-19-2006 02:22 PM

PHP Code:

if(created) {
  
timeout 0.05;
}

if(
timeout) {
  if(
keydown2(keycode(f), false) || keydown2(keycode(F), false)) {
    
// Play Animation One
  
} else {
    
// Play Animation Two
  
}

  
timeout 0.05;


Something like that? Not sure if that's the correct usage of keycode() though.

Yen 04-19-2006 05:11 PM

keydown2(keycode,ignorecase);

When ignorecase is false, it only takes that exact key.
When ignorecase is true, it takes any variation of that key (f, f+shift, f+ctrl)

ApothiX 04-20-2006 02:11 PM

Ah, my bad. Wasn't thinking when I wrote that example x_x


All times are GMT +2. The time now is 03:17 AM.

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