| 05-05-2007, 01:55 PM | #1 |
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 | |
Quote:
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 |
You need to use GetForLoopIndexB() like so: Trigger: Custom script: call RemoveLocation(udg_Point[GetForLoopIndexB()]) |
| 05-05-2007, 10:36 PM | #4 |
GetForLoopIndexB() just returns bj_forLoopBIndex. |
| 05-05-2007, 11:40 PM | #5 |
and since thats a function call its slower than using bj_forLoopBIndex. |
| 05-06-2007, 06:29 AM | #6 |
It doesn't really matter that much anyway.... |
| 05-06-2007, 06:57 AM | #7 |
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 | |
Quote:
// delirium... =) ofc it's not true =) "call"s are good enought. |
