| 05-11-2004, 04:08 PM | #1 |
I need help zapping lag in my map. I have a part when, all at once, eight campaign Heroes are created (using a teleport effect) as well as 20 workers. In addition, several more Heroes are un-hidden. For some reason, this seems to lag pretty bad. If it helps, the eight campaign Heroes and 20 workers are AI-controlled. Later on, there is a miniscule delay every time a computer builds a building. That I'd also like to remove. I have tried some things: I've placed every Hero that is created there on the map and removed them in the Initialization trigger; that did help some, but it didn't do any more. I've also put in 'Preload all files listed in' actions for 'scripts\SharedMelee.pld', 'scripts\HumanMelee.pld', etc. That didn't seem to make any difference. What should I do to remove this lag? Is it possible? Thanks in advance! Edit: By lag I mean a delay where the computer seems to freeze for a short period of time. |
| 05-11-2004, 05:13 PM | #2 |
You could try to create those heroes and units one after the other before the point and only unhide them then. |
| 05-11-2004, 05:14 PM | #3 |
Do you have any triggers running when you build the buildings? Placing all the models that you use in the map and kill/removing them on Map Init is a big part; I'm glad to see you're doing that. Unless you've got hefty triggers running on related events, I'm afraid I can't tell what might be lagging you. |
| 05-11-2004, 06:34 PM | #4 | ||
Quote:
Quote:
Edit: I'm not quite sure why this was moved to Trigger Haven. It's possible there's things I can do without triggers to reduce this lag. |
| 05-12-2004, 03:25 AM | #5 |
'cuz TH has whatcha need. Welcome to our world. <don't bother asking...> Anyway, have the units created off the map [dead or hidden] and then instead of creating them, just move them and/or revive the units you want. Give those precreated units to a neutral player if you are worried about a player getting the unit interface or anything related. |
| 05-12-2004, 04:25 AM | #6 |
Get yourself a faster CPU if you cant think of anything. i have a 2400+ Amd Athlon XP myself. |
| 05-12-2004, 02:48 PM | #7 |
Getting myself a faster computer isn't going to solve anything; I'm not the only one who's going to play this map. I just might try that, ThyFlame. Thanks! |
| 05-12-2004, 02:52 PM | #8 |
I would suggest staggering the spawns, every x seconds spawn a few units. |
| 05-12-2004, 02:56 PM | #9 |
Unfortunately, I'm trying to get it to look like a Mass Teleport. That doesn't really work in that case... |
| 05-12-2004, 03:11 PM | #10 |
The staggered spawns will still work, just create the units then hide them with a small wait after each create hide pair. Then when all the units are created you play your mass teleport animation and unhide all the units. This should give you the effect you are looking for |
| 05-12-2004, 04:23 PM | #11 |
All right, I'll give that a shot. Thanks everyone! |
