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

Cone of Cold

Status
Not open for further replies.
Level 2
Joined
Sep 2, 2017
Messages
8
Hello, I am relatively new to Map Making and when creating spells and abilities I tend to try and stay away as much as I can from triggers, yet I find myself at an impasse.

I want to create a Cone of Cold spell that deals damage in a cone-shape-area in front of the caster AND temporarily slows the movement of enemies caught in the area.

Could someone kindly post a step-by-step instruction of how to do that?

Note : The spell has 5 levels, with every level increase only the damage grows, the area and amount of slow it causes remains constant.
 

Jampion

Code Reviewer
Level 15
Joined
Mar 25, 2016
Messages
1,327
You probably want to use a dummy caster for this.
First you have to determine which units should be affected by the spell.
You create a dummy caster and order it to slow each unit affected by the spell. You also damage these units.

Determining the units can be quite complicated, because you can natively only pick units in circles and rectangles. If you want closer units to be affected earlier this is even more complicated and will most likely be too hard for you, if you are new to triggers.

For the dummy spell you have to decide whether the slow is dispellable. It's also important, that buffs from the same base ability don't stack. So if you would use Cripple as slowing ability, you can't really use the cripple spell as normal ability anymore, because a unit can't be affected by 2 cripples at the same time.
 
Level 11
Joined
Jun 2, 2004
Messages
849
You could use the standard cold slow debuff, used in things like Frost Nova and Frost Attack. To apply it you can have a dummy unit with a 0 damage attack and Frost Attack hit all the units. This will also avoid problems like spell shield blocking the effect, which would happen with cripple/frost nova/etc.
 
Level 2
Joined
Sep 2, 2017
Messages
8
So. First I create an invisible dummy unit in Object manager and equip it with the ability to cause a frosty-slow effect ala Frost Nova. Then, create an event where whenever my unit casts the 'Cone of Cold' spell, the dummy unit is created, causes the frosty-slow effect on the units targeted by the spell and then disappears. That sounds the most simple, if I understood it right.

Now here's, the problem. How can I program all that in the event manager? Again, a fair noob with these things and I tend to avoid triggers for spells and abilities if I can.
 
Level 4
Joined
Jan 14, 2017
Messages
75
I'm not sure if it's possible to program dummy units in the object manager. Without triggering, your limits are very big.
There are lots of triggering tutorials for beginners that I used when I was like you. You can post on the forums if you are stuck with questions.

I'll see what I can do to make the spell.
But first:

-Do you want it to be a hero ability with levels?
-Do you want it to be MUI (Meaning that two units can cast it at the same time without problems)?
 
Last edited:
Level 2
Joined
Sep 2, 2017
Messages
8
A hero ability. Basically I want to use the "Breath of Fire" or "Breath of Frost" abilities but with the added effect that it slows the movement of those it hits. It sounds so simple, why is it so complicated ? :(
 
Level 4
Joined
Jan 14, 2017
Messages
75
It's complicated because you need to enhance an existing ability. Also, it's a cone shape. In triggering, circles and rectangles are much easier to do.
I will make the spell for you.

Don't be frustrated. You're just a beginner. :)
Update: Since I'm only adept at triggering, I can't seem to figure out how to make cones.
You can go Requests and submit a request there.
Sorry about that; like I said, cones are hard to do in triggering.
 
Last edited:
Level 2
Joined
Sep 2, 2017
Messages
8
That's alright, appreciate the effort and the advice :). Will see how to solve this little conundrum one way or another.
 

Jampion

Code Reviewer
Level 15
Joined
Mar 25, 2016
Messages
1,327
Cones are not easy to do. Especially in GUI it is quite troublesome, because you need a lot of points and this kind of calculation is better done in JASS using coordinates.
One important question is whether you want the breath to be instant or perform like the breath of fire, that closer targets are hit first.
If it's instant, it is quite easy once you have the cone done. Pick all valid units in the cone and use the dummy spell/attack.

If it hit's closer targets first you also need a time logic which is again a lot easier in JASS using timers.

@Kaijyuu With this method evasion would be a similar problem as spell shield. I tried to use critical strike with "never miss", but sadly crit and slow cannot be active at the same time. Do you know if it is possible to work around evasion when using an attacking dummy?

A different approach, a lot easier but not that pretty is to use Breath of Frost as base ability, detect when it's buff is applied (Breath of Frost always deals damage over time with a buff), remove the buff and use your dummy to slow the target.
 
Level 2
Joined
Sep 2, 2017
Messages
8
"A different approach, a lot easier but not that pretty is to use Breath of Frost as base ability, detect when it's buff is applied (Breath of Frost always deals damage over time with a buff), remove the buff and use your dummy to slow the target."

That sounds good! But... how? I looked through the events and have not seen anything that says something along the lines of "buff is applied on unit" or something like that. I know, I know... I'm being impossible, sorry, but this thing has been frustrating me for a while and I have no idea how and/or what to do...
 

Jampion

Code Reviewer
Level 15
Joined
Mar 25, 2016
Messages
1,327
I general if a buff is applied most of the times a damage event also occures (even if the damage is 0).
What you do is:
event: a unit is damaged (this event does not exist, you need a Damage Detection System)
condition: damaged unit has buff FrostBreath
actions: remove buff FrostBreath, do dummy stuff with unit

Frost breath is the custom buff you create. It should not be visible, because it only lasts 0 seconds.
 
Level 2
Joined
Sep 2, 2017
Messages
8
Found... something but it's not working...

So, I looked around and found that you can set something like : Event -> Unit enters playable map area ; Action -> Add to Trigger (Test) the event (Triggering Unit) takes damage

Test = If (Triggering Unit) has (Shadow Strike) buff, then Kill Triggering Unit, otherwise Do Nothing.

This is a test to see if the Damage Detector is working, it did in the demo map that I found in which a damaged unit would display a text above its head

On MY event though, nothing happens. I tried using Entering Unit instead of Triggering Unit, I tried different buffs and actions, nothing works...

What am I doing wrong ?
 
Level 11
Joined
Jun 2, 2004
Messages
849
With this method evasion would be a similar problem as spell shield. I tried to use critical strike with "never miss", but sadly crit and slow cannot be active at the same time. Do you know if it is possible to work around evasion when using an attacking dummy?
Give the unit splash with a very very small radius. Splash can't be evaded.

EDIT: The "miss" floating text can be avoided by using an artillery attack and attacking ground. Just tested it with an artillery attack with splash radius 1 and it works fine.
 
Last edited:
Level 4
Joined
Jan 14, 2017
Messages
75
Found... something but it's not working...

So, I looked around and found that you can set something like : Event -> Unit enters playable map area ; Action -> Add to Trigger (Test) the event (Triggering Unit) takes damage

Test = If (Triggering Unit) has (Shadow Strike) buff, then Kill Triggering Unit, otherwise Do Nothing.

This is a test to see if the Damage Detector is working, it did in the demo map that I found in which a damaged unit would display a text above its head

On MY event though, nothing happens. I tried using Entering Unit instead of Triggering Unit, I tried different buffs and actions, nothing works...

What am I doing wrong ?
You should copy the trigger so we can see the problem.
-Right click the paper icon next to your trigger, where it says events, conditions, actions.
-Click "Copy as Text".
-Type your message here and do [*trigger] your trigger [*/trigger]. Don't add the *'s by the way.

Like I said, you're just beginning. Triggering will be easy for you once you get a hold of it.
 
Last edited:
Status
Not open for further replies.
Top