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

Passive purge

Status
Not open for further replies.
Level 4
Joined
Sep 2, 2017
Messages
88
Hello, I don't know how to use triggers for stuff that are more complex than "if this do that", and I need to make a passive purge ability, like purge in orb of lightning, only with levels.

I tried making it from lightning orb ability, but it has a lot of bugs.

Can someone help me to make that ability using triggers? :)
 
Level 7
Joined
Feb 10, 2016
Messages
59
Yeah, the orb abilities pretty much don't work for anything but items. I've had to do what you just described with triggers before. You'll need to have a dummy unit that spawns each time you need the purge spell to go off, then have the dummy unit cast the purge. You can do both of those with triggers. So, first things first: Do you know how to make a dummy unit?
 
Level 7
Joined
Feb 10, 2016
Messages
59
As far as dummy units go, I totally don't blame you for that. Most of the tutorials about them, even here on HiveWorkshop, aren't very well written. Instead, I'll talk you through it. As a side note, we need to create the dummy unit before we even start writing the trigger to make it do its job.

So, first things first: What exactly is a dummy unit?
It's a unit that won't interfere with the rest of the game in any way. In other words, it can't be seen, it can't be selected, it can't be killed, it can't be targeted by anything, it won't show up as being in any regions, it won't take any food, etc. As far as anyone who plays the map can tell, this unit was never there in the first place.

How do we do that? Isn't every unit in the game selectable, for instance?
Not quite. With the right combination of abilities and stats, we can make this work. First of all, open up the Object Editor and go into the Units tab. We'll need to create a new unit to be the dummy. Here are the steps to follow:
  1. Create a new unit that is based on a unit which has no attack. A Wisp or a Shade works, but I usually use one of the Campaign-unit villagers instead.
  2. Edit the unit's abilities. The most important ability to give it is called "Locust." Remember the Crypt Lord's ultimate ability, Locust Swarm? It summons, 20 locusts, but none of them can be selected, because the locust unit has the "Locust" ability. Here's what it does:
    1. A unit with Locust can't be selected.
    2. A unit with Locust doesn't count as being anywhere, so it won't show up in "Units in a Region"
    3. A unit with Locust can't be targeted by anything.
    4. A unit with Locust moves as a flying unit, even if it's not supposed to.
    5. A unit with Locust is Walkable. Anything can walk straight through it, like it wasn't even there.
    6. A unit with Locust won't be displayed on the minimap.
  3. I would suggest also giving the dummy unit the "Invulnerable (Neutral)" ability, just in case.
  4. Edit the unit's Art - Animation. Set the "Cast Backswing" and "Cast Point" fields to 0.000. This causes abilities that the dummy casts to fire off instantly, instead of having a brief delay like most units.
  5. Edit the unit's Art - Model File. Anything that doesn't actually show anything will work, but I suggest using the model at the very bottom of the unit list: Zone Indicator. This is one that Blizzard intentionally left blank, so that they could make dummy units.
  6. Edit the unit's Art - Scaling Value. Set it to 1.00, if it's not at that already. Some spell effects will have their sizes adjusted based on this number, so making it 1.00 keeps them at the default value.
  7. Edit the unit's Art - Shadow Image. The dummy should not have a shadow at all, so set it to None, and switch the four numbers below to 0.00 just in case.
  8. Skip down to the Movement section. Set the Speed Base and Turn Rate to 0, and change the Type to None. We don't want the dummy to go anywhere.
  9. Edit the unit's stats. Set its Food Cost and Food Produced to 0, if they weren't at that already. Set its Hit Points Maximum to the biggest number possible, just in case. You probably also want to set the Mana Initial Amount and Mana Maximum to the biggest possible number, but, if your dummy is only going to be casting abilities that you create, you can just have those abilities cost 0.
And, with that, you have your dummy unit. You may have noticed that we didn't add the ability the dummy will be casting to it, but don't worry. We'll add that on the fly with triggers when the time comes.

Do these steps to make your dummy, and reply when you're done, or if you have any questions. I'll give you the next step at that point.
 
Status
Not open for further replies.
Top