HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Trigger execution speed

08-11-2003, 06:19 PM#1
Telamon
How fast are triggers executed in Warcraft? They are compiled to some kind of bytecode, are they not? Has anyone had problems with them being too slow or laggy (if used on a bnet map)? The reason I ask is that I have all the triggers for my AoS map done, but I see places where my code could be more efficient, but at the cost of a lot of point-and-click coding on my part that I'd rather not go through if it's not worth it.

I'm interesting in a couple of cases in specific:

1. If I have an integer array 100 elements long and I copy it into another integer array, is this going to be too slow (especially online)?

2. How about the "Pick every unit in Region X" command - if region X has 200 units in it, does it matter? I was thinking that if I were writing the network code for Warcraft III, I would probably have the map divided into subregions anyways, so this might not be as slow as it first looks.

3. Are there any triggers that absolutely kill network performance? I want modem users to be able to play my AoS game.

Thanks!
08-11-2003, 07:53 PM#2
Starcraftfreak
There are many factors, which can make triggers slow. I am not the expert about this, I can only tell you some things:
1) Use UMSWE (go to Editing Tools and then look at the Important threads thread, there is a link).
2) In UMSWE there is a trigger for displaying messages to a certain player to avoid net traffic. Additionally in UMSWE you can use GetLocalPlayer() ("Local Player").
3) Test your map to find problems. Without testing you can't do it.
08-11-2003, 08:25 PM#3
dataangel
Not worth it. Chances are you won't notice.
08-11-2003, 11:04 PM#4
Newhydra
1: Probably not unless you're running it every .01 seconds
2: Again probably not, with the same exception
3: No, aside from using getlocalplayer() in the wrong manner and thus causing a disconnect
08-12-2003, 12:57 AM#5
Stold
when they made warcraft 3 they made triggers like wait= then the time to wait till next action but that offten makes lagg so avoid those and your good!!!