Graal Forums

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

Kristi 01-14-2004 07:21 PM

Quote:

Originally posted by Loriel
Certainly is not more efficient, but I deem it more readable or compact, especially with constructions like this ;)
NPC Code:
  if (static == false && playerfreezetime <= 0) {
setstring this.temp,"idle sit walk carry swim","carrystill carrysit carry carryrun","grab push pull","attack","hurt dead";
tokenize #I(this.temp,this.mode);
setani #t(this.submode),;
setstring this.temp,;
}


well yes in that particular case it seems to be a good choice, but the previous was a binary variable =p
although it seems like in order to have that code, youre assigning both variables somewhere, and you could just setani on the spot =X

napo_p2p 01-16-2004 06:49 AM

Quote:

Originally posted by wonderboysp2p
else if (!keydown(0)) set ani idle,;


i had this but it screws up the walk ani X_X

Dunno if this will work but try adding:
NPC Code:

if (!strequals(#m,walk))



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

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