HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Lagg spike when building hero

05-10-2007, 09:29 AM#1
IVIajinSCV
Map: A map with up to 8 players where you have to train your own hero at an altar.

Problem:
When map starts you have to build a hero. When doing that, a lagspike about 1second appears. So if there 8 players, the will be 8 lagg spikes, all of the guys building the hero.

question: What to do to fix this? simply live with this or is there another way?
05-10-2007, 09:40 AM#2
Earth-Fury
thats probobly from abilitys loading. pre-place all your heros on the map and remove them at map initialization, and see if that helps.
05-10-2007, 11:07 AM#3
Toink
Map loading will load all of the pre-placed units' abilities and etc,. So loading time would increase.

Try doing this :

Trigger:
No More Lag?
Collapse Events
Time - Elapsed game time is 0.00 seconds
Conditions
Collapse Actions
Cinematic - Disable user control for (All players)
Wait 5.00 seconds
Cinematic - Enable user control for (All players)

What it does is disable all players control for 5 seconds, think of it as a period of time to "relax" a bit. So after they have control again it won't lag as much.

Great lag usually occurs at the very start of a map. So try not do many things at that time.
05-10-2007, 12:06 PM#4
IVIajinSCV
I already got an initializion forced wait of 8 seconds.
so its the best way to create and remove all the used heroes within that waittime?

like:
free hand trigger:

Event:
0.01 second elapsed of gametime
Condition:
Actions:
Diseable usercontroll - all players
Unit - create 1 hero1 for player 12
Unit - remove last created unit
Unit - Create 1 hero2 for player 12
Unit - remove last created unit
Wait 5 sec
Enable usercontroll all players


like something?
05-10-2007, 12:15 PM#5
Toink
Oh so you create units. I thought each player would have to manually choose.

Anyways, don't do many things at the very start. Alot of people don't have nuclear powered pcs, so the start may be laggy. So what you should do is create the units after 5 seconds or so.
05-10-2007, 12:23 PM#6
IVIajinSCV
Quote:
Originally Posted by Toink
... . I thought each player would have to manually choose.

that s true, every player has an altar. so that player can select his own hero while game is started. some player do buy a hero directly at begin (after 8 seconds) and some players are lazy and build their hero later, mayb after 20 or 30 secs of playing. But exactly when the hero pops out of an altar, the game lags 1 second. i want to prevent this. Im i clear enough now?, my english is crap but ill try my best to explain whats happening.
05-10-2007, 01:42 PM#7
Toink
If that's the case do what Earth-Fury said.

Sometimes, lag can't be avoided though.
05-10-2007, 01:50 PM#8
IVIajinSCV
thank you all, it works a little!