HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Question about Generic expiration timer

01-23-2004, 11:07 AM#1
Alakafizz
I searched the FAQs, but i couldnt seem to find anything on this particular action, so ill go ahead and ask here:

I have a channeling spell that for 10 secs in a small area creates specific units, and then destroys the units 1-1.5 secs later.

Are there any drawbacks in using "Unit - Add a X second Generic expiration timer to (Last created unit)", as opposed to storing the unit in a Unit or Unitgroup variable, and then destroying it after said time?

Of course, my question is directed at the lag-issue.


Thanks,
Ala
01-23-2004, 11:14 AM#2
AllPainful
Actually its BETTER to have the generic timers. As "Remove Unit from game" action is the one that causes a mem leak (when you remove units they are stored in memory)
01-23-2004, 11:18 AM#3
Alakafizz
Great, thanks!

I thought of another issue, but with special effects:

Is there any noticable difference between these two solutions?:
1) creating a special effect, storing it in a var, removing it
2) creating a unit with model = special effect, setting a generic expiration timer.

Thanks again :)
01-23-2004, 11:28 AM#4
AllPainful
I do not think their would be a noticable difference between those 2. But I ain't sure on that one.
01-23-2004, 01:01 PM#5
Alakafizz
Hm ok.. but it got me thinking - if you have a a spell like this:
Code:
Spell Start
    Events
        Unit - A unit Begins channeling an ability
    Conditions
        (Ability being cast) Equal to Spell
    Actions
        Trigger - Turn on Spell_Effects <gen>


Spell_Effects
    Events
        Time - Every (Random real number between 0.50 and 0.80) seconds of game time
        Time - Every (Random real number between 1.00 and 1.30) seconds of game time
        Time - Every (Random real number between 1.50 and 1.80) seconds of game time
    Conditions
    Actions
         Some effect


Would you be better off adding these 3 Events with another trigger when the spell is actually learned by a hero, in case it's on a AoS-kinda map, where it's not even certain the hero with this spell will be selected?

Im asking this because of a thread in this forum about triggers that are initially turned off, but will appearently still be checked and thus using mem.. Am i right in that the above mentioned solution would ease the memory usage?

Thanks
Ala