Graal Forums

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

Angel_Light 10-06-2007 06:36 AM

just curious
 
On my ti calc I can simple do x+(k=24)+(k=26)->x so could I do this in GS2?

PHP Code:

function onKeyPressedcodechar
{

  
code;

  
player.+= ( == 39) - ( == 37);
  
player.+= ( == 40) - ( == 38);



which mean if "k" equals 37 it would be true or in binary 1 and not 0 and so on and so forth.

Tolnaftate2004 10-06-2007 06:40 AM

Sure, why not.

DustyPorViva 10-06-2007 07:42 AM

Best bet is to try it out and see.
If not, post it to the ideas section, I like it.

napo_p2p 10-06-2007 07:53 PM

Yes, you can do that.

Zanzel 10-08-2007 12:24 PM

Don't see why you shouldn't try :p

coreys 10-08-2007 05:29 PM

Yeah, you can do condition checks in parenthesis, and it'll return 1 or 0.

Kyranki 10-08-2007 07:26 PM

Interesting.

Googi 10-09-2007 05:23 AM

Even in GS1 you could do this.

Zanzel 10-09-2007 07:22 AM

really :o ?
I didnt think you could much in gs1 :p
well, as much as you can in gs2 anyway.

Angel_Light 10-09-2007 01:54 PM

http://forums.graalonline.com/forums...69#post1351369

zokemon 10-09-2007 06:14 PM

I actually prefer coding like this and almost always do as it usually shortens the number of lines you have to use and fits your algorithms in a nice package.


All times are GMT +2. The time now is 10:57 PM.

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