Graal Forums

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

Yen 01-12-2006 02:12 AM

Conditionals
 
I've got nothing better to do than spam, sooo..

PHP Code:

function onWeaponFired() {
  
this.mx keydown(1) ? -1;
  
this.my keydown(0) ? -1;


Is there any reason why it's always returning the keydowns as false?

CheeToS2 01-12-2006 03:07 AM

It works fine for me (this.mx/y are set to -1 when the key is pressed). Are you holding down the key when you fire the weapon? That is the only way it is going to work.

Yen 01-12-2006 03:48 AM

Yeah, I am. Weird.

JkWhoSaysNi 01-13-2006 03:02 AM

Oh, cool. Diddn't know gscript had a ternary operator :)


All times are GMT +2. The time now is 01:58 AM.

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