| 02-16-2006, 12:20 AM | #2 |
I see no leak, are you certain it's this trigger's fault? |
| 02-16-2006, 02:02 AM | #3 |
Make sure you are not destroying DiseaseCloud when it is already destroyed. |
| 02-16-2006, 03:30 AM | #4 |
Oddly enough, as soon as the paladin steps off of blight the lag is completely gone, so that rules out memory leaks. But I'm still stumped as to what's causing it. Ive tried disabling every trigger other than this and it still lags, so theres no interference by other triggers. |
| 02-16-2006, 04:05 AM | #5 |
Does temppoint leak? Would be inconsequential though. Try removing the lines one by one and testing which line specifically causes lag. I've a feeling it might be the condition "tempoint is blighted" |
| 02-16-2006, 10:00 AM | #6 |
I know the problem. Every second you are destroying and then recreating a special effect. What do you think could POSSIBLY be causing the lag...? Go back to basics with this one. No leak. |
| 02-16-2006, 10:19 AM | #7 | |
Quote:
--- Could you read my post again? It seems there is a risk to attempt to destroy the effect after it was destroyed or if it is not set yet, doing stuff like this causes undefined code |
| 02-16-2006, 10:57 AM | #8 |
But he says there's no lag when the paladin gets off blight, and that's the only case when the trigger tries to destroy a non-existing effect. |
| 02-16-2006, 10:59 AM | #9 |
then there is no explanation besides that you were using a giantic model with thousands of polys (which is not the case) or your video card is really bad. Sure there isn't anything else out there? |
| 02-16-2006, 11:00 AM | #10 |
There is nothing that can possibly lag all that much there, except the destruction of inexistant special effect. However, the weird thing is that you destroy an inexistant special effect on every trigger run, regardless of whether the unit is on blighted ground or not. You can check whether a special effect is initialised or not by writing "if TempPoint==null" custom text i think. |
| 02-16-2006, 11:01 AM | #11 |
But when he is on blight it will try to destroy an effect first too, that effect could have been destroyed while he was away from the blight. |
| 02-16-2006, 11:35 AM | #13 |
So, what do we know: 1) Only happens when this trigger is on. 2) Only happens while on blight. Therefore: Unit - Set life of Paladin 0029 <gen> to ((Life of Paladin 0029 <gen>) - 10.00) Special Effect - Create a special effect attached to the origin of Paladin 0029 <gen> using Abilities\Spells\Undead\PlagueCloud\PlagueCloudCaster.mdl Set DiseaseCloud = (Last created special effect) Somewhere there, logically. Well, it can't be the simple changing of the life, it can't be the setting of the variable... Of course, the real question is this - why destroy it, when it is attached to the Paladin? It will follow him. Only destroy it if he has it, and he is not on blight, and then only make it if he doesn't have it, and he is on blight. |
| 02-16-2006, 11:58 AM | #14 |
It makes sense that the problem would have to be in the "then - actions", but creating a special effect should not be the cause of lag either. Creating handle objects only lags with objects that have graphics/abilities (doodads, units, special effects) because it takes time to load them, but only for the first time; after that, the graphics are already in the memory and it shouldn't lag anymore. The fact that this lags continiously would suggest that perhaps the disease cloud effect is de-loaded once the only object using it is destroyed, but that's really wierd. :/ To test this, try creating a special effect with the same model somewhere when the map starts and see if your trigger still lags afterwards. |
| 02-16-2006, 12:25 PM | #15 |
It seems to be in the destroying of the non-existant special effect, as Vexorian said. Even on a blank map, creating an effect once then destroying it constantly was giving me some chopiness. So use the code posted by RaeVanMorloc, it seems to clear it up. |
