- Joined
- Apr 24, 2012
- Messages
- 9,798
Or give ward units a hidden filter ability. Check for that ability when grouping units up.
Here's a solution using Weep's GDD.
Cast
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to An AWESOME spell
Actions
Set Spell_ArrayMax = (Spell_ArrayMax + 1)
Set Spell_Caster[Spell_ArrayMax] = (Triggering unit)
Set Spell_Agillity[Spell_ArrayMax] = (Agility of Spell_Caster[Spell_ArrayMax] (Include bonuses))
Set Spell_SpellLevel[Spell_ArrayMax] = (Level of An AWESOME spell for Spell_Caster[Spell_ArrayMax])
Set Spell_TempLoc = (Position of Spell_Caster[Spell_ArrayMax])
Set Spell_BuffGroupArray[Spell_ArrayMax] = (Units within 250.00 of Spell_TempLoc matching (((Owner of Spell_Caster[Spell_ArrayMax]) is an enemy of (Owner of (Matching unit))) Equal to True))
Unit Group - Pick every unit in Spell_BuffGroupArray[Spell_ArrayMax] and do (Actions)
Loop - Actions
Unit - Create 1 Dummy for (Owner of Spell_Caster[Spell_ArrayMax]) at Spell_TempLoc facing Default building facing degrees
Unit - Turn collision for (Last created unit) Off
Custom script: call SetUnitX (bj_lastCreatedUnit,GetLocationX(udg_Spell_TempLoc))
Custom script: call SetUnitY (bj_lastCreatedUnit,GetLocationY(udg_Spell_TempLoc))
Unit - Add Dummy to (Last created unit)
Unit - Order (Last created unit) to Neutral Alchemist - Acid Bomb (Picked unit)
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Custom script: call RemoveLocation (udg_Spell_TempLoc)
Yeah, it can be done without GDD, but that would cause alot of lag.
GetHit
Events
Game - GDD_Event becomes Equal to 0.00
Conditions
(GDD_DamagedUnit has buff dat buff ) Equal to True
GDD_Damage Equal to 0.00
Actions
For each (Integer Spell_ForInteger) from 1 to Spell_ArrayMax, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(GDD_DamagedUnit is in Spell_BuffGroupArray[Spell_ForInteger]) Equal to True
Then - Actions
Unit Group - Remove GDD_DamagedUnit from Spell_BuffGroupArray[Spell_ForInteger]
Unit - Cause Spell_Caster[Spell_ArrayMax] to damage GDD_DamagedUnit, dealing (Real(((3 x Spell_Agillity[Spell_ArrayMax]) + (Spell_SpellLevel[Spell_ArrayMax] x Spell_Agillity[Spell_ArrayMax])))) damage of attack type Spells and damage type Normal
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in Spell_BuffGroupArray[Spell_ForInteger]) Equal to 0
Then - Actions
Set Spell_BuffGroupArray[Spell_ForInteger] = Spell_BuffGroupArray[Spell_ArrayMax]
Set Spell_Caster[Spell_ForInteger] = Spell_Caster[Spell_ArrayMax]
Set Spell_SpellLevel[Spell_ForInteger] = Spell_SpellLevel[Spell_ArrayMax]
Set Spell_Agillity[Spell_ForInteger] = Spell_Agillity[Spell_ArrayMax]
Set Spell_ArrayMax = (Spell_ArrayMax - 1)
Else - Actions
Else - Actions
I can't think of a better way of accurately dealing the needed damage other than using a DDS. The others cause massive amounts of lag. Luckily, GDD is REALLY easy to setup.
You can configure anything in the object editor, except the radius around the hero and the damage dealt - they are in the trigger editor.
I have the feeling I missed something, but I'm not really sure what
Oh, dont mind the names, I was lazy.
EDIT: Also, better post the triggers intags, otherwise it stretches the screen alot and it becomes annoying.