• 🏆 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!

Remove locust swarm while its still active?

Status
Not open for further replies.
Level 9
Joined
May 31, 2010
Messages
366
So I have a rough idea of a spell for a boss in my map, at 75% health I want him to cast a beam from the sky that slowly chases one unit.
I want to use locust swarm as Base ability with 1 created unit and just create special effects to make the beam like effect appear at its position and detect it via trigger to make it deal aoe dmg every x.xx second
Now my question:
Since I don' want the beam to run out I would set the duration pretty high. Now I want the boss to create 2 beams at 50% and 3 beams at 25%.
So I was thinking of removing the old locust ability and make him cast a new one. I think I will have to remove the old beam and let the ability create 2/3 new ones. But would this cause any bugs?

Also a small side question: if u have special effects that will end on their own (like a war stomp special effect for example) do you still need to destroy it to make it not leak or will a special effect like this not cause leaks even if not removed?
 
Level 15
Joined
Mar 25, 2016
Messages
1,327
Yes you still need to destroy them to avoid a leak. Fortunately these effects can mostly (maybe always, not sure) be destroyed at the moment they are created, as they will still play their animation.

Removing locust swarm ability while it is active could cause problems, because the ability summons a unit and removes it at some point. If you remove the abilty, the unit may not be removed, but I don't know how it works exactly. Maybe it acts in a similar way as if the caster dies. There is always the possibility to use a dummy caster with locust swarm and kill that dummy caster, once the beam is no longer needed. This would also make it easier to have 3 beams at 25% without removing the 2 beams from 50%.

Triggering the movement of the beam all by yourself would give you more control about the beam, but is oviously a lot harder to do.
 
Level 9
Joined
May 31, 2010
Messages
366
ah okay, then i need to destroy some special effects now xD thank you :D

i would have to detect and store the summoned unit anyways to create the special effect so i can remove it by trigger too.
yes i think using dummy casters would probably the best actually u r right :D

triggering the movement of the beam would be nice but except for just make the beam base unit right click the target hero idk any better way of doing it :/
 
Status
Not open for further replies.
Top