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!
You are using an out of date browser. It may not display this or other websites correctly. You should upgrade or use an alternative browser.
Triggers
Enegy Shield.w3x
Variables
Map Triggers
visi
Energy Shield
EnergyShield Hash
EnergyShield Cast
EnergyShield Damaged
Enter map-specific custom script code below. This text will be included in the map script after variables are declared and before any trigger code.
Name
Type
is_array
initial_value
EnergyShield_DamagedAbsorbed
integer
Yes
EnergyShield_ExplodePoint
location
No
EnergyShield_Hashtable
hashtable
No
EnergyShield_UnitGroup
group
No
visi
Events
Map initialization
Conditions
Actions
Visibility - Disable fog of war
Visibility - Disable black mask
EnergyShield Hash
Events
Map initialization
Conditions
Actions
Hashtable - Create a hashtable
Set Variable Set EnergyShield_Hashtable = (Last created hashtable)
1 = energy shield
2 = damage absorbed
EnergyShield Cast
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Energy Shield
Actions
Special Effect - Destroy (Load 1 of (Key (Target unit of ability being cast).) in EnergyShield_Hashtable.)
Special Effect - Create a special effect attached to the chest (Unexpected type: 'attachpoint') of (Target unit of ability being cast) using Energy Shield.mdx
Hashtable - Save Handle Of (Last created special effect) as 1 of (Key (Target unit of ability being cast).) in EnergyShield_Hashtable .
Hashtable - Save (100 x (Level of Energy Shield for (Triggering unit))) as 2 of (Key (Target unit of ability being cast).) in EnergyShield_Hashtable .
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Target unit of ability being cast) is in EnergyShield_UnitGroup.) Equal to True
Then - Actions
Else - Actions
Unit Group - Add (Target unit of ability being cast) to EnergyShield_UnitGroup
Trigger - Add to EnergyShield_Damaged <gen> the event ((Target unit of ability being cast) Takes damage)
EnergyShield Damaged
Events
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering unit) has buff Energy Shield) Equal to True
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Load 2 of (Key (Triggering unit).) from EnergyShield_Hashtable.) Greater than or equal to (Integer((Damage taken)))
Then - Actions
Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + (Damage taken))
Set Variable Set EnergyShield_DamagedAbsorbed[1] = (Load 2 of (Key (Triggering unit).) from EnergyShield_Hashtable.)
Set Variable Set EnergyShield_DamagedAbsorbed[2] = (EnergyShield_DamagedAbsorbed[1] - (Integer((Damage taken))))
Hashtable - Save EnergyShield_DamagedAbsorbed[2] as 2 of (Key (Triggering unit).) in EnergyShield_Hashtable .
Game - Display to (Player group((Owner of (Triggering unit)))) the text: (Shield Left: + (String(EnergyShield_DamagedAbsorbed[2])))
Else - Actions
Unit - Remove Energy Shield buff from (Triggering unit)
Special Effect - Destroy (Load 1 of (Key (Triggering unit).) in EnergyShield_Hashtable.)
Hashtable - Save 0 as 2 of (Key (Triggering unit).) in EnergyShield_Hashtable .
Set Variable Set EnergyShield_ExplodePoint = (Position of (Triggering unit))
Special Effect - Create a special effect at EnergyShield_ExplodePoint using Arcane Explosion.mdx
Special Effect - Destroy (Last created special effect)
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in (Units within 200.00 of EnergyShield_ExplodePoint matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Owner of (Matching unit)) is an enemy of (Owner of (Triggering unit)).) Equal to True)))).) and do (Actions)
Loop - Actions
Unit - Cause (Triggering unit) to damage (Picked unit) , dealing 50.00 damage of attack type Spells and damage type Magic
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.