View Single Post
  #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