• 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.

Strange delay when adding an ability

Status
Not open for further replies.
Level 3
Joined
Dec 14, 2008
Messages
41
I made an ability based on Engineering Upgrade that upgrade 4 other abilities, but every time i add the ability in game, the game stops for 1 second (each ability have 4 levels, i think that have something to do). That doesnt happend with basic Engineering Upgrade. Why is that?
 
Last edited:
Level 3
Joined
Dec 14, 2008
Messages
41
Is not a trigger, is just an ability, take a look at the Engineering Upgrade skill in warcraft.
 
Level 3
Joined
Dec 14, 2008
Messages
41
I know maps that have abilities like Engineering Upgrade and works perfectly without any freeze.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,255
It is caused by WC3 loading new data. To lower RAM requirements, WC3 does not load all the data it will use throughout game play at the map start, it loads them as they are needed. Most things in WC3 buffer the loading of data so the data is loaded quite some time before it is needed so it is in no pressure to load it. The delay arrises when something applies pressure for data, which means it needs the data yet it has not been loaded.

This results in a period of time where a model or effect or even spell is missing as it is still being fetched from the hard disc or other backing storage. Some games do not pause for this time period as you can notice by not everything appearing at once or character models suddenly apearing when they should have been visable a while before. WC3 however, as it is multiplayer, pauses (actually comes to a stop more than puases) the game while the data is fetched. After the data is fetched (for all players) it resumes the game as normal. The reason it does this is to stop in multiplayer desyncs arising due to different hardware specs loading the models at different speeds and to overall create a more reliable game engine with fewer factors that vary from PC to PC. Preloading data via triggers reduces this lag, so it might be advisable to do so in your case.

Once data is loaded in WC3, it generally can not be "unloaded" where by it is removed from RAM to reduce RAM usage. This means it should not result in any delay the next time the same opperation is preformed.
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
make a trigger like

Map Initialization
Create Footman for Player 1 Red at <somewhere>
Give it <ability>
Remove that footman
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
then try making a dummy unit and adding it ability and putting it in map
after map starts you remove him (not at initialization lets say after 0.01 or 0.00 seconds)

It HAS TO work Im %100 sure of it
because I had an ability with 49 levels (ya it has to have 49 levels) and it waits about 2 seconds at adding
I used that dummy way and it doesnt wait at all now
 
Level 3
Joined
Dec 14, 2008
Messages
41
Finaly it works!! ^^. I create a dummy heroe and make him learn the basic skills and then all the levels of the one based on Engineering Upgrade, and the freeze is gone now. Thanks for the answers.
 
Status
Not open for further replies.
Top