- Joined
- Nov 16, 2019
- Messages
- 55
So I've been working a long time on a huge RPG adventure map, and have started using a lot of triggers as well. I think I'm finally getting somewhat of a grip on the trigger-mechanics, however I am not too keen with what triggers that potentially could cause lag-spikes.
Now when I'm testing the map, it starts lagging immensely as soon as I enter combat against any enemy on the map. At all other times, it runs fine. It is only during combat. So hence the question, how do I reduce this lag? And what things cause lagging in custom maps usually? I really need to optimize and fix this, cause the lag-spikes I'm getting makes the map unplayable. (I use version 1.31 btw)
Fx. can triggers with the event: "A unit is attacked" cause a lot of lag during combat, even if conditions have specified only a specific unit or unit-type triggers it? I am well aware that you don't want to many triggers running at the same time, and should therefore turn off/on triggers. But a trigger like the one below here; can it cause lag during combat with all other units that aren't the "Wyvern"?
Also I have say; a demon mini-boss, which happens to be placed multiple places around the map. It has a "Fan Of Knives" ability called Reaping Flames, which also causes a flamestrike underneath each enemy hero when used. I'm using the "A unit finishes casting an ability" event here, and the trigger is turned on always, so does this also interfere in all other combat, despite having specified when to trigger in conditions?
(Just for clarification, the triggers shown work as intended, but if they can be optimized in case they could be causing the spikes, I'd like to hear your suggestions)
If these triggers should be alright, what kind of triggers would cause the most lag during combat? And are there other factors that would cause lag-spikes while fighting?
Now when I'm testing the map, it starts lagging immensely as soon as I enter combat against any enemy on the map. At all other times, it runs fine. It is only during combat. So hence the question, how do I reduce this lag? And what things cause lagging in custom maps usually? I really need to optimize and fix this, cause the lag-spikes I'm getting makes the map unplayable. (I use version 1.31 btw)
Fx. can triggers with the event: "A unit is attacked" cause a lot of lag during combat, even if conditions have specified only a specific unit or unit-type triggers it? I am well aware that you don't want to many triggers running at the same time, and should therefore turn off/on triggers. But a trigger like the one below here; can it cause lag during combat with all other units that aren't the "Wyvern"?
Also I have say; a demon mini-boss, which happens to be placed multiple places around the map. It has a "Fan Of Knives" ability called Reaping Flames, which also causes a flamestrike underneath each enemy hero when used. I'm using the "A unit finishes casting an ability" event here, and the trigger is turned on always, so does this also interfere in all other combat, despite having specified when to trigger in conditions?
(Just for clarification, the triggers shown work as intended, but if they can be optimized in case they could be causing the spikes, I'd like to hear your suggestions)
If these triggers should be alright, what kind of triggers would cause the most lag during combat? And are there other factors that would cause lag-spikes while fighting?
Last edited: