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

[General] Is Locust Swarm still hardcoded to add alternate animation?

Status
Not open for further replies.
Level 12
Joined
Nov 3, 2013
Messages
989
I've got this unit that has locust swarm, and its model also has alternate animations (morph), so whenever it uses Locust Swarm it transforms.

Now this isn't that big of a deal on its own, since I can just remove the "alternate" tag with triggers whenever Locust Swarm is used.

But the issue is that I actually want to use this units alternate form as well, and when Locust Swarm is over it removes the alternate tag even if my unit is morphed.


Now comes the real kicker, Locust Swarm doesn't actually end on it's duration time, but rather when the locusts return to the caster and/or they die, and one thing I noticed is that if you teleport too far away from them they all die and Locust Swarm ends immediately.

So I don't know when Locust Swarm will end, and there doesn't appear to be any event that catches it.



So what I want to know is if there's some way to remove alternate animation tag from Locust Swarm, or if maybe I could make alternate permanent with a trigger so Locust Swarm can't remove it.

I could use a periodic event to constantly add the alternate tag until the transformation is over, but then there could be times when the unit switches back and forth very quickly which I would like to avoid.



I also tried using the event Unit - A unit Spawns a summoned unit but the locusts don't seem to count as summoned units, which is a shame, because this way at least I would have a link connecting the caster to the locusts.



My last resort has been to use the a unit enters a region event to detect when the locusts spawn, but the issue is that there's time between each spawn, so making this MUI is looking to be pretty difficult.

If two or more units use the ability at the same time it would be difficult to detect which locusts belong to which caster, but since the interval is supposed to be the same I can at least give it a shot if there's no better solution.
 
Level 12
Joined
Nov 3, 2013
Messages
989
Why not just have a dummy unit cast locust swarm instead?
Then the lifestealing from locust swarm wouldn't work


Well, I guess I could intentionally damage the dummy unit and then detect when it gets healed and do the same for the caster...
 
Level 6
Joined
Sep 9, 2015
Messages
130
After a bit of research I found a way.
Create a trigger, check when that type of locust unit dies, we will add (or remove depending on model) alternate tag for that Hero.
 
Level 12
Joined
Nov 3, 2013
Messages
989
852558 - target order, points to the hero, locust will "return" to the target
This could be very useful, my main issue is that there's no direct link between the locusts and the caster.
After a bit of research I found a way.
Create a trigger, check when that type of locust unit dies, we will add (or remove depending on model) alternate tag for that Hero.
That's been my plan, but did you get it to work?

Because if I want it to be MUI I need to be able to tell which hero those locusts belong to, and the locusts have an interval between each spawn, so if two units use locust swarm at the same time, how do you know which locust belongs to which caster?
 
Level 6
Joined
Sep 9, 2015
Messages
130
That's been my plan, but did you get it to work?

Because if I want it to be MUI I need to be able to tell which hero those locusts belong to, and the locusts have an interval between each spawn, so if two units use locust swarm at the same time, how do you know which locust belongs to which caster?
In my map, 1 player have only 1 hero, so it very easy to make it MUI.
 
Status
Not open for further replies.
Top