• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Abilites causing lag?

Status
Not open for further replies.
Level 2
Joined
Oct 1, 2012
Messages
26
I have been working on WCIII RPG for some time now. I had just finished making a custom unit, and thought i would test his animations when casting spells, when i was testing, all the spells i cast would lag the game for about 1 second(Freezing the screen for 1 second every time an ability is cast)
I then began to wonder is it only this custom unit that will lag the game? And so i tested them on some pre-made units in the WE, yet the problem continued no matter what unit is casting the spells it would still lag and freeze for 1 second.

I don't know what the problem is.. but i think it could be one of these
1. Do i have too many custom models in my map?
2. do i have too many doodads in my map? (40,000)

I also have a second question.

I have about 100 custom models in the import manager
when placing about 30 of the SAME custom model the file size would be ridiculously big (770mb) but then when i delete just a few, 4-5 the map size drops to 7.60mb?
Keeping in the mind that its the SAME custom model the SAME size the SAME everything, yet deleting only 3-4 out of 30 from my map, makes the file size smaller as if i had deleted 400...

Any help on these 2 problems would be much appreciated, Thanks..
Vex.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
You need to preload that abiliti(es) if that ability consist of 4 levels and higher.
How to preload ?
Simple:
1. Create dummy unit (anywhere on the map)
2. Add all abilities that associated with that unit to that dummy unit
3. Remove the dummy unit

Ta-da you have successfully preloaded abilities - which will lag upon preloading, but won't lag for first cast and later.

If you play DotA, you would realize that it will lag when you pick a Hero, right ?
It actually preloads all abilities associated with that unit when you pick it, so it will lag when preloading, but won't lag for first cast and later.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Hmmm.. If the ability is based on FireStrike or ShadowStrike or some other abilities and you gave "0" values to them, they could freesze the entire game every time you cast them, or even crash Wc3.

If it's triggered, probably the triggers are too heavy for the game to handle everything fast enough.

Else, if it's not preloaded, maybe preloading it as defskull suggested would fix it.

Question: Why would you import the same model more than once? ;)
 
Level 2
Joined
Oct 1, 2012
Messages
26
the spells where normal hero spells like:
Thunder clap
War stomp
Shockwave
etc etc

and sorry but i don't quite understand preloading
if someone could give a link to a tutorial on it, that would be great.
also, its not just the first time the ability is cast, its every time its cast..
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
If it's every time you cast it it's because you set Damage or Duration or Distance to 0 on the ability fields in the Object Editor. Change it to 0.1 and you'll see it works.

Forget about preloading, it's not a Preload issue.

You can also post the map here (Advanced -> Manage Attachments) so we can give a look at it.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Yeah, the preloading should only apply when you have issues like "lag on first cast, but won't lag anymore for later cast".

If judging by your statement, you said every time you cast it, it will lag, well, it's not something to do with preloading at all.
 
Status
Not open for further replies.
Top