Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-19-2002, 10:12 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Gani Scripting Problem & fix

There is something in gani scripts which can
slow down the game a lot if used wrong:

never use normal variables as loop counter
like for (i=0; i<2; i++) ...

The problem is that gani scripts are not allowed
to read or change normal variables, only
this. variables. So the i++ will never change i
and the loop will go 10000 times (internal
protection against bad scripters . So better use
for (this.i=0; this.i<2; this.i++) ...

I have seen that problem in some ganis we used
in Graal2002 (torch and lamp) and fixed it, now
some places don't lag so much when walking around
/ entering the level
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 06:33 AM.


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