1. Are you planning to upload your awesome map to Hive? Please review the rules here.
    Dismiss Notice
  2. Find your way through the deepest dungeon in the 18th Mini Mapping Contest Poll.
    Dismiss Notice
  3. A brave new world lies beyond the seven seas. Join the 34th Modeling Contest today!
    Dismiss Notice
  4. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
Hive 3 Remoosed BETA - NOW LIVE. Go check it out at BETA Hive Workshop! Post your feedback in this new forum BETA Feedback.
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Trigger Viewer

Anna 1.w3x
Variables
GDD
GDD Variable Creator
GUI Friendly Damage Detection
Undead
Undead 1 1
Undead 1 2
Undead 2 1
Undead 2 2
Undead 3
Undead 4
Undead 4 1
Undead 4 2
Undead 4 3
House
House 1 1
House 1 2
House 2 1
House 2 2
map int
int 1
int 2
Anna
Anna 1
Anna 1 1
Anna 1 2
Anna 2
Anna 3
Anna 3 1
Anna 4
Anna 4 1
Anna 5
Anna 5 1
Anna 5 2
Spells
Spells 1
Light Blade 1
Lighthouse 1
Lighthouse 2
Lighthouse 3
The Great Portal 1
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
Crypt1 unit No
Crypt2 unit No
GDD__Integers integer Yes
GDD__LeftMapGroup group No
GDD__TriggerArray trigger Yes
GDD__UnitArray unit Yes
GDD_Damage real No
GDD_DamagedUnit unit No
GDD_DamageSource unit No
GDD_Event real No
Lighthouse_1 fogmodifier No
Quest_SaveZetherit quest No
Quest_SaveZetherit_Req1 questitem No
Quest_SaveZetherit_Req2 questitem No
UndeadInfection quest No
UndeadInfection_Req1 questitem No
UndeadInfection_Req2 questitem No
GDD Variable Creator
  Events
  Conditions
  Actions
    Set VariableSet GDD_Event = 0.00
    Set VariableSet GDD_Damage = 0.00
    Set VariableSet GDD_DamagedUnit = No unit
    Set VariableSet GDD_DamageSource = No unit
    Set VariableSet GDD__TriggerArray[0] = (This trigger)
    Set VariableSet GDD__Integers[0] = 0
    Set VariableSet GDD__UnitArray[0] = No unit
    Set VariableSet GDD__LeftMapGroup = GDD__LeftMapGroup
// GUI-Friendly Damage Detection -- v1.2.1 -- by Weep
//    http:// www.thehelper.net/forums/showthread.php?t=137957
//
//    Requires: only this trigger and its variables.
//
// -- What? --
//    This snippet provides a leak-free, GUI-friendly implementation of an "any unit takes
//    damage" event.  It requires no JASS knowledge to use.
//
//    It uses the Game - Value Of Real Variable event as its method of activating other
//    triggers, and passes the event responses through a few globals.
//
// -- Why? --
//    The traditional GUI method of setting up a trigger than runs when any unit is damaged
//    leaks trigger events.  This snippet is easy to implement and removes the need to do
//    you own GUI damage detection setup.
//
// -- How To Implement --
//    0. Before you copy triggers that use GDD into a new map, you need to copy over GDD
//       with its GDD Variable Creator trigger, or there will be a problem: the variables
//       won't be automatically created correctly.
//
//    1. Be sure "Automatically create unknown variables while pasting trigger data" is
//       enabled in the World Editor general preferences.
//    2. Copy this trigger category ("GDD") and paste it into your map.
//       (Alternately: create the variables listed in the globals block below, create a
//       trigger named "GUI Friendly Damage Detection", and paste in this entire text.)
//    3. Create your damage triggers using Game - Value Of Real Variable as the event,
//       select GDD_Event as the variable, and leave the rest of the settings to the default
//       "becomes Equal to 0.00".
//       The event responses are the following variables:
//          GDD_Damage is the amount of damage, replacing Event Response - Damage Taken.
//          GDD_DamagedUnit is the damaged unit, replacing Event Response - Triggering Unit.
//              Triggering Unit can still be used, if you need to use waits.
//              Read the -- Notes -- section below for more info.
//          GDD_DamageSource is the damaging unit, replacing Event Response - Damage Source.
//
// -- Notes --
//    GDD's event response variables are not wait-safe; you can't use them after a wait in
//    a trigger.  If you need to use waits, Triggering Unit (a.k.a. GetTriggerUnit()) can
//    be used in place of GDD_DamageSource.  There is no usable wait-safe equivalent to
//    Event Damage or Damage Source; you'll need to save the values yourself.
//
//    Don't write any values to the variables used as the event responses, or it will mess
//    up any other triggers using this snippet for their triggering.  Only use their values.
//
//    This uses arrays, so can detect damage for a maximum of 8190 units at a time, and
//    cleans up data at a rate of 33.33 per second, by default.  This should be enough for
//    most maps, but if you want to change the rate, change the value returned in the
//    GDD_RecycleRate function at the top of the code, below.
//
//    By default, GDD will not register units that have Locust at the moment of their
//    entering the game, and will not recognize when they take damage (which can only
//    happen if the Locust ability is later removed from the unit.)  To allow a unit to have
//    Locust yet still cause GDD damage events if Locust is removed, you can either design
//    the unit to not have Locust by default and add it via triggers after creation, or
//    edit the GDD_Filter function at the top of the code, below.
//
// -- Credits --
//    Captain Griffin on wc3c.net for the research and concept of GroupRefresh.
//
//    Credit in your map not needed, but please include this README.
//
// -- Version History --
//    1.2.1: Minor code cleaning.  Added configuration functions.  Updated documentation.
//    1.2.0: Made this snippet work properly with recursive damage.
//    1.1.1: Added a check in order to not index units with the Locust ability (dummy units).
//           If you wish to check for damage taken by a unit that is unselectable, do not
//           give the unit-type Locust in the object editor; instead, add the Locust ability
//           'Aloc' via a trigger after its creation, then remove it.
//    1.1.0: Added a check in case a unit gets moved out of the map and back.
//    1.0.0: First release.


//===================================================================
// Configurables.
function GDD_RecycleRate takes nothing returns real //The rate at which the system checks units to see if they've been removed from the game
    return 0.03
endfunction

function GDD_Filter takes unit u returns boolean //The condition a unit has to pass to have it registered for damage detection
    return GetUnitAbilityLevel(u, 'Aloc') == 0 //By default, the system ignores Locust units, because they normally can't take damage anyway
endfunction

//===================================================================
// This is just for reference.
// If you use JassHelper, you could uncomment this section instead of creating the variables in the trigger editor.

// globals
//  real udg_GDD_Event = 0.
//  real udg_GDD_Damage = 0.
//  unit udg_GDD_DamagedUnit
//  unit udg_GDD_DamageSource
//  trigger array udg_GDD__TriggerArray
//  integer array udg_GDD__Integers
//  unit array udg_GDD__UnitArray
//  group udg_GDD__LeftMapGroup = CreateGroup()
// endglobals

//===================================================================
// System code follows.  Don't touch!
function GDD_Event takes nothing returns boolean
    local unit damagedcache = udg_GDD_DamagedUnit
    local unit damagingcache = udg_GDD_DamageSource
    local real damagecache = udg_GDD_Damage
    set udg_GDD_DamagedUnit = GetTriggerUnit()
    set udg_GDD_DamageSource = GetEventDamageSource()
    set udg_GDD_Damage = GetEventDamage()
    set udg_GDD_Event = 1.
    set udg_GDD_Event = 0.
    set udg_GDD_DamagedUnit = damagedcache
    set udg_GDD_DamageSource = damagingcache
    set udg_GDD_Damage = damagecache
    set damagedcache = null
    set damagingcache = null
    return false
endfunction

function GDD_AddDetection takes nothing returns boolean
//  if(udg_GDD__Integers[0] > 8190) then
//      call BJDebugMsg("GDD: Too many damage events!  Decrease number of units present in the map or increase recycle rate.")
//      ***Recycle rate is specified in the GDD_RecycleRate function at the top of the code.  Smaller is faster.***
//      return
//  endif
    if(IsUnitInGroup(GetFilterUnit(), udg_GDD__LeftMapGroup)) then
        call GroupRemoveUnit(udg_GDD__LeftMapGroup, GetFilterUnit())
    elseif(GDD_Filter(GetFilterUnit())) then
        set udg_GDD__Integers[0] = udg_GDD__Integers[0]+1
        set udg_GDD__UnitArray[udg_GDD__Integers[0]] = GetFilterUnit()
        set udg_GDD__TriggerArray[udg_GDD__Integers[0]] = CreateTrigger()
        call TriggerRegisterUnitEvent(udg_GDD__TriggerArray[udg_GDD__Integers[0]], udg_GDD__UnitArray[udg_GDD__Integers[0]], EVENT_UNIT_DAMAGED)
        call TriggerAddCondition(udg_GDD__TriggerArray[udg_GDD__Integers[0]], Condition(function GDD_Event))
    endif
    return false
endfunction

function GDD_PreplacedDetection takes nothing returns nothing
    local group g = CreateGroup()
    local integer i = 0
    loop
        call GroupEnumUnitsOfPlayer(g, Player(i), Condition(function GDD_AddDetection))
        set i = i+1
        exitwhen i == bj_MAX_PLAYER_SLOTS
    endloop
    call DestroyGroup(g)
    set g = null
endfunction

function GDD_GroupRefresh takes nothing returns nothing
// Based on GroupRefresh by Captain Griffen on wc3c.net
    if (bj_slotControlUsed[5063] == true) then
        call GroupClear(udg_GDD__LeftMapGroup)
        set bj_slotControlUsed[5063] = false
    endif
    call GroupAddUnit(udg_GDD__LeftMapGroup, GetEnumUnit())
endfunction

function GDD_Recycle takes nothing returns nothing
    if(udg_GDD__Integers[0] <= 0) then
        return
    elseif(udg_GDD__Integers[1] <= 0) then
        set udg_GDD__Integers[1] = udg_GDD__Integers[0]
    endif
    if(GetUnitTypeId(udg_GDD__UnitArray[udg_GDD__Integers[1]]) == 0) then
        call DestroyTrigger(udg_GDD__TriggerArray[udg_GDD__Integers[1]])
        set udg_GDD__TriggerArray[udg_GDD__Integers[1]] = null
        set udg_GDD__TriggerArray[udg_GDD__Integers[1]] = udg_GDD__TriggerArray[udg_GDD__Integers[0]]
        set udg_GDD__UnitArray[udg_GDD__Integers[1]] = udg_GDD__UnitArray[udg_GDD__Integers[0]]
        set udg_GDD__UnitArray[udg_GDD__Integers[0]] = null
        set udg_GDD__Integers[0] = udg_GDD__Integers[0]-1
    endif
    set udg_GDD__Integers[1] = udg_GDD__Integers[1]-1
endfunction

function GDD_LeaveMap takes nothing returns boolean
    local boolean cached = bj_slotControlUsed[5063]
    if(udg_GDD__Integers[2] < 64) then
        set udg_GDD__Integers[2] = udg_GDD__Integers[2]+1
    else
        set bj_slotControlUsed[5063] = true
        call ForGroup(udg_GDD__LeftMapGroup, function GDD_GroupRefresh)
        set udg_GDD__Integers[2] = 0
    endif
    call GroupAddUnit(udg_GDD__LeftMapGroup, GetFilterUnit())
    set bj_slotControlUsed[5063] = cached
    return false
endfunction

// ===========================================================================
function InitTrig_GUI_Friendly_Damage_Detection takes nothing returns nothing
    local region r = CreateRegion()
    call RegionAddRect(r, GetWorldBounds())
    call TriggerRegisterEnterRegion(CreateTrigger(), r, Condition(function GDD_AddDetection))
    call TriggerRegisterLeaveRegion(CreateTrigger(), r, Condition(function GDD_LeaveMap))
    call GDD_PreplacedDetection()
    call TimerStart(CreateTimer(), GDD_RecycleRate(), true, function GDD_Recycle)
    set r = null
endfunction
Undead 1 1
  Events
    Time - Every (Random real number between 40.00 and 60.00) seconds of game time
  Conditions
  Actions
    Unit - Create (Random integer number between 1 and 3).Baby Zombie for Player 7 (Green) at (Center of Region_009 <gen>) facing Default building facing degrees
    Unit - Create 1.Zombie for Player 7 (Green) at (Center of Region_009 <gen>) facing Default building facing degrees
    Unit - Create (Random integer number between -2 and 2).Great Zombie for Player 7 (Green) at (Center of Region_009 <gen>) facing Default building facing degrees
    Unit - Create (Random integer number between 3 and 5).Zombie for Player 7 (Green) at (Center of Region_009 <gen>) facing Default building facing degrees
    Unit - Create (Random integer number between -4 and 1).Necromancer for Player 7 (Green) at (Center of Region_009 <gen>) facing Default building facing degrees
Undead 1 2
  Events
    Time - Every (Random real number between 40.00 and 60.00) seconds of game time
  Conditions
  Actions
    Unit - Create (Random integer number between 1 and 2).Baby Zombie for Player 7 (Green) at (Center of Region_012 <gen>) facing Default building facing degrees
    Unit - Create (Random integer number between 5 and 10).Zombie for Player 7 (Green) at (Center of Region_012 <gen>) facing Default building facing degrees
    Unit - Create (Random integer number between -2 and 2).Great Zombie for Player 7 (Green) at (Center of Region_012 <gen>) facing Default building facing degrees
    Unit - Create (Random integer number between 2 and 6).Zombie for Player 7 (Green) at (Center of Region_012 <gen>) facing Default building facing degrees
    Unit - Create (Random integer number between 0 and 2).Necromancer for Player 7 (Green) at (Center of Region_012 <gen>) facing Default building facing degrees
Undead 2 1
  Events
    Time - Every (Random real number between 40.00 and 60.00) seconds of game time
  Conditions
  Actions
    Unit - Create (Random integer number between 5 and 7).Zombie for Player 7 (Green) at (Center of Region_003 <gen>) facing Default building facing degrees
    Unit - Create (Random integer number between 2 and 5).Zombie for Player 7 (Green) at (Center of Region_003 <gen>) facing Default building facing degrees
Undead 2 2
  Events
    Time - Every (Random real number between 40.00 and 60.00) seconds of game time
  Conditions
  Actions
    Unit - Create (Random integer number between 5 and 7).Zombie for Player 7 (Green) at (Center of Region_014 <gen>) facing Default building facing degrees
    Unit - Create (Random integer number between 2 and 3).Zombie for Player 7 (Green) at (Center of Region_014 <gen>) facing Default building facing degrees
Undead 3
  Events
    Time - Every 10.00 seconds of game time
  Conditions
  Actions
    Unit Group - Pick every unit in (Units owned by Player 7 (Green).) and do (Actions)
      Loop - Actions
        Unit - Order (Picked unit) to Attack-Move To.(Position of The Great Portal 0000 <gen>)
Undead 4
  Events
    Time - Every (Random real number between 60.00 and 120.00) seconds of game time
  Conditions
  Actions
    Unit - Create (Random integer number between 5 and 10).Ghoul for Player 6 (Orange) at (Center of Region_009 <gen>) facing Default building facing degrees
    Unit - Create (Random integer number between -2 and 3).Abomination for Player 6 (Orange) at (Center of Region_009 <gen>) facing Default building facing degrees
    Unit - Create (Random integer number between 0 and 5).Crypt Fiend for Player 6 (Orange) at (Center of Region_009 <gen>) facing Default building facing degrees
    Unit - Create (Random integer number between -8 and 3).Nerubian for Player 6 (Orange) at (Center of Region_009 <gen>) facing Default building facing degrees
    Unit - Create (Random integer number between -3 and 2).Necromancer for Player 6 (Orange) at (Center of Region_012 <gen>) facing Default building facing degrees
Undead 4 1
  Events
    Time - Every 10.00 seconds of game time
  Conditions
    (House 0019 <gen> is alive) Equal to True
  Actions
    Unit Group - Pick every unit in (Units owned by Player 6 (Orange).) and do (Actions)
      Loop - Actions
        Unit - Order (Picked unit) to Attack-Move To.(Position of House 0019 <gen>)
Undead 4 2
  Events
    Time - Every 10.00 seconds of game time
  Conditions
    (House 0026 <gen> is alive) Equal to True
    (House 0019 <gen> is dead) Equal to True
  Actions
    Unit Group - Pick every unit in (Units owned by Player 6 (Orange).) and do (Actions)
      Loop - Actions
        Unit - Order (Picked unit) to Attack-Move To.(Position of House 0026 <gen>)
Undead 4 3
  Events
    Time - Every 10.00 seconds of game time
  Conditions
    (House 0019 <gen> is dead) Equal to True
    (House 0026 <gen> is dead) Equal to True
  Actions
    Unit Group - Pick every unit in (Units owned by Player 6 (Orange).) and do (Actions)
      Loop - Actions
        Unit - Order (Picked unit) to Attack-Move To.(Position of The Great Portal 0000 <gen>)
House 1 1
  Events
    Unit - House 0019 <gen> Dies
  Conditions
    (Owner of (Killing unit)) Equal to Player 3 (Teal)
  Actions
    Quest - Mark UndeadInfection_Req1 as Completed
House 1 2
  Events
    Unit - House 0019 <gen> Dies
  Conditions
    ((Owner of (Killing unit)) Equal to Player 7 (Green)) or ((Owner of (Killing unit)) Equal to Player 6 (Orange))
  Actions
    Unit - Create 1.Crypt for Player 7 (Green) at (Position of House 0019 <gen>) facing Default building facing degrees
    Set VariableSet Crypt1 = (Last created unit)
    Visibility - Create an initially Enabled visibility modifier for Player 3 (Teal) emitting Visibility from (Position of Crypt1) to a radius of 500.00.
    Quest - Mark UndeadInfection as Failed
    Player - Set the current research level of R00B (techcode) to ((Current research level of R00B (techcode) for Player 7 (Green)) + 1) for Player 7 (Green)
    Player - Set the current research level of R00B (techcode) to ((Current research level of R00B (techcode) for Player 6 (Orange)) + 1) for Player 6 (Orange)
House 2 1
  Events
    Unit - House 0026 <gen>'s life becomes Less than 50.00
  Conditions
    (Owner of (Attacking unit)) Equal to Player 3 (Teal)
  Actions
    Unit - Kill House 0026 <gen>
    Quest - Mark UndeadInfection_Req2 as Completed
House 2 2
  Events
    Unit - House 0026 <gen> Dies
  Conditions
    ((Owner of (Killing unit)) Equal to Player 7 (Green)) or ((Owner of (Killing unit)) Equal to Player 6 (Orange))
  Actions
    Unit - Create 1.Crypt for Player 7 (Green) at (Position of House 0026 <gen>) facing Default building facing degrees
    Set VariableSet Crypt2 = (Last created unit)
    Visibility - Create an initially Enabled visibility modifier for Player 3 (Teal) emitting Visibility from (Position of Crypt2) to a radius of 500.00.
    Quest - Mark UndeadInfection as Failed
    Player - Set the current research level of R00B (techcode) to ((Current research level of R00B (techcode) for Player 7 (Green)) + 1) for Player 7 (Green)
    Player - Set the current research level of R00B (techcode) to ((Current research level of R00B (techcode) for Player 6 (Orange)) + 1) for Player 6 (Orange)
int 1
  Events
    Map initialization
  Conditions
  Actions
    Game - Set the time of day to 5.00
    Unit - Make House 0019 <gen> Invulnerable
    Unit - Make House 0026 <gen> Invulnerable
    Unit - Make Lighthouse 0017 <gen> Invulnerable
    Visibility - Create an initially Enabled visibility modifier for Player 6 (Orange) emitting Visibility across (Playable map area)
    Visibility - Create an initially Enabled visibility modifier for Player 7 (Green) emitting Visibility across (Playable map area)
    Quest - Create a Optional, undiscovered quest titled Undead Infection with the description Citizens of the city of Zetherit were infested with plague. This plague is slowly tunring them into undead. Get to river Morsena, bring it's healing waters back into Zetherit and stop the infection before it's too late., using icon path ReplaceableTextures\CommandButtons\BTNFarm.blp
    Set VariableSet UndeadInfection = (Last created quest)
    Quest - Create a quest requirement for UndeadInfection with the description Destroy House next to Lighthouse before the undead
    Set VariableSet UndeadInfection_Req1 = (Last created quest requirement)
    Quest - Create a quest requirement for UndeadInfection with the description Destroy House south from the base before the undead
    Set VariableSet UndeadInfection_Req2 = (Last created quest requirement)
int 2
  Events
    Map initialization
  Conditions
  Actions
    Unit - Hide Anna 0007 <gen>
    Cinematic - Turn cinematic mode On for (All players)
    Camera - .Apply. gg_cam_Camera_001 for Player 3 (Teal) over 0 seconds
    Cinematic - Fade in over 2 seconds using texture Black Mask and color (0%, 0%, 0%) with 0% transparency
    Camera - .Apply. gg_cam_Camera_002 for Player 3 (Teal) over 4.00 seconds
    Wait 1.00 seconds
    Special Effect - Create a special effect at (Position of Anna 0007 <gen>) using Abilities\Spells\Human\MassTeleport\MassTeleportTo.mdl
    Wait 2 seconds
    Special Effect - Destroy (Last created special effect)
    Special Effect - Create a special effect at (Position of Anna 0007 <gen>) using Abilities\Spells\Human\MassTeleport\MassTeleportCaster.mdl
    Unit - Unhide Anna 0007 <gen>
    Wait 1.00 seconds
    Camera - .Apply. gg_cam_Camera_003 for Player 3 (Teal) over 4.00 seconds
    Unit - Order Anna 0007 <gen> to Move To.(Center of Region_000 <gen>)
    Wait 3.00 seconds
    Unit - Make Amondeas 0005 <gen> face (Center of Region_000 <gen>) over 1.00 seconds
    Wait 1.00 seconds
    Cinematic - Send transmission to (All players) from Amondeas 0005 <gen> named Amondeas: Play No sound and display Anna, at last!. Modify duration: Set to 2.00 seconds and Don't wait
    Wait 2 seconds
    Cinematic - Send transmission to (All players) from Anna 0007 <gen> named Anna: Play No sound and display Mister Amondeas, why did you summon me?. Modify duration: Set to 3.00 seconds and Don't wait
    Camera - .Apply. gg_cam_Camera_004 for Player 3 (Teal) over 10.00 seconds
    Wait 3.00 seconds
    Cinematic - Send transmission to (All players) from Amondeas 0005 <gen> named Amondeas: Play No sound and display I was searching in this library for the plague that is in Zetherit.. Modify duration: Set to 4.00 seconds and Don't wait
    Wait 4.00 seconds
    Cinematic - Send transmission to (All players) from Amondeas 0005 <gen> named Amondeas: Play No sound and display I found out that this plague turns living into undead.. Modify duration: Set to 4.00 seconds and Don't wait
    Wait 4.00 seconds
    Camera - .Apply. gg_cam_Camera_005 for Player 3 (Teal) over 10.00 seconds
    Cinematic - Send transmission to (All players) from Anna 0007 <gen> named Anna: Play No sound and display Is there any cure?. Modify duration: Set to 2.00 seconds and Don't wait
    Wait 2 seconds
    Cinematic - Send transmission to (All players) from Amondeas 0005 <gen> named Amondeas: Play No sound and display Kind of, yes. Take those coordinates and this bottle.. Modify duration: Set to 4.00 seconds and Don't wait
    Wait 4.00 seconds
    Cinematic - Send transmission to (All players) from Amondeas 0005 <gen> named Amondeas: Play No sound and display You have to get through the Great Portal to river Morsena and bring its healing waters to the city.. Modify duration: Set to 5.00 seconds and Don't wait
    Wait 5.00 seconds
    Cinematic - Send transmission to (All players) from Anna 0007 <gen> named Anna: Play No sound and display I'll do as you say.. Modify duration: Set to 2.00 seconds and Don't wait
    Camera - .Apply. gg_cam_Camera_006 for Player 3 (Teal) over 3.00 seconds
    Wait 3.00 seconds
    Cinematic - Turn cinematic mode Off for (All players)
    Wait 1.00 seconds
    Unit - Order Amondeas 0005 <gen> to Move To.(Center of Region_001 <gen>)
    Wait 5.00 seconds
    Quest - Display to (All players) the Quest Update message: |cffffcc00MAIN QUEST|rSave Zetherit - Get Anna to river Morsena and back to Zetherit - Anna must survive
    Quest - Create a Required quest titled Save Zetherit with the description Citizens of the city of Zetherit were infested with plague. This plague is slowly tunring them into undead. Get to river Morsena, bring it's healing waters back into Zetherit and stop the infection before it's too late., using icon path ReplaceableTextures\CommandButtons\BTNFountainOfLife.blp
    Set VariableSet Quest_SaveZetherit = (Last created quest)
    Quest - Create a quest requirement for Quest_SaveZetherit with the description Get Anna to river Morsena and back to Zetherit
    Set VariableSet Quest_SaveZetherit_Req1 = (Last created quest requirement)
    Quest - Create a quest requirement for Quest_SaveZetherit with the description Anna must survive
    Set VariableSet Quest_SaveZetherit_Req2 = (Last created quest requirement)
    Special Effect - Create a special effect at (Center of Region_001 <gen>) using Abilities\Spells\Human\MassTeleport\MassTeleportTo.mdl
    Wait 2 seconds
    Special Effect - Destroy (Last created special effect)
    Special Effect - Create a special effect at (Center of Region_001 <gen>) using Abilities\Spells\Human\MassTeleport\MassTeleportCaster.mdl
    Unit - Hide Amondeas 0005 <gen>
Anna 1
  Events
    Unit - Anna 0007 <gen> Dies
  Conditions
  Actions
    Wait 2 seconds
    Game - Defeat Player 3 (Teal) with the message: Anna died!
Anna 1 1
  Events
    Unit - The Great Portal 0000 <gen> Dies
  Conditions
  Actions
    Wait 2 seconds
    Game - Defeat Player 3 (Teal) with the message: The Great Portal was destroyed!
Anna 1 2
  Events
    Unit - Passage Generator 0030 <gen> Dies
  Conditions
  Actions
    Wait 2 seconds
    Game - Defeat Player 3 (Teal) with the message: Passage Generator was destroyed!
Anna 2
  Events
    Unit - A unit enters Region_002 <gen>
  Conditions
  Actions
    Cinematic - Send transmission to (All players) from Anna 0007 <gen> named Anna: Play No sound and display Those undead... These were miners.... I can't fight them, I must get behind the river!. Modify duration: Set to 5.00 seconds and Don't wait
    Unit Group - Pick every unit in (Units in Region_003 <gen>) and do (Actions)
      Loop - Actions
        Unit - Order (Picked unit) to Attack.Anna 0007 <gen>
    Trigger - Turn off (This trigger)
Anna 3
  Events
    Unit - A unit enters Region_005 <gen>
  Conditions
    (Entering unit) Equal to Anna 0007 <gen>
  Actions
    Trigger - Turn on Lighthouse_1 <gen>
Anna 3 1
  Events
    Unit - A unit leaves Region_005 <gen>
  Conditions
    (Leaving unit) Equal to Anna 0007 <gen>
  Actions
    Trigger - Turn off Lighthouse_1 <gen>
Anna 4
  Events
    Unit - A unit comes within 600.00 of House 0019 <gen>
  Conditions
    (Entering unit) Equal to Anna 0007 <gen>
  Actions
    Unit - Set life of (Entering unit) to 100%
    Special Effect - Create a special effect at (Position of Anna 0007 <gen>) using Abilities\Spells\Human\DispelMagic\DispelMagicTarget.mdl
    Trigger - Turn off (This trigger)
Anna 4 1
  Events
    Unit - A unit comes within 600.00 of House 0026 <gen>
  Conditions
    (Entering unit) Equal to Anna 0007 <gen>
  Actions
    Unit - Set life of (Entering unit) to 100%
    Special Effect - Create a special effect at (Position of Anna 0007 <gen>) using Abilities\Spells\Human\DispelMagic\DispelMagicTarget.mdl
    Trigger - Turn off (This trigger)
Anna 5
  Events
    Unit - A unit enters Region_011 <gen>
  Conditions
  Actions
    Cinematic - Fade out and back in over 2.00 seconds using texture Black Mask and color (0%, 0%, 0%) with 0% transparency
    Trigger - Turn off (This trigger)
    Wait 1.00 seconds
    Selection - Clear selection for Player 3 (Teal).
    Camera - .Apply. gg_cam_Camera_009 for Player 3 (Teal) over 0.00 seconds
    Cinematic - Turn cinematic mode On for (All players)
    Unit - Move Anna 0007 <gen> instantly to (Center of Region_010 <gen>), facing (Position of Sorceress 0073 <gen>)
    Wait 0.50 seconds
    Cinematic - Send transmission to (All players) from Anna 0007 <gen> named Anna: Play No sound and display Let me pass, I have orders from Amondeas to use the Great Portal to river Morsena.. Modify duration: Set to 5.00 seconds and Don't wait
    Wait 2 seconds
    Camera - .Apply. gg_cam_Camera_007 for Player 3 (Teal) over 5.00 seconds
    Wait 3.00 seconds
    Cinematic - Send transmission to (All players) from Sorceress 0073 <gen> named Sorceress: Play No sound and display I am sorry, but there is a malfunction, the portal doesn't work.. Modify duration: Set to 4.00 seconds and Don't wait
    Wait 4.00 seconds
    Cinematic - Send transmission to (All players) from Anna 0007 <gen> named Anna: Play No sound and display But I have to get through.. Modify duration: Set to 3.00 seconds and Don't wait
    Camera - .Apply. gg_cam_Camera_008 for Player 3 (Teal) over 10.00 seconds
    Wait 3.00 seconds
    Cinematic - Send transmission to (All players) from Sorceress 0073 <gen> named Sorceress: Play No sound and display We are already working on it and will hopefully-. Modify duration: Set to 4.00 seconds and Don't wait
    Unit - Create 1.Swordsman for Player 4 (Purple) at (Center of Region_007 <gen>) facing Default building facing degrees
    Unit - Order (Last created unit) to Move To.(Center of Region_008 <gen>)
    Wait 4.00 seconds
    Cinematic - Send transmission to (All players) from (Last created unit) named Swordsman: Play No sound and display Sorry to interrupt you, but our scouts discovered that towns Orela and Wryay were completly turned into undead. Also mines didn't respond as intended.. Modify duration: Set to 9.00 seconds and Don't wait
    Unit - Make Sorceress 0073 <gen> face (Last created unit) over 0.50 seconds
    Unit - Make Anna 0007 <gen> face (Last created unit) over 0.50 seconds
    Wait 9.00 seconds
    Cinematic - Send transmission to (All players) from (Last created unit) named Swordsman: Play No sound and display We might be facing huge forces of undead heading our way.. Modify duration: Set to 4.00 seconds and Don't wait
    Wait 4.00 seconds
    Unit - Make Sorceress 0073 <gen> face Anna 0007 <gen> over 0.50 seconds
    Unit - Make Anna 0007 <gen> face Sorceress 0073 <gen> over 0.50 seconds
    Wait 1.00 seconds
    Cinematic - Send transmission to (All players) from Sorceress 0073 <gen> named Sorceress: Play No sound and display We will have to protect ourselves until the portal works again.. Modify duration: Set to 4.00 seconds and Don't wait
    Unit Group - Pick every unit in (Units in (Playable map area) owned by Player 10 (Light Blue)) and do (Actions)
      Loop - Actions
        Unit - Change ownership of (Picked unit) to Player 3 (Teal) and Retain color
    Unit Group - Pick every unit in (Units in (Playable map area) owned by Player 4 (Purple)) and do (Actions)
      Loop - Actions
        Unit - Change ownership of (Picked unit) to Player 3 (Teal) and Retain color
    Player - Turn Gives bounty On for Player 6 (Orange)
    Player - Turn Gives bounty On for Player 7 (Green)
    Player - Set the current research level of R00B (techcode) to ((Current research level of R00B (techcode) for Player 7 (Green)) + 1) for Player 7 (Green)
    Player - Set the current research level of R00B (techcode) to ((Current research level of R00B (techcode) for Player 6 (Orange)) + 1) for Player 6 (Orange)
    Wait 3.00 seconds
    Camera - .Apply. gg_cam_Camera_010 for Player 3 (Teal) over 2.00 seconds
    Wait 1.00 seconds
    Cinematic - Turn cinematic mode Off for (All players)
    Unit - Set mana of Passage Generator 0030 <gen> to 0.00%
    Wait 2 seconds
    Quest - Display to (All players) the Quest Update message: |cffffcc00SIDE QUEST|rUndead infection - Destroy House next to Lighthouse before the undead - Destroy House south from the base before the undead
    Quest - Mark UndeadInfection as Discovered
    Wait 60.00 seconds
    Trigger - Turn on Undead_4 <gen>
    Wait 180.00 seconds
    Player - Set the current research level of R00B (techcode) to ((Current research level of R00B (techcode) for Player 7 (Green)) + 1) for Player 7 (Green)
    Player - Set the current research level of R00B (techcode) to ((Current research level of R00B (techcode) for Player 6 (Orange)) + 1) for Player 6 (Orange)
    Wait 240.00 seconds
    Player - Set the current research level of R00B (techcode) to ((Current research level of R00B (techcode) for Player 7 (Green)) + 1) for Player 7 (Green)
    Player - Set the current research level of R00B (techcode) to ((Current research level of R00B (techcode) for Player 6 (Orange)) + 1) for Player 6 (Orange)
    Wait 240.00 seconds
    Player - Set the current research level of R00B (techcode) to ((Current research level of R00B (techcode) for Player 7 (Green)) + 1) for Player 7 (Green)
    Player - Set the current research level of R00B (techcode) to ((Current research level of R00B (techcode) for Player 6 (Orange)) + 1) for Player 6 (Orange)
Anna 5 1
  Events
    Unit - Passage Generator 0030 <gen> Finishes casting an ability
  Conditions
  Actions
    Camera - Pan camera for Player 3 (Teal) to (Position of Anna 0007 <gen>) over 0 seconds
    Trigger - Turn off (This trigger)
    Wait 1.00 seconds
    Special Effect - Create a special effect at (Position of Anna 0007 <gen>) using Units\NightElf\Wisp\WispExplode.mdl
    Special Effect - Create a special effect at (Position of Anna 0007 <gen>) using Objects\Spawnmodels\NightElf\NECancelDeath\NECancelDeath.mdl
    Special Effect - Create a special effect at (Position of Anna 0007 <gen>) using Objects\Spawnmodels\Undead\UCancelDeath\UCancelDeath.mdl
    Unit - Remove Anna 0007 <gen> from the game
    Wait 2 seconds
    Game - Victory Player 3 (Teal) (Show dialogs, Show scores)
Anna 5 2
  Events
    Unit - A unit enters Region_011 <gen>
  Conditions
  Actions
    Trigger - Turn off (This trigger)
    Wait 30.00 seconds
    Unit - Make House 0019 <gen> Vulnerable
    Unit - Make House 0026 <gen> Vulnerable
    Unit - Make Lighthouse 0017 <gen> Vulnerable
    Trigger - Turn on Undead_1_1 <gen>
    Trigger - Turn on Undead_1_2 <gen>
    Trigger - Turn on Undead_2_1 <gen>
    Trigger - Turn on Undead_2_2 <gen>
    Trigger - Turn on Undead_3 <gen>
    Trigger - Turn on Undead_4_1 <gen>
Spells 1
  Events
    Unit - A unit enters Region_006 <gen>
  Conditions
  Actions
    Cinematic - Send transmission to (All players) from Anna 0007 <gen> named Anna: Play No sound and display Maybe I should utilize my Light equipment to deal with the undead.. Modify duration: Set to 4.00 seconds and Don't wait
    Unit - Add Light Blade to Anna 0007 <gen>
    Unit - Add Radiance to Anna 0007 <gen>
    Trigger - Turn off (This trigger)
Light Blade 1
  Events
    Unit - A unit Is attacked
  Conditions
    ((Attacking unit) has buff Roar) Equal to True
  Actions
    Wait 0.35 seconds
    Unit - Remove Roar buff from (Attacking unit)
Lighthouse 1
  Events
    Time - Every 0.05 seconds of game time
  Conditions
  Actions
    Visibility - Destroy Lighthouse_1
    Visibility - Create an initially Enabled visibility modifier for Player 3 (Teal) emitting Visibility from (Position of Lighthouse 0017 <gen>) to a radius of 7000.00.
    Set VariableSet Lighthouse_1 = (Last created visibility modifier)
    Wait 0.04 seconds
    Visibility - Destroy Lighthouse_1
Lighthouse 2
  Events
    Unit - Lighthouse 0017 <gen> Dies
  Conditions
  Actions
    Trigger - Turn off Anna_3 <gen>
    Trigger - Turn off Lighthouse_1 <gen>
    Trigger - Turn off Lighthouse_3 <gen>
Lighthouse 3
  Events
    Unit - A unit Finishes research
  Conditions
    (Researched tech-type) Equal to R00A (techcode)
  Actions
    Trigger - Turn on Lighthouse_1 <gen>
The Great Portal 1
  Events
    Time - Every 1.00 seconds of game time
  Conditions
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (The Portal Defender 0002 <gen> is alive) Equal to True
      Then - Actions
        Unit - Make The Great Portal 0000 <gen> Invulnerable
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (The Portal Defender 0001 <gen> is alive) Equal to True
      Then - Actions
        Unit - Make The Great Portal 0000 <gen> Invulnerable
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (The Portal Defender 0001 <gen> is alive) Equal to False
        (The Portal Defender 0002 <gen> is alive) Equal to False
      Then - Actions
        Unit - Make The Great Portal 0000 <gen> Vulnerable
      Else - Actions