• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Super Map lag

Status
Not open for further replies.
Level 6
Joined
Aug 29, 2004
Messages
159
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
 
Level 6
Joined
Aug 29, 2004
Messages
159
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
 
Level 6
Joined
Aug 29, 2004
Messages
159
: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
 
Level 6
Joined
Aug 29, 2004
Messages
159
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
 
Status
Not open for further replies.
Top