• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Breath of Fire distance

I am trying to archieve one dummy ability that casts 3 breath of fire abilites, with 300, 600 and 900 range aswell with the same width. My trouble here is, that I cant figure out to get the exact range.

As an example for the 300 range ability I have these values:
  • Distance: 150
  • Final Area: 300
  • Area of Effect: 1

But the range of these spells seems always longer than they should be. I am not sure which values to tweak to achieve what I am trying to do here. I would like all 3 spells to have the same angle so they just overlay eachother and just have a difference in range. (the image angle is not accurate)
1749198012707.png


I also added a testmap. I appreciate any help.
 

Attachments

It might be worth it to test the collision size property of the casting unit in the object editor.

With attacks, a unit's range begins at the end of that circle, so a unit with a 600 range attack and a 32 collision size will reach a range of 632.

I've never tested anything other than basic attacks with this, but it would stand to reason that all unit abilities have a final range of range + collision size, although it would also stand to reason if your dummy already has a collision of 0...

I'll check it out when I'm home if you don't test first.
 
I think it works by sampling in increasing circle sizes starting with radius area of effect at caster origin (or collision edge?) and going to radius at distance.

For:
  • Distance: 150
  • Final Area: 300
  • Area of Effect: 1
This means the centre line extent for the cast would be roughly 150 + 300 = 450.

To do what you want you need to define the desired arc of the breath ability as that determines the final area at each of the ranges. You then subtract desired range by final area to get the required distance.

As this is likely a circular sample AoE, it will likely affect units as long as any part of their collision radius overlaps one of the sampled AoE circles. As such the AoE might appear bigger than what was configured due to it affecting units around the edges that touch the sampled circle but with the unit origin well outside the sampled circles.

Lastly be aware that the breath of fire visual cone is not tied to the AoEs or distance in any way. The visual effect model is literally an animated fire cone with speed, arc and distance baked in.
 
Here's a way to trigger most of the effects yourself, which I based on this post -> IsUnitInCone (with Collision)
  • Cone Test
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Breath of Fire (New)
    • Actions
      • Set VariableSet X = (X of (Position of (Triggering unit)))
      • Set VariableSet Y = (Y of (Position of (Triggering unit)))
      • Set VariableSet Angle = (Angle from (Position of (Triggering unit)) to (Target point of ability being cast))
      • Custom script: set udg_Real = bj_DEGTORAD * udg_Angle
      • Custom script: set udg_Real2 = bj_DEGTORAD * 45.0
      • -------- --------
      • Custom script: call GroupEnumUnitsInArc(udg_ConeGroup, udg_X, udg_Y, udg_Real, udg_Real2, 0.0, 900.0)
      • -------- --------
      • Unit Group - Pick every unit in ConeGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) belongs to an enemy of (Owner of (Triggering unit)).) Equal to True
              • ((Picked unit) is alive) Equal to True
            • Then - Actions
              • Custom script: set udg_Real = GetArcDistance( GetEnumUnit() )
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Real Less than or equal to 300.00
                • Then - Actions
                  • -------- CLOSE: --------
                  • Unit - Cause (Triggering unit) to damage (Picked unit), dealing 1000.00 damage of attack type Spells and damage type Normal
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Real Less than or equal to 600.00
                    • Then - Actions
                      • -------- MEDIUM: --------
                      • Unit - Cause (Triggering unit) to damage (Picked unit), dealing 500.00 damage of attack type Spells and damage type Normal
                    • Else - Actions
                      • -------- FAR: --------
                      • -------- (If Greater than 600.00) --------
                      • Unit - Cause (Triggering unit) to damage (Picked unit), dealing 10.00 damage of attack type Spells and damage type Normal
            • Else - Actions
That way you don't need to rely on the Breath of Fire ability and can avoid the many issues that come with using multiple Dummy abilities.

This line is currently set to 90 degrees and represents the arc of the cone:
  • Custom script: set udg_Real2 = bj_DEGTORAD * 45.0
Note that I didn't bother optimizing or fixing the memory leaks in the Test trigger.
 

Attachments

Last edited:
Back
Top