Thread: Timed Effects
View Single Post
Old 01-21-2009, 07:24 PM   #2
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,729

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

Ah yes, now this is about the size a library of this nature should be.

Although, I see lots of flaws in this method versus Deaod's. Firstly, you are dynamically creating timers for use in your code, which is a thing of the past. You should probably use a flavor of TimerUtils for this library, as it will remove that unnecessary and silly step.

Additionally, this doesn't allow effects to be created after an X second delay from when the function is called. I think that is a useful quantity to have access to in a library such as this.

Finally, I think the mode for calling the code is not as effective as it should be. I recommend the following function form --
Collapse JASS:
call UnitAddTimedEffect("Some_File_Path.mdx", X, Y, DELAY, DURATION)
call UnitAddTimedEffectTarget("Some_File_Path.mdx", SOMEUNIT, DELAY, DURATION)
I think that would be the optimal manner by which to code it for it to fit into jass' syntax structure most effectively.
__________________
Rising_Dusk is offline   Reply With Quote