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

Creating Custom Spells with Dummy Units

Level 3
Joined
Feb 17, 2022
Messages
16
Hey there!

I have been trying to create a custom spell which essentially is like a holy/light nuke using the default Inferno ability and using a peasant unit (With Locust ability) as a dummy unit but each time i cast it, the spell creates a new, permanent peasant unit. This is the case even when I add a generic timer to expire after 3.00 seconds.


is there a way to fix this/prevent the permanent creation of a unit? I followed the trigger setup found in this thread: INcreasing the Size of Special effects

Any help is appreciated :)
 
Level 39
Joined
Feb 27, 2007
Messages
5,016
I believe you can put the object editor into raw input mode (ctrl+d), shift-double-click the field for the unit summoned by Inferno, and simply put 0 there so it summons no unit. Units with locust don't trigger "enters region" events, so it's very hard to know when such a unit is created. There is the "unit spawns a summoned unit" event but the easiest solution is simply to give the summoned unit like 1.00 hp and negative health regen. (Again shift + double click to put in negative values.)

Wait, doesn't the infernal have a duration by default? I think you can just edit its lifetime there. Putting 0 will make it infinite, so just don't do that.
 
Last edited:
Level 3
Joined
Feb 17, 2022
Messages
16
I believe you can put the object editor into raw input mode (ctrl+d), shift-double-click the field for the unit summoned by Inferno, and simply put 0 there so it summons no unit. Units with locust don't trigger "enters region" events, so it's very hard to know when such a unit is created. There is the "unit spawns a summoned unit" event but the easiest solution is simply to give the summoned unit like 1.00 hp and negative health regen. (Again shift + double click to put in negative values.)

Wait, doesn't the infernal have a duration by default? I think you can just edit its lifetime there. Putting 0 will make it infinite, so just don't do that.
Omg thank you! I tested this out and it worked! I think for simplicity, the negative hp regen will do just fine.

Yes, the Infernal does have a default duration and I did make it a 0.1 duration time but it ended up summoning an invisible peasant that was invulnerable lol

Appreciate your help :)
 
Level 3
Joined
Feb 17, 2022
Messages
16
Curious about the Inferno ability tho. If I try to make the Inferno spell a custom spell where it sends down a meteor but not actually let it summon the infernal, how would that be created? I tried to replace the infernal model with a dummy unit with the locust ability and enemies take 0 damage. In fact, the only time it does damage is when the original infernal model is used. I even tried making a dummy inferno model to use as a relacement but the spell does not like being touched!
 
Level 39
Joined
Feb 27, 2007
Messages
5,016
I just mucked with this myself to learn what's going on. The model is not what's important; what's important is the interaction between the fields Data - Impact Delay and Data - Duration. If duration is equal to (!) or less than impact delay (even by 0.001) the summoned unit expires before the impact happens, and since the summoned unit seems to be credited with the damage (not the caster) it can't deal the damage or stun while dead. If you reduce the impact delay you can reduce the lifetime of the summon; the summon can't DO anything during that time anyway so it doesn't really matter. The total lifetime of the summon starts when the spell is cast and is reduced by the impact delay.

Even if the duration field is longer than the impact delay, having the unit kill itself with negative health regen during the impact delay will cause the same behavior.

Finally, this isn't the field that affects stun duration. If you want a stun, great. If you don't, though, it will be impossible to fully remove because setting it to 0 makes it infinite, and stunning units for 0.001s will still interrupt channeled abilities. If this sounds like an issue you may want to base the spell on something else, or dummy cast something creative (like acid bomb onto a hidden unit).
 
Level 3
Joined
Feb 17, 2022
Messages
16
Such a small yet simple detail!

I was able to test it out after your example and it works perfectly. Funny enough, I actually did try the same with acid bomb and cluster rockets but they have this weird curve animation even with the arc at none/0.

Appreciate you so much!
 
Level 39
Joined
Feb 27, 2007
Messages
5,016
The easiest way I can think of to accomplish a delay to match with the inferno hit (which you could then set to Targets Allowed: NONE) is to give Thunderclap or Fan of Knives a cast time and have a dummy unit cast it on the point of impact when the main spell triggers a "starts the effect of an ability" event.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,543
I made a triggered Inferno on here somewhere I just can't seem to find the thread. But yeah, there's a lot of examples of how to do this easily:
Casting Time on War Stomp for example would mimic the effects of Inferno. Then you just need to destroy the trees yourself using Pick Every Destructible.
 
Top