HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

call RemoveLocation( udg_Point[IntegerB] ) ???

05-05-2007, 01:55 PM#1
evilmapcreater
in my trigger i set point(integerB) to something (integer B is 1-360)
and if i dont remove the location it will lag like crazy
i tried this custom script:
call RemoveLocation( udg_Point[IntegerB] )
but did not work...
i also tried
call RemoveLocation( udg_Point[1-360] )
and it accepted it, but it lagged like hell in game when i tested...
what should i do?
05-05-2007, 02:10 PM#2
The)TideHunter(
Quote:
Originally Posted by evilmapcreater
in my trigger i set point(integerB) to something (integer B is 1-360)
and if i dont remove the location it will lag like crazy
i tried this custom script:
call RemoveLocation( udg_Point[IntegerB] )
but did not work...
i also tried
call RemoveLocation( udg_Point[1-360] )
and it accepted it, but it lagged like hell in game when i tested...
what should i do?

Right.
IntegerB is not a variable, its looking for a name, so once it cant find it, you'l get a error saying Expected a Name.
The real name for Integer B is bj_forLoopBIndex.

And when you typed 1-360, it is calculating the sum, 1-360 which is -359.
The index for udg_Point[-359] doesnt exsist either, so it may either crash or lag looking.
05-05-2007, 10:17 PM#3
Pyrogasm
You need to use GetForLoopIndexB() like so:
Trigger:
Custom script: call RemoveLocation(udg_Point[GetForLoopIndexB()])
05-05-2007, 10:36 PM#4
The)TideHunter(
GetForLoopIndexB() just returns bj_forLoopBIndex.
05-05-2007, 11:40 PM#5
MaD[Lion]
and since thats a function call its slower than using bj_forLoopBIndex.
05-06-2007, 06:29 AM#6
Pyrogasm
It doesn't really matter that much anyway....
05-06-2007, 06:57 AM#7
MaD[Lion]
it doesnt matter for this matter, but it does matter alot performance wise.
Function calls are ultra slow :P And yes, i mean ultra ;)
05-06-2007, 08:26 AM#8
Toadcop
Quote:
Function calls are ultra slow :P And yes, i mean ultra ;)
yes you suck, ultra suck ! =) :rofl:
// delirium... =) ofc it's not true =) "call"s are good enought.