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

[Spell] Clockwerk - Battery Assault

Level 15
Joined
Sep 11, 2013
Messages
557
Greetings!
I wish to create a spell that is identical to Battery Assault from Dota 1, and I don't know how to do it in a proper way.
The spell must be MUI.

Spell: When I press the spell:
Discharges high-powered shrapnel at 1 random (or closest) nearby enemy units in 200 AOE around the caster, dealing 25 physical damage and ministun for 0.1sec. That discharges occur every 0.70 Seconds, and the duration will be 10.5 Seconds. 10.5 / 0.7 = 15 times. I need just 1 level for my unit.

Example:

For the moment, I just have the smoke effect on origin..
Abilities\Spells\Human\FlakCannons\FlakTarget.mdl

The help will be appreciated!
:peasant-bowing:
 
Last edited:
Use Unit Indexing to make it MUI, use a Unit Group to track the casters, and use a Timer/Periodic event to manage the casters over time.
On cast -> Add caster to group.
On interval -> Track elapsed time per caster using Arrays + Unit Indexing.
If elapsed time hits the 0.70 second mark then Order a Dummy unit to Storm Bolt a nearby enemy. Reset this time as needed.
If elapsed time hits the 10.50 second mark then Remove the caster from the group.
Toggle the Timer on/off as needed -> on while 1+ casters in group, off while 0 casters in group.
Reals suffer from floating point error so don't check for exact values, use <= or >= in your comparisons. Or just use Integers and count the "ticks".
 
Use Unit Indexing to make it MUI, use a Unit Group to track the casters, and use a Timer/Periodic event to manage the casters over time.
On cast -> Add caster to group.
On interval -> Track elapsed time per caster using Arrays + Unit Indexing.
If elapsed time hits the 0.70 second mark then Order a Dummy unit to Storm Bolt a nearby enemy. Reset this time as needed.
If elapsed time hits the 10.50 second mark then Remove the caster from the group.
Toggle the Timer on/off as needed -> on while 1+ casters in group, off while 0 casters in group.
Reals suffer from floating point error so don't check for exact values, use <= or >= in your comparisons. Or just use Integers and count the "ticks".
Hi, Uncle!
Sadly, my brain is still not able to understand how Unit Indexing or Hashtables works..:wsad:
It is way too complex for me..

I did something random to test, but without a good result.
  • Battery Assault
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Rush - CLOCKWERK
    • Actions
      • Unit Group - Add (Casting unit) to UG_Battery_Assault
      • Trigger - Turn on Battery Assault Periodic Timer <gen>
  • Battery Assault Periodic Timer
    • Events
      • Time - Every 0.70 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in UG_Battery_Assault and do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in (Units within 200.00 of (Position of (Picked unit)).) and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) is in UG_Battery_Assault.) Equal to False
                • Then - Actions
                  • Special Effect - Create a special effect attached to the overhead of (Picked unit) using Abilities\Spells\Human\DispelMagic\DispelMagicTarget.mdl
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Picked unit) has buff Berserk) Equal to False
                    • Then - Actions
                      • Unit Group - Remove (Picked unit) from UG_Battery_Assault.
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Number of units in UG_Battery_Assault) Equal to 0
                        • Then - Actions
                          • Trigger - Turn off (This trigger)
                        • Else - Actions
                    • Else - Actions
 

Attachments

Back
Top