Warcraft III resources & community, 2003–2006 · archived

Super Map lag

8 posts
#1

Super Map lag

Hi guys
my map is lagging so much its unplayable.

This started happening after i made the following trigger:

Move Maze
Events
Time - Every 0.01 seconds of game time
Conditions
PauseFinish Equal to False
Actions
For each (Integer B) from 1 to 999, do (Actions)
Loop - Actions
Unit - Move Tree[(Integer B)] instantly to ((Position of Tree[(Integer B)]) offset by 50.00 towards 270.00 degrees)


The problem comes when, at any given time, there will be somewhere between 100 and 1000 'Trees' within Maze.gen :shock:
A snippet of the 'Tree-create' trigger looks like this:

Tree-Create
Events
Conditions
Actions
Unit - Create 1 'Tree' for Neutral Passive at (Center of TreeSpawn1 <gen>) facing 270.00 degrees
Set Tree[TreeNumber] = (Last created unit)
Set TreeNumber = (TreeNumber + 1)

Anyone see why this is lagging? :lol:
More to the point, is there a simple way that i can stop this lagginf quite so badly?

Bort
#2
Every .1 seconds its calculating the location of 999 trees...? That might do it.

Also, what to you have for the event on that second trigger?
#3
The second trigger (tree-create) is run by a different trigger which looks *something* like this:

Event (again, run by other triggers)
Conditions: Game_On equal to True
Actions: Run trigger Treecreate[Random Integer between 1 and 10]

Each Treecreate trigger creates a slightly different pattern which lasts for 6 seconds: so theres no guarantee what pattern will come up next.

But, even though it is calculating the position of each tree.... is there any way to eliminate the lag without changing the effect?

Bort
#4
Running it 100 times a second will surely cause lag
#5
What the heck are you trying to do?
#6
:wink: move trees?

hmm maybe 100 times a second is too much... i'll try it lower, but the lag is such that you could be forgiven for thinking the computer had frozen....

Bort
#7
Dowload We Unlimited and use the Tree models there and use them as a model for a footman, (If you are trying to make a tree move) and just order the footman to move to that point....
#8
hmmm
that does actually sound a lot better than actually move(instantly)-ing the tree... i already got those tree models btw....

hmm... good idea, thankyou ;)

Bort