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

How to make Earthquake deal damage to units?

Status
Not open for further replies.
Level 5
Joined
Jan 5, 2012
Messages
116
Hello! Is there a way to make Earthquake deal damage per second to units and not only to buildings? I think that the spell is hardcoded or something and even if you change targets it doesn't damage units (correct me if I'm wrong). It should be done with triggers or with another ability, but I can't figure it out.
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
u use an array and a counter. look at my tutorial things a guier should know. the chapter how to index for MUI.

in the loop part u would need a counter to count the time passed and a counter to count max time ( 10 seconds). The reason for the max counter is so the time can increase per lvl. use a 0.03 loop time.

Then u use ITEs ( if then else)
something like this.
  • Set timerCounter = timerCounter + 1
  • if conditions and do actions
    • if condition
      • timerCounter equal to or greater than 33
    • then
      • damage unit here
    • else
  • if conditions and do actions
    • if conditions
      • timerCounter equal to or greater than maxTimerCounter
    • then
      • de-index here ( spell is over)
    • else
Instead of indexing, use ten dummies and ten abilities that have different casting time but damage same in the area using integer loops.

indexing would be better for this than doing that.
 
Level 20
Joined
Jun 27, 2011
Messages
1,864
Simplified version, tho you won't get credit from the kill.
  • Earthquake
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Earthquake) Equal to True
            • Then - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1.56 damage of attack type Spells and damage type Normal
            • Else - Actions
 
Status
Not open for further replies.
Top