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
Combo Attack System (CAS) Version 1.0.w3x
Variables
Initialization
Random
Attack
Variables
Attack
AttackOnceAgain
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
ComboPercent
integer
No
Player_ComboBool
boolean
Yes
Player_ComboInteger
integer
Yes
Player_ComboUnit
unit
Yes
Playergroup
force
No
temp_point
location
Yes
UnitGroup
group
Yes
Random
Events
Map initialization
Conditions
Actions
Visibility - Disable fog of war
Visibility - Disable black mask
Game - Display to (All players) for 100.00 seconds the text: |cffffcc00Combo Attack System (CAS) - Version 1.0|r
Game - Display to (All players) for 100.00 seconds the text: |cffffcc00Created by|r: |cffff0000The_Flood (a.k.a. Flood)|r
ComboPercent - This is an integer variable. This variable is used as the % check for a new combo attack.
Player_ComboBool - This is a boolean variable. This variable is used to check if a player is combo attacking.
Player_ComboInteger - This is an integer variable. This variable is used to count how many combo attacks a player have made.
Player_ComboUnit - This is an unit variable. This variable is used to check which unit is combo attacking.
Misc Variables:
UnitGroup - This is an Unit-Group variable. This variable is used to pick units.
Playergroup - This is a Player-Group variable. This variable is used with the Floating Texts.
temp_point - This is a point variable. This variable is used to check locations and remove leaks.
Attack
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Attack
Actions
-------- Set temporary variables --------
Set Variable Set temp_point[1] = (Position of (Triggering unit))
Set Variable Set temp_point[2] = (temp_point[1] offset by 100.00 towards (Facing of (Triggering unit)) degrees.)
Set Variable Set UnitGroup[1] = (Units within 80.00 of temp_point[2] matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit)).) Equal to True).)
-------- Try to attack an enemie --------
Unit Group - Pick every unit in UnitGroup[1] and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) is alive) Equal to True
Then - Actions
Unit - Cause (Triggering unit) to damage (Picked unit) , dealing (Real((Strength of (Triggering unit) (Include bonuses)))) damage of attack type Hero and damage type Normal
Special Effect - Create a special effect attached to the chest (Unexpected type: 'attachpoint') of (Picked unit) using Objects\Spawnmodels\Orc\Orcblood\BattrollBlood.mdl
Special Effect - Destroy (Last created special effect)
Else - Actions
-------- Variables needed to continue the combo attacking. --------
Set Variable Set Player_ComboUnit[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
Set Variable Set Player_ComboBool[(Player number of (Owner of (Triggering unit)))] = "true"
Set Variable Set Player_ComboInteger[(Player number of (Owner of (Triggering unit)))] = "1"
-------- A loop for max 10 players, change the number 10 to less or more to change the maximum players --------
For each (Integer A) from 1 to 10 , do (Actions)
Loop - Actions
-------- Check is a player is combo attacking --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Player_ComboBool[(Integer A)] Equal to True
Then - Actions
-------- Set % chance 1-100 --------
Set Variable Set ComboPercent = (Random integer number between 1 and 100)
-------- Set the ComboPercent to 99 if a players hero got more than 100 agility. --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Agility of Player_ComboUnit[(Integer A)] (Include bonuses)) Greater than or equal to 100
Then - Actions
Set Variable Set ComboPercent = "99"
Else - Actions
-------- Try to make another combo attack --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
ComboPercent Less than or equal to (Agility of Player_ComboUnit[(Integer A)] (Include bonuses))
Then - Actions
-------- Succeed to make another combo --------
-------- Increase the combo integer by 1. --------
Set Variable Set Player_ComboInteger[(Integer A)] = (Player_ComboInteger[(Integer A)] + 1)
-------- Play an attack animation for the combo attacking hero --------
Animation - Play Player_ComboUnit[(Integer A)] 's attack animation
-------- set temporary variables --------
Set Variable Set temp_point[1] = (Position of Player_ComboUnit[(Integer A)])
Set Variable Set temp_point[2] = (temp_point[1] offset by 100.00 towards (Facing of Player_ComboUnit[(Integer A)]) degrees.)
Set Variable Set UnitGroup[1] = (Units within 80.00 of temp_point[2] matching (((Matching unit) belongs to an enemy of (Owner of Player_ComboUnit[(Integer A)]).) Equal to True).)
-------- Try to attack an enemie --------
Unit Group - Pick every unit in UnitGroup[1] and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) is alive) Equal to True
Then - Actions
-------- Attack the enemie, damage is based on heroes strength x heroes combo number --------
Unit - Cause Player_ComboUnit[(Integer A)] to damage (Picked unit) , dealing ((Real((Strength of Player_ComboUnit[(Integer A)] (Include bonuses)))) x (Real(Player_ComboInteger[(Integer A)]))) damage of attack type Hero and damage type Normal
Special Effect - Create a special effect attached to the chest (Unexpected type: 'attachpoint') of (Picked unit) using Objects\Spawnmodels\Orc\Orcblood\BattrollBlood.mdl
Special Effect - Destroy (Last created special effect)
-------- Reset all variables if the hero kills an enemie. --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Life of (Picked unit)) Less than or equal to 0.00
Set Variable Set Player_ComboUnit[(Integer A)] = No unit
Set Variable Set Player_ComboBool[(Integer A)] = "false"
Set Variable Set Player_ComboInteger[(Integer A)] = "0"
Else - Actions
Else - Actions
-------- Floating Text --------
Set Variable Set Playergroup = (Player group((Owner of Player_ComboUnit[(Integer A)])))
Floating Text - Create floating text that reads (String(Player_ComboInteger[(Integer A)])) at temp_point[1] with Z offset 0 , using font size 10 , color ( 100 %, 100 %, 100 %), and 0 % transparency
Floating Text - Hide (Last created floating text) for (All players)
Floating Text - Show (Last created floating text) for Playergroup
Floating Text - Set the velocity of (Last created floating text) to 64 towards 90 degrees
Floating Text - Change (Last created floating text) : Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
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.