Severe lag when picking unit.

Status
Not open for further replies.
Level 20
Joined
Jul 14, 2011
Messages
3,213
I was making a map, but i secrewed up with the terrain, so began making it again: copyed everything from the first one to the second, and started the terrain job... BUT now, someway, and somehow, picking the hero pauses the whole game (with lag, not real pause) =/ and after 3/4 segs, the hero is finally given =/

Why is this happening? (Map attached)

I've noticed it has nothing to do with triggers or else, since the lag is there even with all triggers off =/
 

Attachments

Last edited by a moderator:
Moin moin =)

This lag you talking about comes from the abilities, the hero have immediately. When you remove them, the lag is gone.
Actually I don't have an idea how to prevent this, because even if you add the abilities with the trigger, the lag comes up

Edit: Well I looked to the abilities .. come on each ability has 50 levels * 5 abilities = 250 data immediately <- this cause the lag!! (I set each ability to only 1 level and lag was gone)

Edit 2: Also you have a lot of trigger mistakes - but this is another topic.

Greetings and Peace
Dr. BøøM
 
Thanks!

But there's a reason for that. I want the hero to be able to hold X quantity of skill points. If i set all the skills to lvl 1, the hero is only abe to carry 10 skill points, even if he lvls up and the Skill Points are triggered.

The max lvl is 50, and hero has 5 abilities, so, max skill points available would be 250...

The question is: How can i do this without the lag? :)
 
What you are experiencing is from the abilities being loaded in.

To circumvent this problem, you need to preload those abilities. In order to do this, create a trigger that will spawn a unit (any unit) and have the trigger add the first ability to this unit, then remove the ability from this unit. Repeat adding/removing abilities from this unit until you've done it for all abilities you want to preload. Now, when all abilities have been done, remove this unit.

This is ideally a trigger run at map initialization, doing this should solve your lag.

EDIT:
Keep in mind that doing this means that your map will load slightly slower, since the lag you are experiencing will instead happen as the map loads.
 
Works great, and loading isn't affected that much. I just created/removed the same unit from game on Map Init...

If there's a better way to avoid this problem would be awesome if someone would let us know it.
 
Both the methods given are relatively the same, however, as you get to a larger amount of abilities that you want to preload, it will become best to use the method I explained earlier.
 
Mr Bean, does that way proves to be better than adding/removen via trigger at Map Initialization?... seems similar to me

I just find it easier to do. They're basically the same, just depends. My way has a longer loading time but no delay in-game while loading them. Ameranth has a shorter loading time but delay in-game while the heroes and abilities load.
 
Any trigger activity happening on map initialization will take place as the map is loading, thus it appears to load slower, but when the players enter the game, there will be no delay.

The only exception to this is when trigger actions occur after a wait action placed in a map initialization trigger.
 
Status
Not open for further replies.
Back
Top