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

Cleaving attack doesn't work (on ranged units)

Status
Not open for further replies.
Level 8
Joined
Nov 2, 2007
Messages
160
i feel like a bloody noob when writing this but i can't figure this bug out:

i have a trigger wich gives a cleaving attack-like ability to a unit (works properly:thumbs_up:)

the ability has:
- a custom name
- a custom area (from 150 to 200)
- custom targets (ground, enemy, air)
- a custom damage amount (from 0.25 to 0.3)
- a custom grafical effect

the unit has a ranged attack (i guess thes spell also works with ranged attacks) and has no orb effecs or something

so now why doesn't the ability start when a unit is attacked?!
 
Level 12
Joined
Mar 16, 2006
Messages
992
I believe fire orb and searing arrows has a splash damage modification, though I could be wrong.
 
Level 28
Joined
Mar 25, 2008
Messages
2,955
  • Splash
    • Events
      • Unit - A unit is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to *your unit*
    • Actions
      • Set rnd_num = (Random integer number between 1 and 4)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-COnditions
          • rnd_num Equal to 1
        • 'THEN'-Actions
          • Set tmp_pkt = (Position of (Attacked unit))
          • Set tmp_rect = (Region centered at tmp_pkt with size (300.00, 300.00))
          • set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in (Units in temprect owned by (Owner of (Attacked Unit))) and do (Einheit - Cause (Attacking unit) to damage (Picked unit), dealing 500.00 damage of attack type Normal and damage type Normal)
          • Custom script: call RemoveLocation(udg_tmp_pkt)
          • Custom script: call RemoveRect(udg_tmp_rect)
        • 'ELSE'-Actions
triggered splash ;)
 
Level 9
Joined
Feb 19, 2006
Messages
115
A better trigger would be:

  • Splash Ability
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of Cleaving Attack for (Attacking unit)) Greater than 0
    • Actions
      • Set TempLoc = (Position of (Attacked unit))
      • Set TempInt = (Random integer number between 150 and 200)
      • Set TempReal = (Random real number between 0.25 and 0.30)
      • Unit - Cause (Attacking unit) to damage circular area after 0.00 seconds of radius (Real(TempInt)) at TempLoc, dealing TempReal damage of attack type Normal and damage type Normal
      • Custom script: call RemoveLocation(udg_TempLoc)
This actually checks that the unit has the ability, and damages in a circle instead of a square.
 
Level 2
Joined
Sep 8, 2008
Messages
15
A better trigger would be:

  • Splash Ability
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of Cleaving Attack for (Attacking unit)) Greater than 0
    • Actions
      • Set TempLoc = (Position of (Attacked unit))
      • Set TempInt = (Random integer number between 150 and 200)
      • Set TempReal = (Random real number between 0.25 and 0.30)
      • Unit - Cause (Attacking unit) to damage circular area after 0.00 seconds of radius (Real(TempInt)) at TempLoc, dealing TempReal damage of attack type Normal and damage type Normal
      • Custom script: call RemoveLocation(udg_TempLoc)
This actually checks that the unit has the ability, and damages in a circle instead of a square.

This will cause .25 to .30 points of damage in a circle of 150 and 200 at the Position of the Unit Attacked.

Is there a way to get the attacking units damage, then use math to get a percentage of its attack damage?
 
Level 5
Joined
Aug 24, 2008
Messages
199
I feel somehow ignored. Since Orb of Annihilation is exactly what you are looking for (i thing so at least). It supports percentage damage. Just set bonus damage to 0 and u got a splash attack that deals exactly the damage of the unit.
 
Level 19
Joined
May 1, 2008
Messages
1,130
isn't barrage the "cleaving attack" counterpart?
barrage only works on ranged units and cleave works only on melee
 
Level 8
Joined
Nov 2, 2007
Messages
160
ok, at fist thanks for these numerous replies

-Vegavak's solution (fire orb or searing arrows) deals 100% of the damage to units an an area
-the solution of Zinive is an easy way to add aoe damage but NOT a percentage one (like cleaving atack)
-i guess the best way is to do it Squiggy's and KingBobs way though it would be quite more to do ...
 
Level 8
Joined
Nov 2, 2007
Messages
160
sry but i don't understand what you mean ...

ps.
I have two problems with Squiggy's and KingBobs way.
The event A Unit is attacked starts before the attack of the tower. Wait functions wont help cause of the ranged attack (it's not a fixed time when exactly the projectile hits it's target)
Second the damage is also dealt to allied towers ...
 
Level 5
Joined
Aug 24, 2008
Messages
199
As far as i know the orb supports quarter and half damage. So it can deal % damage but only 25%, 50% and 75%.
 
Status
Not open for further replies.
Top