| 12-24-2006, 08:03 PM | #2 |
maybe it's because you're checking every unit in the entire map twice every 0.25 seconds? you could do this way more efficiently... first of all, 0.25 is more frequent than it needs to be... you should change that to 0.5 or 1. second, there's no need at all to have 2 groups. just remove the condition and find all maps in the playable map area. after that use an if statement to check whether the unit has the buff and act accordingly. even better, on map initialization add every unit in the map into a unitgroup. Then make a trigger that adds units that enter the playable map area to that group. Now you will have a group with every unit in it already and you won't need to create a new one with every iteration of this timer. |
| 12-24-2006, 08:16 PM | #3 |
I have a question, does it only lag the first time, or does it lag every time? If it lags only the first time, you need to preload the ability by making a dummy unit and giving the ability to it (event should be map initialization) and then just remove the unit. |
| 12-24-2006, 08:58 PM | #4 |
May I ask what's the point of this trigger? I mean, after looking at it, every .25 seconds you're adding/removing the skill Elusion. Unless this skill takes place very fast, the interval is too quick. Also, wyrmlord is right (I think). |
| 12-24-2006, 09:24 PM | #5 |
grim001 - im gonna try what you suggested... if i have any trouble i'll post the new trigger on it, thanks. wyrmlord - nope, it just keeps lagging the whole time Anopob - basically its an aura, that adds this skill onto the units around it and i'll try and change the interval |
| 12-24-2006, 09:30 PM | #6 |
You have a boolean expression leak. (Matching Condition) is a boolexpr, and you have to remove them. I'm assuming that it doesn't lag for the first few seconds, correct? |
| 12-24-2006, 09:38 PM | #7 |
Actually, the GUI version of that doesn't leak. The function that is called when you put "units matching..." removes the boolexpr for you. |
| 12-24-2006, 09:45 PM | #8 |
Is your "Elusion" ability that you're adding to the units every 0.25 seconds a stackable ability, like +damage? If so, you're adding it to the same unit(s) multiple times until the buff wears off. If there are SFX with the ability, then this would definitely add up the lag. Get what I'm saying? A unit gains the buff, and then every 0.25 seconds (because it still has that buff) the "Elusion" ability is added to it. These abilities only get removed when the buff is removed, so if the buff lasted for 10 seconds, by the end the "elusion" ability would be on the unit 40 times. Not good. |
| 12-24-2006, 11:00 PM | #9 |
change it to this: every .5 seconds EVERY unit loses the spell then every unit with the buff gains it. |
| 12-25-2006, 12:20 AM | #10 |
After looking at it AGAIN, I noticed some things:
Sorry if I misread anything. |
| 12-25-2006, 06:48 AM | #11 |
For your infomation people who said 0.25 will make it lag, you are wrong. 0.01 wont lag with a trigger twice the size. It something else, it isent the periodic event. |
| 12-25-2006, 08:27 PM | #12 |
What does the ability do? Some abilities(namely ones that add effects/buffs) can be the laggy. |
| 12-25-2006, 08:32 PM | #13 |
Creating and enuming of groups is slow. I'd go with a constant group that has units added when they enter the map, then do if/then/else in a single loop of them, probably on a 1 second timer. |
| 12-25-2006, 09:44 PM | #14 |
The thing is that this ability is constantly adding and re-adding the ability to units with the buff. Like I said, every 0.01 seconds (or whatever), remove the ability from ALL units, then add it to all units with buff. |
| 12-25-2006, 10:29 PM | #15 |
IF that's true, just check the level of the ability, if it is 1, don't add it |
