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!
So, Is there any way to create multiple special effects without creating 5,000 special effect actions for each degree and offset, So how to create multiple effects more effectively, possibly with loops or something?
Set TempPoint = ((Position of (Triggering unit)) offset by (1.00 x (Real((Integer A)))) towards (0.10 x (Real((Integer A)))) degrees)
Special Effect - Create a special effect at TempPoint using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
Custom script: call RemoveLocation(udg_TempPoint)
This will create a special effect at 1 towards 0.1, at 2 toward 0.2, at 3 towards 0.3, etc. for 5000 times. It's over the top, but you get the picture. This ofcourse only works if both the range and the angle change with constant amounts or don't change at all.
you have to do it with a loop, but that only works for one special effect, i u want different effects u have to make a loop for each or simple multiple actions
Both of you are right,,
But dont forget to clear the leaks they make!
Either you destroy them immediately (if they have no animation)
Or you put them in a variable (special effect array)
( set SpEff[Integer A] = last created special effect) )
and destroy AFTER,,
Set TempPoint = ((Position of (Triggering unit)) offset by (1.00 x (Real((Integer A)))) towards (0.10 x (Real((Integer A)))) degrees)
Special Effect - Create a special effect at TempPoint using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
Custom script: call RemoveLocation(udg_TempPoint)
This will create a special effect at 1 towards 0.1, at 2 toward 0.2, at 3 towards 0.3, etc. for 5000 times. It's over the top, but you get the picture. This ofcourse only works if both the range and the angle change with constant amounts or don't change at all.
That will also give 5000 leaks. Store the position of the triggering unit before you run the loop, and then
Set TempPoint = TempPointOnUnit offset by (1.00 x (Real((Integer A)))) towards (0.10 x (Real((Integer A)))) degrees)
Also, destroy the TempPointOnUnit at the end of the trigger.
Furthermore, it will probably never create 5000 special effects, since loops in wc3 has a threshold of amount of loops at the same time. You could add a wait after each lap, but it is not suggested since it would create the effects at ~0.27second's intervals.
But well, I forgot where the threshold is, so maybe it wont be any problem if you're lucky.
Okay, Second question... How to create the effects so that they would create ''Circle'' around the caster like in some of the nova spells, Because if you add like 50x degrees and 75 offset to the Loop, it will just create them in like... Line. Not in circles around the caster... Hard to explain. :s
make this
set degree = 0.00
set loc1 = position of caster
for each integer a from 1 to Desired number of effects do actions
loop - actions
create specialeffect @ loc1 offset by desiredoffset towards degree degrees
set degree = degree + (360/desirednumberofeffects)
custom script: call RemoveLocation(udg_Loc1)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.