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
Armor System v 1.3.w3x
Variables
Armor System
Armor System Event
Armor System Core
Armor System Restore
Armor System Loop
Armor System Loop 2
Shield Bash
Shield Bash Init
Shield Bash Effect
Do not import this
Map
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
Armor_Real
real
Yes
Armor_Spell_ID
integer
No
Armor_Timer
timer
No
Armor_Timer_2
timer
No
Armor_Unit
unit
Yes
UnitGroup
group
No
Do not change anything here
Armor System Event
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Check Armor
Actions
Trigger - Turn on Armor_System_Core <gen>
-------- Set Restoring Value --------
Set Variable Set Armor_Unit[1] = (Target unit of ability being cast)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Size of inventory for (Target unit of ability being cast)) Greater than or equal to 1
Then - Actions
Hero - Create Increases Hp + 1000 and give it to (Target unit of ability being cast)
Else - Actions
Unit - Add Inventory Custom to (Target unit of ability being cast)
Hero - Create Increases Hp + 1000 and give it to (Target unit of ability being cast)
Unit - Remove Inventory Custom from (Target unit of ability being cast)
Set Variable Set Armor_Real[5] = (Percentage life of (Target unit of ability being cast))
Unit - Set life of (Target unit of ability being cast) to 100.00 %
Unit - Cause (Target unit of ability being cast) to damage (Target unit of ability being cast) , dealing 50.00 damage of attack type Chaos and damage type Normal
-------- Set ID --------
Set Variable Set Armor_Spell_ID = "0"
Get unit Armor and Reduction
Armor System Core
Events
Conditions
Actions
Trigger - Turn off (This trigger)
-------- Set Damage Taken for heal --------
Set Variable Set Armor_Real[1] = (Damage taken)
-------- Get unit real reduction (In %) --------
Set Variable Set Armor_Real[2] = ((2.00 x (50.00 - (Damage taken))) / 100.00)
-------- Get unit Armor --------
Set Variable Set Armor_Real[3] = ((Armor_Real[2] / (1 - Armor_Real[2])) / 0.06)
-------- Start Timer that will heal unit (Couse damage that unit have take) --------
Countdown Timer - Start Armor_Timer as a One-shot timer that will expire in 0.00 seconds
Set Variable Set Armor_Real[4] = (Armor_Real[2] x 100.00)
Retore unit hp to hp it was before armor checking
If ID is 0 then show you values
If ID is 1 then damage target
Armor System Restore
Events
Time - Armor_Timer expires
Conditions
Actions
-------- Heal Unit --------
Unit - Set life of Armor_Unit[1] to Armor_Real[5] %
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Size of inventory for Armor_Unit[1]) Greater than or equal to 1
Then - Actions
Hero - Create Increases Hp - 1000 and give it to Armor_Unit[1]
Else - Actions
Unit - Add Inventory Custom to Armor_Unit[1]
Hero - Create Increases Hp - 1000 and give it to Armor_Unit[1]
Unit - Remove Inventory Custom from Armor_Unit[1]
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Armor_Spell_ID Equal to 0
Then - Actions
Cinematic - Clear the screen of text messages for (All players) .
Game - Display to (All players) the text: (|cffFFCC00Unit Armor |r: + (String(Armor_Real[3])))
Game - Display to (All players) the text: (|cffFFCC00Unit Reduction |r: + (String(Armor_Real[4])))
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Armor_Spell_ID Equal to 1
Then - Actions
Countdown Timer - Start Armor_Timer_2 as a One-shot timer that will expire in 0.00 seconds
Else - Actions
Armor System Loop
Events
Time - Elapsed game time is 0.01 seconds
Conditions
Actions
Set Variable Set UnitGroup = (Units in (Playable map area))
Unit Group - Pick every unit in UnitGroup and do (Actions)
Loop - Actions
Trigger - Add to Armor_System_Core <gen> the event ((Picked unit) Takes damage)
Custom script: call DestroyGroup(udg_UnitGroup)
Armor System Loop 2
Events
Unit - A unit enters (Playable map area)
Conditions
Actions
Trigger - Add to Armor_System_Core <gen> the event ((Triggering unit) Takes damage)
To make custom spell with this system you need to
- Import all actions from this trigger (Make sure that you don't have 2 sames ID)
- Make a Timer
- In Armor System Core add if then else action and if ID is matching then do your real trigger
- Use Armor_Real[3] for Armor value
Shield Bash Init
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Shield Bash
Actions
Trigger - Turn on Armor_System_Core <gen>
-------- Set All Informations --------
Set Variable Set Armor_Unit[1] = (Triggering unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Size of inventory for (Triggering unit)) Greater than or equal to 1
Then - Actions
Hero - Create Increases Hp + 1000 and give it to (Triggering unit)
Else - Actions
Unit - Add Inventory Custom to (Triggering unit)
Hero - Create Increases Hp + 1000 and give it to (Triggering unit)
Unit - Remove Inventory Custom from (Triggering unit)
Set Variable Set Armor_Real[5] = (Percentage life of (Triggering unit))
Unit - Set life of (Triggering unit) to 100.00 %
Unit - Cause (Triggering unit) to damage (Triggering unit) , dealing 50.00 damage of attack type Chaos and damage type Normal
Set Variable Set Armor_Spell_ID = "1"
Set Variable Set Armor_Unit[2] = (Target unit of ability being cast)
Shield Bash Effect
Events
Time - Armor_Timer_2 expires
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Life of Armor_Unit[2]) Greater than (2.00 x Armor_Real[3])
Then - Actions
-------- Direct remove Hp --------
Unit - Set life of Armor_Unit[2] to ((Life of Armor_Unit[2]) - (Armor_Real[3] x 2.00))
Else - Actions
-------- Kill unit --------
Unit - Cause Armor_Unit[1] to damage Armor_Unit[2] , dealing 9999999.00 damage of attack type Spells and damage type Normal
Floating Text - Create floating text that reads (String((Integer((2.00 x Armor_Real[3]))))) above Armor_Unit[2] with Z offset 30.00 , using font size 9.00 , color ( 100 %, 100 %, 100 %), and 0 % transparency
Floating Text - Set the velocity of (Last created floating text) to 40.00 towards 90 degrees
Floating Text - Change (Last created floating text) : Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 1.50 seconds
Map
Events
Time - Elapsed game time is 0.01 seconds
Conditions
Actions
Visibility - Create an initially Enabled visibility modifier for Player 1 (Red) emitting Visibility across (Playable map area)
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.