| 07-29-2006, 02:27 AM | #1 |
I had a trigger in my aos map telling spawned creeps to "stay on target" every 8 seconds to prevent them from running off to Timbuktu chasing heros or whatnot. But that was causing some weird lag, so I disabled it. But now the creeps will not give up chasing a hero, no matter how far you get away from them. Is there some way make sure that they give up chasing when they lose sight or something? I am not putting this in the Triggers forum because I am hoping it can be done without them. But incase you think that my trigger should have been fine here it is. Trigger: and JASS:function AttackMoveToDest takes unit u returns nothing call GroupRemoveUnitSimple( u, udg_Units ) call IssuePointOrderLoc( u, "attack", GetAttachedLocation(u, "dest") ) call GroupAddUnitSimple( u, udg_Units ) endfunction "Units" is the group that all the creeps go in. The attached variable "dest" is the next waypoint for the unit. |
| 07-29-2006, 08:06 AM | #2 |
Try some non laggy periodic timers every 2 seconds or so, and use a IsUnitInRange condition, if the range is too high, order it to attack move to wherever. |
| 07-29-2006, 12:06 PM | #3 |
You can't use a range check because you can't get the unit they are chasing. I see no reason that your original trigger would be lagging, unless you had way too many units, although it does leak. |
| 07-29-2006, 07:55 PM | #4 |
Where does that trigger leak? And actually it isn't really lag. What happens is all the creeps stop walking for about 1 second every time the trigger fires. And I also think it was causing controllable units (ie. your hero) to ignore orders occasionally, which makes no sense. I guess if there is no non-trigger solution this thread could be moved, although I did get some interesting behaviour when I changed the creep guard settings in the gameplay constants (the creep spawns are neutral extra and victim). Maybe I should experiment further with that... Update: I solved the relentless creeps issue by periodically taking all creeps near all heroes setting their aquisition range to 0, running the AttackMoveToDest function on them and then resetting their aquisition range! I would still like to know how my triggers are leaking though, blu_da_noob. |
| 07-30-2006, 01:40 PM | #5 |
Doesn't leak. Sorry, wasn't looking clearly the first time >.<. How many units are in the group usually? |
| 07-31-2006, 05:08 PM | #6 |
OK. You mean how many spawned creeps are usually on the map at once? I would say about 100. The problem still isn't totally solved actually. If the hero teleports away while there are units chasing him then those units won't be near the hero when the trigger fires and they will just keep marching towards the hero even if he is on the other side of the map. Is that normal? I haven't noticed such a problem on other maps, I don't get it. |
| 08-01-2006, 02:15 PM | #7 |
I'd still like to know what people have to say about this problem. "If the hero teleports away while there are units chasing him... they will just keep marching towards the hero even if he is on the other side of the map. Is that normal?" |
