• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Starcraft 2 Charge Ability

Level 14
Joined
Jul 19, 2011
Messages
676
Hi, I want to make an abililty that basically triggers when a unit of certain type acquires a target and then the unit rushes to its target dealing extra damage on the first hit and potentially stun the target, I looked around but couldn't find anyone successfully replicating it, I somehow made a very simplified version with Berserk and a trigger that makes the unit cast it whenever it acquires a target but it triggers in any range and I don't want it to trigger on melee range, it also doesn't make the first basic attack hit harder or stun the target.
 
When the unit acquires a target:
  • Check distance (e.g. ≥ 600)
  • If valid → start a charge toward the target’s position
  • On impact → deal bonus damage + optional stun

Distance check example:

If (Distance between (Triggering unit) and (Target unit of event)) ≥ 600.00
This prevents the charge from triggering in melee range.



Target selection:

If you prefer periodic scanning instead, you can pick the nearest unit like this:

  • Unit Group - Pick every unit in Abomination_TempGroup and do (Actions)
  • Loop - Actions
  • Set TempDist = Distance between points
  • If TempDist < BestDist
  • Set BestDist = TempDist
  • Set Target = Picked unit


I actually had a similar system already, so I adapted it into a test map using:


Every 1 second, each Abomination scans for enemies in 600–1200 range
If found it charges toward the target’s initial position (so it can be dodged)

While charging it is marked so it won’t re-cast;

On impact it deals bonus damage and triggers knockback;

If affected by Entangling Roots the charge: won’t start and will cancel mid-charge. Feel free to test and see if it suits in any way.

If you want a simpler version without external systems, I can write a minimal GUI version as well, cheers🍻

 

Attachments

When the unit acquires a target:
  • Check distance (e.g. ≥ 600)
  • If valid → start a charge toward the target’s position
  • On impact → deal bonus damage + optional stun

Distance check example:

If (Distance between (Triggering unit) and (Target unit of event)) ≥ 600.00
This prevents the charge from triggering in melee range.



Target selection:

If you prefer periodic scanning instead, you can pick the nearest unit like this:

  • Unit Group - Pick every unit in Abomination_TempGroup and do (Actions)
  • Loop - Actions
  • Set TempDist = Distance between points
  • If TempDist < BestDist
  • Set BestDist = TempDist
  • Set Target = Picked unit


I actually had a similar system already, so I adapted it into a test map using:


Every 1 second, each Abomination scans for enemies in 600–1200 range
If found it charges toward the target’s initial position (so it can be dodged)

While charging it is marked so it won’t re-cast;

On impact it deals bonus damage and triggers knockback;

If affected by Entangling Roots the charge: won’t start and will cancel mid-charge. Feel free to test and see if it suits in any way.

If you want a simpler version without external systems, I can write a minimal GUI version as well, cheers🍻

Thanks a lot, I will definitely test it out and use it in my campaign!
 
Back
Top