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
Borts Basic Hero Triggers.w3x
Variables
Select Hero
Select Hero Old
Select Hero
Set Variables
AI
Hero Death
Herodeath
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
DeathCondition
boolean
Yes
HeroDeathTimer
timer
Yes
HeroSelectUnit
unit
Yes
HeroType
unitcode
Yes
HeroTypeSelected
boolean
Yes
Team
force
Yes
TeamRegion
rect
Yes
TimerWindow
timerdialog
Yes
Select Hero Old
Events
Conditions
(Unit-type of (Entering unit)) Equal to Hero Spirit
Actions
For each (Integer A) from 1 to 4 , do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between (Position of (Triggering unit)) and (Position of HeroSelectUnit[(Integer A)])) Less than or equal to 200.00
Then - Actions
Special Effect - Create a special effect at (Position of HeroSelectUnit[(Integer A)]) using Abilities\Spells\Human\Resurrect\ResurrectCaster.mdl
Unit - Create 1 HeroType[(Integer A)] for (Owner of (Entering unit)) at (Center of Region_008 <gen>) facing (Center of Region_008 <gen>)
For each (Integer B) from 1 to 4 , do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Owner of (Entering unit)) is in Team[(Integer B)].) Equal to True
Then - Actions
Unit - Move (Last created unit) instantly to (Center of TeamRegion[(Integer B)]) , facing (Center of Region_008 <gen>)
Camera - Pan camera for (Owner of (Entering unit)) to (Position of (Last created unit)) over 0.01 seconds
Special Effect - Create a special effect attached to the origin (Unexpected type: 'attachpoint') of (Last created unit) using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
Hero - Create Potion of Greater Healing and give it to (Last created unit)
Unit - Remove (Entering unit) from the game
Else - Actions
Else - Actions
Select Hero
Events
Time - Every 0.10 seconds of game time
Conditions
Actions
For each (Integer A) from 1 to 4 , do (Actions)
Loop - Actions
Unit Group - Pick every unit in (Units within 200.00 of (Position of (Random unit from (Units owned by Neutral Passive of type HeroType[(Integer A)]))).) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Picked unit)) Not equal to Neutral Passive
Then - Actions
For each (Integer B) from 1 to 4 , do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Owner of (Picked unit)) is in Team[(Integer B)].) Equal to True
Then - Actions
Unit - Create 1 HeroType[(Integer A)] for (Owner of (Picked unit)) at (Center of Region_008 <gen>) facing (Center of Region_008 <gen>)
Unit - Move (Last created unit) instantly to (Center of TeamRegion[(Integer B)]) , facing (Center of Region_008 <gen>)
Camera - Pan camera for (Owner of (Picked unit)) to (Position of (Last created unit)) over 0.01 seconds
Special Effect - Create a special effect attached to the origin (Unexpected type: 'attachpoint') of (Last created unit) using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
Hero - Create Potion of Greater Healing and give it to (Last created unit)
Unit - Remove (Picked unit) from the game
Else - Actions
Else - Actions
Set Variables
Events
Map initialization
Conditions
Actions
Cinematic - Turn subtitle display override On
Player Group - Add (Player(1)) to Team[1]
Player Group - Add (Player(2)) to Team[2]
Player Group - Add (Player(3)) to Team[3]
Player Group - Add (Player(4)) to Team[4]
Player Group - Pick every player in (All players) and do (Disable fog of war)
Player Group - Pick every player in (All players) and do (Disable black mask)
Game - Set the time of day to 12
Game - Turn the day/night cycle Off
Set Variable Set HeroType[1] = "Hpal"
Set Variable Set HeroType[2] = "Hamg"
Set Variable Set HeroType[3] = "Hmkg"
Set Variable Set HeroType[4] = "Hblm"
Set Variable Set TeamRegion[1] = TeamRegion1 <gen>
Set Variable Set TeamRegion[2] = TeamRegion2 <gen>
Set Variable Set TeamRegion[3] = TeamRegion3 <gen>
Set Variable Set TeamRegion[4] = TeamRegion4 <gen>
AI
Events
Map initialization
Time - Every 10.00 seconds of game time
Conditions
Actions
For each (Integer A) from 1 to 4 , do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Player((Integer A))) controller) Equal to Computer
Then - Actions
Unit Group - Pick every unit in (Units owned by (Player((Integer A))) of type Hero Spirit) and do (Actions)
Loop - Actions
Unit - Order (Picked unit) to Patrol To . (Position of HeroSelectUnit[(Random integer number between 1 and 4)])
Unit Group - Pick every unit in (Units owned by (Player((Integer A))) matching (((Matching unit) is A Hero) Equal to True).) and do (Actions)
Loop - Actions
Unit - Order (Picked unit) to Attack-Move To . (Center of Region_008 <gen>)
Else - Actions
Herodeath
Events
Unit - A unit Becomes revivable
Conditions
DeathCondition[(Player number of (Owner of (Revivable Hero)))] Equal to False
((Revivable Hero) is A Hero) Equal to True
Actions
Countdown Timer - Start HeroDeathTimer[(Player number of (Owner of (Revivable Hero)))] as a One-shot timer that will expire in (8.00 + (2.00 x (Real((Hero level of (Revivable Hero)))))) seconds
Countdown Timer - Create a timer window for (Last started timer) with title (Name of (Owner of (Revivable Hero)))
Set Variable Set TimerWindow[(Player number of (Owner of (Revivable Hero)))] = (Last created timer window)
Wait until ((Remaining time for HeroDeathTimer[(Player number of (Owner of (Revivable Hero)))]) Equal to 0.00) , checking every 1 seconds
Countdown Timer - Destroy TimerWindow[(Player number of (Owner of (Revivable Hero)))]
For each (Integer B) from 1 to 4 , do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DeathCondition[(Player number of (Owner of (Revivable Hero)))] Equal to False
((Owner of (Revivable Hero)) is in Team[(Integer B)].) Equal to True
Then - Actions
Hero - Instantly revive (Revivable Hero) at (Center of TeamRegion[(Integer B)]) , Show revival graphics
Camera - Pan camera for (Owner of (Revivable Hero)) to (Position of (Revivable Hero)) over 0 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.