5939 Posts in 1233 Topics - by 2135 Members - Latest Member: Jamepoison

Welcome

Welcome to the community where modding your favorite game can be possible, and supported by a nice and warm community. Here you will find resources which will help you to develop your projects faster. Additionally you can show your projects and share with a growing community, even be part of the Blizzard Modding Network, which aims to gather all the projects and clans around this game.

Please enjoy your stance here.

Warcraft III Spells & systems

Illusion Editor v1.3 [vJass + GUI Support]


By AGD

ILLUSION EDITOR



This system provides users with helpful utilities with regards to creation of illusions as well as the manipulation of many of their aspects.
With this system, you can now create illusions of any type as easily as creating units. This even allows you to create permanent illusions.
Read the script header for more details.

Please give credits to the following people if you use this resource in your map.

Credits:
    - AGD (Author)
    - TriggerHappy (UnitDex)
    - Looking_For_Help (PDDS)
    - Bribe (table)
    - Magtheridon96 (RegisterPlayerUnitEvent)
    - Vexorian (TimerUtils)
    - Rising_Dusk (GroupUtils)
    - Alain.Mark (PlayerUtils)

Main Script
Code: jass  [Select]
  1. library IllusionEditor /*
  2.  
  3.  
  4.   */requires /*
  5.  
  6.   */UnitDex /*
  7.         http://www.hiveworkshop.com/threads/system-unitdex-unit-indexer.248209/
  8.  
  9.   */DamageEvent /*
  10.         http://www.hiveworkshop.com/threads/system-physical-damage-detection.228456/
  11.  
  12.   */Table /*
  13.         http://www.hiveworkshop.com/threads/snippet-new-table.188084/
  14.  
  15.   */optional RegisterPlayerUnitEvent /*
  16.         http://www.hiveworkshop.com/threads/snippet-registerplayerunitevent.203338/
  17.  
  18.   */optional TimerUtils /*
  19.         http://www.wc3c.net/showthread.php?p=1020244
  20.  
  21.   */optional GroupUtils /*
  22.         http://www.wc3c.net/showthread.php?t=104464
  23.  
  24.   */optional PlayerUtils /*
  25.         http://www.hiveworkshop.com/threads/snippet-playerutils.213620/
  26.  
  27.  
  28. *///! novjass
  29.  
  30.      _______________________
  31.     |                       |
  32.     | Illusion Editor v1.3  |
  33.     |    Written by AGD     |
  34.     |_______________________|
  35.  
  36. /*     This system gives you freedom and ease in creating illusions. With this, you
  37.      can now create illusions of any type as easily as creating units or make an
  38.      illusion copy from an already existing unit, with the ability to change many
  39.      of their aspects (such as duration, damage dealt, damage recieved, deathSFX,
  40.      and hero level) dynamically.
  41.  
  42.  
  43.      Hint:
  44.          - Use zero or any negative value for duration to make a permanent illusion
  45.          - Setting a hero illusion's level might cause a change to its proper name
  46.  
  47.      To Import:
  48.          - Copy all the neccessary Object Editor data or alternatively use the object merger
  49.          - Copy this trigger/trigger category together with the requirements
  50.          - Configure the configurable object rawcodes
  51. */
  52.     |=======|
  53.     |  API  |
  54.     |=======|
  55.  
  56.         function CreateIllusion takes player whichPlayer, integer ID, real dur, real damageDealt, real damageReceived, real x, real y, real angle returns unit/*
  57.         - Creates an illusion of type <ID>
  58.  
  59.       */function CopyUnit takes player whichPlayer, unit u, real dur, real damageDealt, real damageReceived, real x, real y, real angle returns unit/*
  60.         - Creates an illusion copy of a unit which possesses the same abilities and items as the original unit
  61.  
  62.       */function SetIllusionLevel takes unit u, integer level, boolean showEyeCandy returns boolean/*
  63.         - Sets the level of the illusion to a desired value and returns boolean value depending on the success of the operation
  64.           (Only works if the illusion is a hero and if it was created using this system)
  65.  
  66.       */function SetIllusionDuration takes unit u, real time returns boolean/*
  67.         - Sets the duration of the illusion and returns a boolean value depending on the success of the operation
  68.           (This only works for illusions created by this system)
  69.  
  70.       */function AddIllusionDuration takes unit u, real extraTime returns boolean/*
  71.         - Adds an extra duration to an illusion's timed life and returns a boolean value depending on the success of the operation
  72.           (This only works for illusions created by this system)
  73.  
  74.       */function SetIllusionDamageFactor takes unit u, real factor returns boolean/*
  75.         - Sets the damagedealt factor of the illusion and returns a boolean value depending on the success of the operation
  76.           (This only works for illusions created by this system)
  77.  
  78.       */function SetIllusionReceiveFactor takes unit u, real factor returns boolean/*
  79.         - Sets the damagereceivefactor of the illusion and returns a boolean value depending on the success of the operation
  80.           (This only works for illusions created by this system)
  81.  
  82.       */function ShowIllusionDeathEffect takes unit u, boolean flag returns boolean/*
  83.         - Sets the illusion's death animation ON/OFF and returns a boolean value depending on the success of the operation
  84.           (This only works for illusions created by this system)
  85.  
  86.       */function SetIllusionDeathEffect takes unit u, string model returns boolean/*
  87.         - Sets the death animation of the illusion and returns a boolean value depending on the success of the operation
  88.           (This only works for illusions created by this system)
  89.  
  90.       */function GetIllusionElapsedTime takes unit u returns real/*
  91.         - Returns the elapsed time of the illusion
  92.           (This will return 0 for illusions not created by this system)
  93.  
  94.       */function GetIllusionRemainingDuration takes unit u returns real/*
  95.         - Returns the remaining duration of the illusion
  96.           (This will return 0 for illusions not created by this system)
  97.  
  98.       */function GetIllusionTotalDuration takes unit u returns real/*
  99.         - Returns the duration of the illusion
  100.           (This will return 0 for illusions not created by this system)
  101.  
  102.       */function GetIllusionDamageFactor takes unit u returns real/*
  103.         - Returns the damagedealt factor of the illusion
  104.           (This will return 0 for illusions not created by this system)
  105.  
  106.       */function GetIllusionReceiveFactor takes unit u returns real/*
  107.         - Returns the damagereceive factor of the illusion
  108.           (This will return 0 for illusions not created by this system)
  109.  
  110.       */function GetLastIllusion takes nothing returns unit/*
  111.         - Returns the last illusion created using this system
  112.  
  113.       */function GetIllusionFlag takes unit u returns boolean/*
  114.         - Checks if the illusion is created by this system or not
  115.  
  116.       */function IllusionDeathEvent takes code c returns nothing/*
  117.         - Adds a code to run when an illusion created from this system dies
  118.  
  119.  
  120. *///! endnovjass
  121.  
  122.  
  123.     globals
  124.  
  125.         ///////////////////////////
  126.         // Configuration Section //
  127.         ///////////////////////////
  128.  
  129.         /////////////////////////////////////////////////////
  130.         // Rawcode of the item used for creating illusions //
  131.         /////////////////////////////////////////////////////
  132.         private constant integer ITEM_ID = 'I000'
  133.         /////////////////////////////////////////////////////
  134.         // Rawcode of the dummy caster                     //
  135.         /////////////////////////////////////////////////////
  136.         private constant integer DUMMY_ID = 'i001'
  137.         /////////////////////////////////////////////////////
  138.         // Illusion timed life check interval              //
  139.         /////////////////////////////////////////////////////
  140.         private constant real LOOP_INTERVAL = 0.03125
  141.         /////////////////////////////////////////////////////
  142.         // Synchronize this value with the duration of     //
  143.         // illusions produced by the the item in the       //
  144.         // object editor so that this system will be able  //
  145.         // to make the neccessary adjustments.             //
  146.         // It would be better to set this value to 3600    //
  147.         // which is the maximum duration you can put in    //
  148.         // the object editor. But always be reminded that  //
  149.         // everytime you change this value, change also    //
  150.         // that of the object editor's!                    //
  151.         /////////////////////////////////////////////////////
  152.         private constant real ITEM_DUR_LIMIT = 5.00
  153.         /////////////////////////////////////////////////////
  154.         // The remaining time of the illusion before it    //
  155.         // would be replaced with another one in case the  //
  156.         // desired duration of the illusion is greater     //
  157.         // than what the item could provide                //
  158.         /////////////////////////////////////////////////////
  159.         private constant real REPLACE_TIME_ALLOWANCE = 0.10
  160.         /////////////////////////////////////////////////////
  161.         // The default death animation of the illusions    //
  162.         /////////////////////////////////////////////////////
  163.         private constant string DEFAULT_DEATH_SFX = "Abilities\\Spells\\Orc\\MirrorImage\\MirrorImageDeathCaster.mdl"
  164.         /////////////////////////////////////////////////////
  165.         // The owning player of the dummy unit             //
  166.         /////////////////////////////////////////////////////
  167.         private constant player DUMMY_OWNER = Player(15)
  168.         /////////////////////////////////////////////////////
  169.         // The prefix of the operation error message when  //
  170.         // debug mode is enabled                           //
  171.         /////////////////////////////////////////////////////
  172.         private constant string ERROR_PREFIX = "Operation Failed: "
  173.  
  174.         //////////////////////////
  175.         // End of Configuration //
  176.         //////////////////////////
  177.  
  178.     endglobals
  179.  
  180.  
  181.     //===== Do not change anything below this line if you're not so sure on what you're doing =====//
  182.     native UnitAlive takes unit u returns boolean
  183.  
  184.     private keyword S
  185.  
  186.     globals
  187.  
  188.         private HashTable hash
  189.         private trigger deathEvent      = CreateTrigger()
  190.         private trigger illuDeathTrig   = null
  191.         private integer index           = 0
  192.         private integer tempInt         = 0
  193.         private integer usedDeathEvent  = 0
  194.         private real illusionDeathEvent = 0.00
  195.         private unit illusion
  196.         private unit U
  197.         private unit dummyCaster
  198.         private item casterItem
  199.         private player localPlayer
  200.         private filterfunc deathHandler
  201.         private code durationUpdater
  202.  
  203.         // These variables are used to store unit specific data for each illusion created using this system
  204.         private integer array maxTargeterCount
  205.         private integer array order
  206.         private integer array orderType
  207.         private boolean array flag
  208.         private boolean array check
  209.         private boolean array showDeath
  210.         private real array targPointX
  211.         private real array targPointY
  212.         private unit array orderTarget
  213.         private real array elapsed
  214.         private real array duration
  215.         private real array damageFactor
  216.         private real array receiveFactor
  217.         private real array X
  218.         private real array Y
  219.         private real array facing
  220.         private player array owner
  221.         private string array deathSFX
  222.  
  223.     endglobals
  224.  
  225.     static if DEBUG_MODE then
  226.         private function Debug takes string msg returns nothing
  227.             call DisplayTimedTextToPlayer( localPlayer, 0, 0, 30, "|CFFFFCC00[Illusion Editor]|R  " + msg )
  228.         endfunction
  229.     endif
  230.  
  231.  
  232.     ///////////////////////////////////////////////////
  233.     // These three functions caches the order of the //
  234.     // expiring illusion units to be passed to their //
  235.     // replacements. Similarly when the expiring     //
  236.     // illusion is targeted with an order, the order //
  237.     // will be redirected to its replacement as well.//
  238.     ///////////////////////////////////////////////////
  239.     private function CacheTargetOrder takes nothing returns nothing
  240.         local unit u = GetOrderedUnit()
  241.         local unit t = GetOrderTargetUnit()
  242.         local integer i = GetUnitId( u )
  243.         local integer tDex = GetUnitId( t )
  244.         if check[i] then
  245.             set orderType[i] = 1
  246.             set orderTarget[i] = t
  247.         endif
  248.         if check[tDex] then
  249.             set order[i] = GetUnitCurrentOrder( u )
  250.             if not flag[i] then
  251.                 loop
  252.                     set maxTargeterCount[tDex] = maxTargeterCount[tDex] + 1
  253.                     if hash[tDex].unit[maxTargeterCount[tDex]] == null then
  254.                         set hash[tDex].unit[maxTargeterCount[tDex]] = u
  255.                         set flag[i] = true
  256.                         break
  257.                     endif
  258.                 endloop
  259.             endif
  260.         endif
  261.         set u = null
  262.         set t = null
  263.     endfunction
  264.  
  265.     private function CachePointOrder takes nothing returns nothing
  266.         local integer i = GetUnitId( GetOrderedUnit() )
  267.         set flag[i] = false
  268.         if check[i] then
  269.             set orderType[i] = 2
  270.             set targPointX[i] = GetOrderPointX()
  271.             set targPointY[i] = GetOrderPointY()
  272.         endif
  273.     endfunction
  274.  
  275.     private function CacheOrder takes nothing returns nothing
  276.         local integer i = GetUnitId( GetOrderedUnit() )
  277.         set flag[i] = false
  278.         if check[i] then
  279.             set orderType[i] = 3
  280.         endif
  281.     endfunction
  282.  
  283.  
  284.     ///////////////
  285.     // On Summon //
  286.     ///////////////
  287.     private function OnSummon takes nothing returns nothing
  288.         local timer t
  289.         local integer i
  290.         local integer uDex
  291.         if GetSummoningUnit() == dummyCaster then
  292.             set i = GetUnitId( dummyCaster )
  293.             set U = GetTriggerUnit()
  294.             set uDex = GetUnitId( U )
  295.             set check[uDex] = true
  296.             set showDeath[uDex] = true
  297.             set duration[uDex] = duration[i]
  298.             set damageFactor[uDex] = damageFactor[i]
  299.             set receiveFactor[uDex] = receiveFactor[i]
  300.             set owner[uDex] = owner[i]
  301.             set deathSFX[uDex] = DEFAULT_DEATH_SFX
  302.             set elapsed[uDex] = 0
  303.             set maxTargeterCount[uDex] = 0
  304.             static if LIBRARY_TimerUtils then
  305.                 set t = NewTimer()
  306.             else
  307.                 set t = CreateTimer()
  308.             endif
  309.             set hash[GetHandleId( t )].unit[0] = U
  310.             call TimerStart( t, LOOP_INTERVAL, true, durationUpdater )
  311.             call SetUnitOwner( U, owner[i], true )
  312.             call SetUnitFacing( U, facing[i] )
  313.             if IsUnitType( U, UNIT_TYPE_STRUCTURE ) then
  314.                 call SetUnitPosition( U, X[i], Y[i] )
  315.             else
  316.                 call SetUnitX( U, X[i] )
  317.                 call SetUnitY( U, Y[i] )
  318.             endif
  319.             call TriggerRegisterUnitStateEvent( deathEvent, U, UNIT_STATE_LIFE, LESS_THAN, UNIT_MIN_LIFE )
  320.             set t = null
  321.         endif
  322.     endfunction
  323.  
  324.  
  325.     //! textmacro CREATOR takes FUNC, TAKE, X, TARGET
  326.     private function $FUNC$ takes player whichPlayer, $TAKE$, real dur, real damageDealt, real damageReceived, real x, real y, real angle returns unit
  327.         local integer i = GetUnitId( dummyCaster )
  328.         $X$local unit tempUnit = CreateUnit( DUMMY_OWNER, ID, x, y, angle )
  329.         if dur < 0 then
  330.             set dur = 0
  331.         endif
  332.         if damageDealt < 0 then
  333.             set damageDealt = 0
  334.         endif
  335.         if damageReceived < 0 then
  336.             set damageReceived = 0
  337.         endif
  338.         set X[i] = x
  339.         set Y[i] = y
  340.         set duration[i] = dur
  341.         set damageFactor[i] = damageDealt
  342.         set receiveFactor[i] = damageReceived
  343.         set facing[i] = angle
  344.         set owner[i] = whichPlayer
  345.         call UnitUseItemTarget( dummyCaster, casterItem, $TARGET$ )
  346.         $X$call RemoveUnit( tempUnit )
  347.         $X$set tempUnit = null
  348.         return U
  349.     endfunction
  350.     //! endtextmacro
  351.     //! runtextmacro CREATOR( "Create", "integer ID", "", "tempUnit" )
  352.     //! runtextmacro CREATOR( "Copy", "unit u", "//", "u" )
  353.  
  354.  
  355.     /////////////////////////////////////////////////
  356.     // This function controls the duration of the  //
  357.     // illusions as well as replacing them in case //
  358.     // their hardcoded lifetime expires before     //
  359.     // meeting the duration desired for them       //
  360.     /////////////////////////////////////////////////
  361.     private function AdjustTimedLife takes nothing returns nothing
  362.         local timer t      = GetExpiredTimer()
  363.         local unit u       = hash[GetHandleId( t )].unit[0]
  364.         local integer i    = GetUnitId( u )
  365.         local integer lastOrder
  366.         local unit new
  367.         local real toAdd
  368.         if UnitAlive( u ) and u != null then
  369.             set elapsed[i] = elapsed[i] + LOOP_INTERVAL
  370.             if duration[i] < ITEM_DUR_LIMIT and ( ( duration[i] > 0 and elapsed[i] >= duration[i] ) or duration[i] < 0.00 ) then
  371.                 call hash.remove( GetHandleId( t ) )
  372.                 call RemoveUnit( u )
  373.                 static if LIBRARY_TimerUtils then
  374.                     call ReleaseTimer( t )
  375.                 else
  376.                     call DestroyTimer( t )
  377.                 endif
  378.             elseif elapsed[i] >= ITEM_DUR_LIMIT - REPLACE_TIME_ALLOWANCE then
  379.                 set toAdd = duration[i] - ( ITEM_DUR_LIMIT - REPLACE_TIME_ALLOWANCE )
  380.                 if toAdd < 0 then
  381.                     set toAdd = 0
  382.                 endif
  383.                 set lastOrder = GetUnitCurrentOrder( u )
  384.                 set new = Copy( owner[i], u, toAdd, damageFactor[i], receiveFactor[i], GetUnitX( u ), GetUnitY( u ), GetUnitFacing( u ) )
  385.                 //! textmacro REDIRECTDATA takes KEY, NEWLIFE, NEWMANA
  386.                 call ShowUnit( u, false )
  387.                 call SetWidgetLife( new, $NEWLIFE$ )
  388.                 call SetUnitState( new, UNIT_STATE_MANA, $NEWMANA$ )
  389.                 set index = 0
  390.                 loop
  391.                     set index = index + 1
  392.                     set U = hash[$KEY$].unit[index]
  393.                     set tempInt = GetUnitId( U )
  394.                     if U != null and flag[tempInt] then
  395.                         set flag[tempInt] = false
  396.                         call IssueTargetOrderById( U, order[tempInt], new )
  397.                     endif
  398.                     exitwhen index > maxTargeterCount[i]
  399.                 endloop
  400.                 if orderType[i] == 1 then
  401.                     call IssueTargetOrderById( new, lastOrder, orderTarget[i] )
  402.                 elseif orderType[i] == 2 then
  403.                     call IssuePointOrderById( new, lastOrder, targPointX[i], targPointY[i] )
  404.                 elseif orderType[i] == 3 then
  405.                     call IssueImmediateOrderById( new, lastOrder )
  406.                 endif
  407.                 if IsUnitSelected( u, localPlayer ) then
  408.                     call SelectUnit( new, true )
  409.                 endif
  410.                 set maxTargeterCount[i] =  0
  411.                 set index = GetUnitId( new )
  412.                 set deathSFX[index] = deathSFX[i]
  413.                 set showDeath[index] = showDeath[i]
  414.                 //! endtextmacro
  415.                 //! runtextmacro REDIRECTDATA( "i", "GetWidgetLife( u )", "GetUnitState( u, UNIT_STATE_MANA )" )
  416.                 call hash.remove( GetHandleId( t ) )
  417.                 set showDeath[i] = false
  418.                 call RemoveUnit( u )
  419.                 static if LIBRARY_TimerUtils then
  420.                     call ReleaseTimer( t )
  421.                 else
  422.                     call DestroyTimer( t )
  423.                 endif
  424.                 if u == illusion then
  425.                     set illusion = new
  426.                 endif
  427.                 set new = null
  428.             endif
  429.         endif
  430.         set t = null
  431.         set u = null
  432.     endfunction
  433.  
  434.  
  435.     /////////////////////////////////
  436.     // Public APIs                 //
  437.     /////////////////////////////////
  438.  
  439.     function CreateIllusion takes player whichPlayer, integer ID, real dur, real damageDealt, real damageReceived, real x, real y, real angle returns unit
  440.         set illusion = Create( whichPlayer, ID, dur, damageDealt, damageReceived, x, y, angle )
  441.         return illusion
  442.     endfunction
  443.  
  444.     function CopyUnit takes player whichPlayer, unit u, real dur, real damageDealt, real damageReceived, real x, real y, real angle returns unit
  445.         set illusion = Copy( whichPlayer, u, dur, damageDealt, damageReceived, x, y, angle )
  446.         return illusion
  447.     endfunction
  448.  
  449.     function SetIllusionLevel takes unit u, integer level, boolean showEyeCandy returns boolean
  450.         local integer i = GetUnitId( u )
  451.         local integer lastOrder
  452.         local unit tempUnit
  453.         local unit new
  454.         local real x
  455.         local real y
  456.         local boolean success = false
  457.         if check[i] then
  458.             if IsUnitType( u, UNIT_TYPE_HERO ) then
  459.                 set x = GetUnitX( u )
  460.                 set y = GetUnitY( u )
  461.                 set tempUnit = CreateUnit( DUMMY_OWNER, GetUnitTypeId( u ), x, y, GetUnitFacing( u ) )
  462.                 set lastOrder = GetUnitCurrentOrder( u )
  463.                 call SetHeroLevel( tempUnit, level, false )
  464.                 set new = Copy( owner[i], tempUnit, duration[i], damageFactor[i], receiveFactor[i], x, y, GetUnitFacing( u ) )
  465.                 set index = 0
  466.                 loop
  467.                     set index = index + 1
  468.                     call UnitAddItemToSlotById( new, GetItemTypeId( UnitItemInSlot( u, index ) ), index )
  469.                     exitwhen index == 6
  470.                 endloop
  471.                 //! runtextmacro REDIRECTDATA( "GetUnitId( u )", "GetWidgetLife( u )*GetWidgetLife( new )/GetUnitState( u, UNIT_STATE_MAX_LIFE )", "GetUnitState( u, UNIT_STATE_MANA )*GetUnitState( new, UNIT_STATE_MANA )/GetUnitState( u, UNIT_STATE_MAX_MANA )" )
  472.                 call RemoveUnit( u )
  473.                 if showEyeCandy then
  474.                     call DestroyEffect( AddSpecialEffectTarget( "Abilities\\Spells\\Other\\Levelup\\LevelupCaster.mdl", new, "origin" ) )
  475.                 endif
  476.                 set success = true
  477.                 set tempUnit = null
  478.                 set new = null
  479.             debug else
  480.                 debug call Debug( ERROR_PREFIX + "Specified illusion is not a hero" )
  481.             endif
  482.         debug else
  483.             debug call Debug( ERROR_PREFIX + "Specified unit is not an illusion created by the system" )
  484.         endif
  485.         return success
  486.     endfunction
  487.  
  488.     //! textmacro DEBUG takes RETURN
  489.     if not check[i] then
  490.         debug call Debug( ERROR_PREFIX + "Specified unit is not an illusion created by the system" )
  491.         $RETURN$
  492.     endif
  493.     //! endtextmacro
  494.  
  495.     function SetIllusionDuration takes unit u, real time returns boolean
  496.         local integer i = GetUnitId( u )
  497.         //! runtextmacro DEBUG( "return false" )
  498.         set duration[i] = time
  499.         return true
  500.     endfunction
  501.  
  502.     function AddIllusionDuration takes unit u, real extraTime returns boolean
  503.         local integer i = GetUnitId( u )
  504.         //! runtextmacro DEBUG( "return false" )
  505.         set duration[i] = duration[i] + extraTime
  506.         return true
  507.     endfunction
  508.  
  509.     function SetIllusionDamageFactor takes unit u, real factor returns boolean
  510.         local integer i = GetUnitId( u )
  511.         //! runtextmacro DEBUG( "return false" )
  512.         set damageFactor[i] = factor
  513.         return true
  514.     endfunction
  515.  
  516.     function SetIllusionReceiveFactor takes unit u, real factor returns boolean
  517.         local integer i = GetUnitId( u )
  518.         //! runtextmacro DEBUG( "return false" )
  519.         set receiveFactor[i] = factor
  520.         return true
  521.     endfunction
  522.  
  523.     function ShowIllusionDeathEffect takes unit u, boolean flag returns boolean
  524.         local integer i = GetUnitId( u )
  525.         //! runtextmacro DEBUG( "return false" )
  526.         set showDeath[i] = flag
  527.         return true
  528.     endfunction
  529.  
  530.     function SetIllusionDeathEffect takes unit u, string model returns boolean
  531.         local integer i = GetUnitId( u )
  532.         //! runtextmacro DEBUG( "return false" )
  533.         set deathSFX[i] = model
  534.         return true
  535.     endfunction
  536.  
  537.     function GetIllusionElapsedTime takes unit u returns real
  538.         local integer i = GetUnitId( u )
  539.         //! runtextmacro DEBUG( "" )
  540.         return elapsed[i]
  541.     endfunction
  542.  
  543.     function GetIllusionRemainingDuration takes unit u returns real
  544.         local integer i = GetUnitId( u )
  545.         //! runtextmacro DEBUG( "" )
  546.         return duration[i] - elapsed[i]
  547.     endfunction
  548.  
  549.     function GetIllusionTotalDuration takes unit u returns real
  550.         local integer i = GetUnitId( u )
  551.         //! runtextmacro DEBUG( "" )
  552.         return duration[i]
  553.     endfunction
  554.  
  555.     function GetIllusionDamageFactor takes unit u returns real
  556.         local integer i = GetUnitId( u )
  557.         //! runtextmacro DEBUG( "" )
  558.         return damageFactor[i]
  559.     endfunction
  560.  
  561.     function GetIllusionReceiveFactor takes unit u returns real
  562.         local integer i = GetUnitId( u )
  563.         //! runtextmacro DEBUG( "" )
  564.         return receiveFactor[i]
  565.     endfunction
  566.  
  567.     function GetLastIllusion takes nothing returns unit
  568.         return illusion
  569.     endfunction
  570.  
  571.     function GetIllusionFlag takes unit u returns boolean
  572.         return check[GetUnitId( u )]
  573.     endfunction
  574.  
  575.     function IllusionDeathEvent takes code c returns nothing
  576.         if illuDeathTrig == null then
  577.             set illuDeathTrig = CreateTrigger()
  578.             call TriggerRegisterVariableEvent( illuDeathTrig, SCOPE_PRIVATE + "illusionDeathEvent", EQUAL, 1 )
  579.         endif
  580.         call TriggerAddCondition( illuDeathTrig, Filter( c ) )
  581.     endfunction
  582.  
  583.  
  584.     ////////////////////////////////////////////////
  585.     // This function adjusts the damage dealt and //
  586.     // taken by the illusions                     //
  587.     ////////////////////////////////////////////////
  588.     private function DamageAdjustment takes nothing returns nothing
  589.         local integer uDex = GetUnitId( PDDS.source )
  590.         local integer tDex = GetUnitId( PDDS.target )
  591.         if check[uDex] and check[tDex] then
  592.             set PDDS.amount = PDDS.amount*damageFactor[uDex]*receiveFactor[tDex]
  593.         elseif check[uDex] then
  594.             set PDDS.amount = PDDS.amount*damageFactor[uDex]
  595.         elseif check[tDex] then
  596.             set PDDS.amount = PDDS.amount*receiveFactor[tDex]
  597.         endif
  598.     endfunction
  599.  
  600.  
  601.     ////////////////////////////////////////////////
  602.     // Registers an illusion death event          //
  603.     ////////////////////////////////////////////////
  604.     private function RefreshDeathTrigger takes nothing returns nothing
  605.         local unit u
  606.         static if LIBRARY_GroupUtils then
  607.             call GroupEnumUnitsInRect( ENUM_GROUP, bj_mapInitialPlayableArea, null )
  608.             loop
  609.                 set u = FirstOfGroup( ENUM_GROUP )
  610.                 exitwhen u == null
  611.                 call GroupRemoveUnit( ENUM_GROUP, u )
  612.                 if check[GetUnitId( u )] then
  613.                     call TriggerRegisterUnitStateEvent( deathEvent, u, UNIT_STATE_LIFE, LESS_THAN, UNIT_MIN_LIFE )
  614.                 endif
  615.             endloop
  616.         else
  617.             call GroupEnumUnitsInRect( S.tempGroup, bj_mapInitialPlayableArea, null )
  618.             loop
  619.                 set u = FirstOfGroup( S.tempGroup )
  620.                 exitwhen u == null
  621.                 call GroupRemoveUnit( S.tempGroup, u )
  622.                 if check[GetUnitId( u )] then
  623.                     call TriggerRegisterUnitStateEvent( deathEvent, u, UNIT_STATE_LIFE, LESS_THAN, UNIT_MIN_LIFE )
  624.                 endif
  625.             endloop
  626.         endif
  627.     endfunction
  628.  
  629.  
  630.     ////////////////////////////////////////////////
  631.     // This function is responsible for hiding or //
  632.     // showing the illusion's death SFX           //
  633.     ////////////////////////////////////////////////
  634.     private function OnDeath takes nothing returns nothing
  635.         local unit u = GetTriggerUnit()
  636.         local integer i = GetUnitId( u )
  637.         call ShowUnit( u, false )
  638.         set illusionDeathEvent = 0
  639.         set illusionDeathEvent = 1
  640.         set illusionDeathEvent = 0
  641.         if showDeath[i] then
  642.             call DestroyEffect( AddSpecialEffect( deathSFX[i], GetUnitX( u ), GetUnitY( u ) ) )
  643.         endif
  644.         set usedDeathEvent = usedDeathEvent + 1
  645.         if usedDeathEvent == 30 then
  646.             set usedDeathEvent = 0
  647.             call DestroyTrigger( deathEvent )
  648.             set deathEvent = CreateTrigger()
  649.             call TriggerAddCondition( deathEvent, deathHandler )
  650.             call RefreshDeathTrigger()
  651.         endif
  652.         set u = null
  653.     endfunction
  654.  
  655.  
  656.     ///////////////////////////////////////////////
  657.     // Initialization                            //
  658.     ///////////////////////////////////////////////
  659.     private module M
  660.         static method onInit takes nothing returns nothing
  661.             local code c = function OnDeath
  662.             static if LIBRARY_RegisterPlayerUnitEvent then
  663.                 call RegisterPlayerUnitEventForPlayer( EVENT_PLAYER_UNIT_SUMMON, function OnSummon, DUMMY_OWNER )
  664.                 call RegisterPlayerUnitEvent( EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER, function CacheTargetOrder )
  665.                 call RegisterPlayerUnitEvent( EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER, function CachePointOrder )
  666.                 call RegisterPlayerUnitEvent( EVENT_PLAYER_UNIT_ISSUED_ORDER, function CacheOrder )
  667.             else
  668.                 local code c1 = function OnSummon
  669.                 local code c2 = function CacheTargetOrder
  670.                 local code c3 = function CachePointOrder
  671.                 local code c4 = function CacheOrder
  672.                 local trigger t1 = CreateTrigger()
  673.                 local trigger t2 = CreateTrigger()
  674.                 local trigger t3 = CreateTrigger()
  675.                 local trigger t4 = CreateTrigger()
  676.                 set index = 16
  677.                 loop
  678.                     set index = index - 1
  679.                     static if LIBRARY_PlayerUtils then
  680.                         call TriggerRegisterPlayerUnitEvent( t2, GetPlayerById(index), EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER, null )
  681.                         call TriggerRegisterPlayerUnitEvent( t3, GetPlayerById(index), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER, null )
  682.                         call TriggerRegisterPlayerUnitEvent( t4, GetPlayerById(index), EVENT_PLAYER_UNIT_ISSUED_ORDER, null )
  683.                     else
  684.                         call TriggerRegisterPlayerUnitEvent( t2, Player(index), EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER, null )
  685.                         call TriggerRegisterPlayerUnitEvent( t3, Player(index), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER, null )
  686.                         call TriggerRegisterPlayerUnitEvent( t4, Player(index), EVENT_PLAYER_UNIT_ISSUED_ORDER, null )
  687.                     endif
  688.                     exitwhen index == 0
  689.                 endloop
  690.                 call TriggerRegisterPlayerUnitEvent( t1, DUMMY_OWNER, EVENT_PLAYER_UNIT_SUMMON, Filter( c1 ) )
  691.                 call TriggerAddCondition( t2, Filter( c2 ) )
  692.                 call TriggerAddCondition( t3, Filter( c3 ) )
  693.                 call TriggerAddCondition( t4, Filter( c4 ) )
  694.             endif
  695.             set deathHandler = Filter( c )
  696.             call TriggerAddCondition( deathEvent, deathHandler )
  697.             call AddDamageHandler( function DamageAdjustment )
  698.             set durationUpdater = function AdjustTimedLife
  699.             set hash = HashTable.create()
  700.             set dummyCaster = CreateUnit( DUMMY_OWNER, DUMMY_ID, 0, 0, 0 )
  701.             set casterItem = UnitAddItemById( dummyCaster, ITEM_ID )
  702.             set localPlayer = GetLocalPlayer()
  703.         endmethod
  704.     endmodule
  705.  
  706.     private struct S extends array
  707.         static if not LIBRARY_GroupUtils then
  708.             static group tempGroup = CreateGroup()
  709.         endif
  710.         implement M
  711.     endstruct
  712.  
  713.  
  714. endlibrary
  715.  

Illusion Editor ObjectMerger
Code: jass  [Select]
  1. //!| [ ILLUSION EDITOR OBJECT MERGER ] |
  2. /*
  3.  
  4.     Paste this script to your map and it save it. Close your map, open it again and disable/delete this script.
  5.     Now you have the all the object data needed for the Illusion Editor in your map.
  6.  
  7. */
  8. //! external ObjectMerger w3u nzin i001 anam "Dummy" ansf "(Illusion Editor)" uabi "Ainv, Aloc" ucbs 0 ushr 0 umdl "dummy.mdl" upat "" unbm 0 usid 1000000000 usin 1000000000
  9. //! external ObjectMerger w3a Alil I002 anam "illu" atat "" lild 1 1 lilw 1 1 aare 1 0 aran 1 99999 ahdu 1 5 adur 1 5 atar 1 "air,alive,allies,ancient,bridge,dead,debris,decoration,enemies,friend,ground,hero,invulnerable,item,mechanical,neutral,nonancient,nonhero,nonsapper,notself,organic,player,self,structure,sapper,terrain,tree,vulnerable,wall,ward"
  10. //! external ObjectMerger w3t will I000 anam "" iabi "illu" icla "Permanent" igol 0 iuse 0
  11.  


GUI Support
Code: jass  [Select]
  1. library IllusionEditorGUISupport uses IllusionEditor
  2.  
  3.  
  4.     private function Operate takes nothing returns nothing
  5.         if udg_IE_Operation == 0 then
  6.             set udg_IE_Illusion = GetLastIllusion()
  7.             return
  8.         elseif udg_IE_Operation == udg_IE_CreateIllusion then
  9.             set udg_IE_Illusion = CreateIllusion( udg_IE_Owner, udg_IE_UnitType, udg_IE_Duration, udg_IE_DamageDealtFactor, udg_IE_DamageReceiveFactor, GetLocationX( udg_IE_Position ), GetLocationY( udg_IE_Position ), udg_IE_Facing )
  10.             set udg_IE_Operation = 0
  11.             set udg_IE_Owner = null
  12.             set udg_IE_UnitType = 0
  13.             set udg_IE_Duration = 0.00
  14.             set udg_IE_DamageDealtFactor = 0.00
  15.             set udg_IE_DamageReceiveFactor = 0.00
  16.             set udg_IE_Facing = 0.00
  17.             return
  18.         elseif udg_IE_Operation == udg_IE_CopyUnit then
  19.             set udg_IE_Illusion = CopyUnit( udg_IE_Owner, udg_IE_BaseUnit, udg_IE_Duration, udg_IE_DamageDealtFactor, udg_IE_DamageReceiveFactor, GetLocationX( udg_IE_Position ), GetLocationY( udg_IE_Position ), udg_IE_Facing )
  20.             set udg_IE_Operation = 0
  21.             set udg_IE_Owner = null
  22.             set udg_IE_BaseUnit = null
  23.             set udg_IE_Duration = 0.00
  24.             set udg_IE_DamageDealtFactor = 0.00
  25.             set udg_IE_DamageReceiveFactor = 0.00
  26.             set udg_IE_Facing = 0.00
  27.             return
  28.         elseif udg_IE_Operation == udg_IE_SetLevel then
  29.             set udg_IE_Flag = SetIllusionLevel( udg_IE_Illusion, udg_IE_NewLevel, udg_IE_Flag )
  30.             set udg_IE_Operation = 0
  31.             return
  32.         elseif udg_IE_Operation == udg_IE_SetDuration then
  33.             set udg_IE_Flag = SetIllusionDuration( udg_IE_Illusion, udg_IE_Duration )
  34.             set udg_IE_Operation = 0
  35.             return
  36.         elseif udg_IE_Operation == udg_IE_AddDuration then
  37.             set udg_IE_Flag = AddIllusionDuration( udg_IE_Illusion, udg_IE_Duration )
  38.             set udg_IE_Operation = 0
  39.             return
  40.         elseif udg_IE_Operation == udg_IE_SetDamageFactor then
  41.             set udg_IE_Flag = SetIllusionDamageFactor( udg_IE_Illusion, udg_IE_DamageDealtFactor )
  42.             set udg_IE_Operation = 0
  43.             return
  44.         elseif udg_IE_Operation == udg_IE_SetReceiveFactor then
  45.             set udg_IE_Flag = SetIllusionReceiveFactor( udg_IE_Illusion, udg_IE_DamageReceiveFactor )
  46.             set udg_IE_Operation = 0
  47.             return
  48.         elseif udg_IE_Operation == udg_IE_ShowDeathEffect then
  49.             set udg_IE_Flag = ShowIllusionDeathEffect( udg_IE_Illusion, udg_IE_Flag )
  50.             set udg_IE_Operation = 0
  51.             return
  52.         elseif udg_IE_Operation == udg_IE_SetDeathEffect then
  53.             set udg_IE_Flag = SetIllusionDeathEffect( udg_IE_Illusion, udg_IE_DeathEffect )
  54.             set udg_IE_Operation = 0
  55.             return
  56.         elseif udg_IE_Operation == udg_IE_GetRemainingDuration then
  57.             set udg_IE_Duration = GetIllusionRemainingDuration( udg_IE_Illusion )
  58.             set udg_IE_Operation = 0
  59.             return
  60.         elseif udg_IE_Operation == udg_IE_GetTotalDuration then
  61.             set udg_IE_Duration = GetIllusionTotalDuration( udg_IE_Illusion )
  62.             set udg_IE_Operation = 0
  63.             return
  64.         elseif udg_IE_Operation == udg_IE_GetDamageFactor then
  65.             set udg_IE_DamageDealtFactor = GetIllusionDamageFactor( udg_IE_Illusion )
  66.             set udg_IE_Operation = 0
  67.             return
  68.         elseif udg_IE_Operation == udg_IE_GetReceiveFactor then
  69.             set udg_IE_DamageReceiveFactor = GetIllusionReceiveFactor( udg_IE_Illusion )
  70.             set udg_IE_Operation = 0
  71.             return
  72.         elseif udg_IE_Operation == udg_IE_GetFlag then
  73.             set udg_IE_Flag = GetIllusionFlag( udg_IE_Illusion )
  74.             set udg_IE_Operation = 0
  75.             return
  76.         endif
  77.     endfunction
  78.  
  79.     hook DoNothing Operate
  80.  
  81.  
  82. endlibrary
  83.  
  84.  
  85. function InitTrig_GUI_Support takes nothing returns nothing
  86.     /* We use an InitTrig function instead of a scope/library
  87.     initializer to initialize the values of our variables to
  88.     make sure that InitGlobals() runs first so that the values
  89.     of our variables would not be reset.                    */
  90.     call Trig_GUI_IllusionEditor_Documentation_Actions.execute()
  91. endfunction
  92.  

GUI Support Documentation
Trigger: GUI IllusionEditor Documentation
    Events
    Conditions
    Actions
        -------- ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| --------
        -------- |||||||||||||||||||||||||||||||||||||||||||||||||              GUI ILLUSION EDITOR GUIDE              |||||||||||||||||||||||||||||||||||||||||||||||| --------
        -------- ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| --------
        -------- First you need to choose what operation you want to do using the system. Like this:             --------
        Set IE_Operation = IE_CreateIllusion
        -------- It can be any from the list below:                                                                                             --------
        --------                                                                                                                                                 --------
        -------- 1. CreateIllusion - creates an illusion of a certain unit-type.                                                      --------
        -------- 2. CopyUnit - creates a mirror image of a unit which possesses the same items and abilities   --------
        --------                      as the original unit.                                                                                             --------
        -------- 3. SetLevel - sets the level of a hero type illusion to a desired value.                                      --------
        -------- 4. SetDuration - sets the total duration of an illusion to a desired value, if the given amount   --------
        --------                          is less than the elapsed time of the illusion, it will be destroyed.                      --------
        -------- 5. AddDuration - adds an extra time to an illusion's duration.                                                   --------
        -------- 6. SetDamageFactor - sets the damage dealt factor of an illusion.                                          --------
        -------- 7. SetReceiveFactor - sets the damage receive factor of an illusion                                       --------
        -------- 8. ShowDeathEffect - shows/hides the death effect of an illusion.                                         --------
        -------- 9. SetDeathEffect - sets a new special effect to replace the default death effect of an          --------
        --------                                 illusion.                                                                                                    --------
        -------- 10. GetRemainingDuration - gets the remaining duration of an illusion.                                   --------
        -------- 11. GetTotalDuration - gets the total duration of an illusion.                                                    --------
        -------- 12. GetDamageFactor - gets the damage dealt factor of an illusion.                                       --------
        -------- 13. GetReceiveFactor - gets the damage receive factor of an illusion.                                   --------
        -------- 14. GetFlag - checks if the illusion was created using this system or not.                                --------
        --------                                                                                                                                                 --------
        -------- Next, you have to setup all the data necessary for the operation you chose. Below are the   --------
        -------- list of data needed for each operation (Note that all these have an IE_ prefix):                       --------
        --------                                                                                                                                                 --------
        -------- 1. - Owner                                                                                                                                --------
        --------     - UnitType                                                                                                                            --------
        --------     - Duration                                                                                                                             --------
        --------     - DamageDealtFactor                                                                                                           --------
        --------     - DamageReceiveFactor                                                                                                      --------
        --------     - Position                                                                                                                              --------
        --------     - Facing                                                                                                                                --------
        --------                                                                                                                                                 --------
        -------- 2. - Owner                                                                                                                                --------
        --------     - BaseUnit                                                                                                                            --------
        --------     - Duration                                                                                                                             --------
        --------     - DamageDealtFactor                                                                                                           --------
        --------     - DamageReceiveFactor                                                                                                      --------
        --------     - Position                                                                                                                              --------
        --------     - Facing                                                                                                                                --------
        --------                                                                                                                                                 --------
        -------- 3. - Illusion                                                                                                                               --------
        --------     - NewLevel                                                                                                                          --------
        --------     - Flag                                                                                                                                   --------
        --------                                                                                                                                                 --------
        -------- 4, 5. - Illusion                                                                                                                           --------
        --------         - Duration                                                                                                                         --------
        --------                                                                                                                                                 --------
        -------- 6. - Illusion                                                                                                                               --------
        --------     - DamageDealtFactor                                                                                                          --------
        --------                                                                                                                                                 --------
        -------- 7. - Illusion                                                                                                                               --------
        --------     - DamageReceiveFactor                                                                                                     --------
        --------                                                                                                                                                 --------
        -------- 8. - Illusion                                                                                                                               --------
        --------     - Flag                                                                                                                                   --------
        --------                                                                                                                                                 --------
        -------- 9. - Illusion                                                                                                                               --------
        --------     - DeathEffect                                                                                                                       --------
        --------                                                                                                                                                 --------
        -------- 10, 11, 12, 13, 14. - Illusion                                                                                                     --------
        --------                                                                                                                                                 --------
        -------- The example we chose is CreateIllusion operation. So as you can see in number 1, we         --------
        -------- need to setup those variables so now we do:                                                                          --------
        Set IE_Owner = Player 1 (Red)
        Set IE_UnitType = Mortar Team
        Set IE_Duration = 5.00
        Set IE_DamageDealtFactor = 0.35
        Set IE_DamageReceiveFactor = 4.00
        Set IE_Position = (Center of (Playable map area))
        Set IE_Facing = Default building facing
        --------                                                                                                                                                 --------
        -------- And finally, what we have to do is execute the operation which in this case is very simple.    --------
        -------- To execute the opertation we have to use this:                                                                       --------
        Do nothing
        -------- Easy right? Plus we are also able to add a new functionality to the previously useless            --------
        -------- <Do nothing> function. ^-^                                                                                                      --------
        --------                                                                                                                                                 --------
        --------                                                                                                                                                 --------
        --------  ======================================================================= --------
        --------                                                                                                                                                 --------
        --------                                                                                                                                                 --------
        -------- ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| --------
        -------- ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||              CONSTANTS SETTING              ||||||||||||||||||||||||||||||||||||||||||||||||||||||||| --------
        -------- ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| --------
        Set IE_CreateIllusion = 1
        Set IE_CopyUnit = 2
        Set IE_SetLevel = 3
        Set IE_SetDuration = 4
        Set IE_AddDuration = 5
        Set IE_SetDamageFactor = 6
        Set IE_SetReceiveFactor = 7
        Set IE_ShowDeathEffect = 8
        Set IE_SetDeathEffect = 9
        Set IE_GetRemainingDuration = 10
        Set IE_GetTotalDuration = 11
        Set IE_GetDamageFactor = 12
        Set IE_GetReceiveFactor = 13
        Set IE_GetFlag = 14
        --------                                                                                                                                                 --------
        --------                                                                                                                                                 --------
        -------- ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| --------
        -------- Do not enable the following line. However, they are variable creators so do not delete them. --------
        -------- ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| --------
        Set IE_Operation = 0
        Set IE_NewLevel = 0
        Set IE_DamageDealtFactor = 0.00
        Set IE_DamageReceiveFactor = 0.00
        Set IE_Duration = 0.00
        Set IE_Facing = 0.00
        Set IE_Illusion = No unit
        Set IE_Owner = Player 1 (Red)
        Set IE_UnitType = No unit-type
        Set IE_BaseUnit = No unit
        Set IE_Position = IE_Position
        Set IE_Flag = False
        Set IE_DeathEffect = 
        --------  ======================================================================= --------

Picked from the vault...

HSS v1.3


By radamantus

A unique window full screen hero selection :D

To Import:
Copy the models and the doodads, also copy the triggers and variables and dummies.

Triggers

Trigger: HSS Setup
    Events
        Map initialization
    Conditions
    Actions
        Custom script:   set udg_HSS_Hash = InitHashtable()
        -------- ------------------------------------ --------
        -------- Determines all the information of the hero --------
        -------- ------------------------------------ --------
        Set HSS_HeroType = Paladin
        Set HSS_Model = Hero(Paladin)
        Set HSS_Icon = (Icon) Paladin
        Set HSS_Info = Warrior Hero, exceptional at defense and augmenting nearby friendly troops. Can learn Holy Light, Divine Shield, Devotion Aura and Resurrection. |n|n|cffffcc00Attacks land units.|r
        Set HSS_Name = |cffffcc00Paladin
        -------- ------------------------------------ --------
        -------- Strength --------
        -------- ------------------------------------ --------
        Set HSS_Attribute[1] = 22 + 2.70
        -------- ------------------------------------ --------
        -------- Agility --------
        -------- ------------------------------------ --------
        Set HSS_Attribute[2] = 13 + 1.50
        -------- ------------------------------------ --------
        -------- Intelligence --------
        -------- ------------------------------------ --------
        Set HSS_Attribute[3] = 17 + 1.80
        -------- ------------------------------------ --------
        -------- Trigger --------
        -------- ------------------------------------ --------
        Set HSS_Trigger = HSS Info <gen>
        -------- ------------------------------------ --------
        -------- Save --------
        -------- ------------------------------------ --------
        Set HSS_Button = Button 0012 <gen>
        Custom script:   set udg_HSS_Key[1] = GetHandleId(udg_HSS_Button)
        Trigger - Run HSS Save <gen> (ignoring conditions)
        Set HSS_Button = Button 0033 <gen>
        Custom script:   set udg_HSS_Key[1] = GetHandleId(udg_HSS_Button)
        Trigger - Run HSS Save <gen> (ignoring conditions)
        -------- ------------------------------------ --------
        -------- Determines all the information of the hero --------
        -------- ------------------------------------ --------
        Set HSS_HeroType = Archmage
        Set HSS_Model = Hero(Archmage)
        Set HSS_Icon = (Icon) Archmage
        Set HSS_Info = Mystical Hero, adept at ranged assaults. Can learn Blizzard, Summon Water Elemental, Brilliance Aura and Mass Teleport. |n|n|cffffcc00Attacks land and air units.|r
        Set HSS_Name = |cffffcc00Archmage
        -------- ------------------------------------ --------
        -------- Strength --------
        -------- ------------------------------------ --------
        Set HSS_Attribute[1] = 14 + 1.80
        -------- ------------------------------------ --------
        -------- Agility --------
        -------- ------------------------------------ --------
        Set HSS_Attribute[2] = 17 + 1.00
        -------- ------------------------------------ --------
        -------- Intelligence --------
        -------- ------------------------------------ --------
        Set HSS_Attribute[3] = 19 + 3.20
        -------- ------------------------------------ --------
        -------- Trigger --------
        -------- ------------------------------------ --------
        Set HSS_Trigger = HSS Info <gen>
        -------- ------------------------------------ --------
        -------- Save --------
        -------- ------------------------------------ --------
        Set HSS_Button = Button 0013 <gen>
        Custom script:   set udg_HSS_Key[1] = GetHandleId(udg_HSS_Button)
        Trigger - Run HSS Save <gen> (ignoring conditions)
        Set HSS_Button = Button 0034 <gen>
        Custom script:   set udg_HSS_Key[1] = GetHandleId(udg_HSS_Button)
        Trigger - Run HSS Save <gen> (ignoring conditions)
        -------- ------------------------------------ --------
        -------- Determines all the information of the hero --------
        -------- ------------------------------------ --------
        Set HSS_HeroType = Mountain King
        Set HSS_Model = Hero(Mountain King)
        Set HSS_Icon = (Icon) Mountain King
        Set HSS_Info = Warrior Hero, adept at offensive combat and disrupting enemy troops. Can learn Storm Bolt, Thunder Clap, Bash and Avatar. |n|n|cffffcc00Attacks land units.|r
        Set HSS_Name = |cffffcc00Mountain King
        -------- ------------------------------------ --------
        -------- Strength --------
        -------- ------------------------------------ --------
        Set HSS_Attribute[1] = 24 + 3.00
        -------- ------------------------------------ --------
        -------- Agility --------
        -------- ------------------------------------ --------
        Set HSS_Attribute[2] = 11 + 1.50
        -------- ------------------------------------ --------
        -------- Intelligence --------
        -------- ------------------------------------ --------
        Set HSS_Attribute[3] = 15 + 1.50
        -------- ------------------------------------ --------
        -------- Trigger --------
        -------- ------------------------------------ --------
        Set HSS_Trigger = HSS Info <gen>
        -------- ------------------------------------ --------
        -------- Save --------
        -------- ------------------------------------ --------
        Set HSS_Button = Button 0035 <gen>
        Custom script:   set udg_HSS_Key[1] = GetHandleId(udg_HSS_Button)
        Trigger - Run HSS Save <gen> (ignoring conditions)
        Set HSS_Button = Button 0014 <gen>
        Custom script:   set udg_HSS_Key[1] = GetHandleId(udg_HSS_Button)
        Trigger - Run HSS Save <gen> (ignoring conditions)
        -------- ------------------------------------ --------
        -------- Determines all the information of the hero --------
        -------- ------------------------------------ --------
        Set HSS_HeroType = Blood Mage
        Set HSS_Model = Hero(Blood Mage)
        Set HSS_Icon = (Icon) Blood Mage
        Set HSS_Info = Mystical Hero, adept at controlling magic and ranged assaults. Can learn Flame Strike, Banish, Siphon Mana and Phoenix. |n|n|cffffcc00Attacks land and air units.|r
        Set HSS_Name = |cffffcc00Blood Mage
        -------- ------------------------------------ --------
        -------- Strength --------
        -------- ------------------------------------ --------
        Set HSS_Attribute[1] = 18 + 2.00
        -------- ------------------------------------ --------
        -------- Agility --------
        -------- ------------------------------------ --------
        Set HSS_Attribute[2] = 14 + 1.00
        -------- ------------------------------------ --------
        -------- Intelligence --------
        -------- ------------------------------------ --------
        Set HSS_Attribute[3] = 19 + 3.00
        -------- ------------------------------------ --------
        -------- Trigger --------
        -------- ------------------------------------ --------
        Set HSS_Trigger = HSS Info <gen>
        -------- ------------------------------------ --------
        -------- Save --------
        -------- ------------------------------------ --------
        Set HSS_Button = Button 0015 <gen>
        Custom script:   set udg_HSS_Key[1] = GetHandleId(udg_HSS_Button)
        Trigger - Run HSS Save <gen> (ignoring conditions)
        Set HSS_Button = Button 0036 <gen>
        Custom script:   set udg_HSS_Key[1] = GetHandleId(udg_HSS_Button)
        Trigger - Run HSS Save <gen> (ignoring conditions)
        -------- ------------------------------------ --------
        -------- Main Buttons --------
        -------- ------------------------------------ --------
        -------- ------------------------------------ --------
        -------- Select Hero Button --------
        -------- ------------------------------------ --------
        Set HSS_Trigger = HSS Create Hero <gen>
        Set HSS_Button = Button 0021 <gen>
        Custom script:   set udg_HSS_Key[1] = GetHandleId(udg_HSS_Button)
        Trigger - Run HSS Main Save <gen> (ignoring conditions)
        Set HSS_Button = Button 0042 <gen>
        Custom script:   set udg_HSS_Key[1] = GetHandleId(udg_HSS_Button)
        Trigger - Run HSS Main Save <gen> (ignoring conditions)
        -------- ------------------------------------ --------
        -------- Random Hero --------
        -------- ------------------------------------ --------
        Set HSS_Trigger = HSS Random <gen>
        Set HSS_Button = Button 0020 <gen>
        Custom script:   set udg_HSS_Key[1] = GetHandleId(udg_HSS_Button)
        Trigger - Run HSS Main Save <gen> (ignoring conditions)
        Set HSS_Button = Button 0041 <gen>
        Custom script:   set udg_HSS_Key[1] = GetHandleId(udg_HSS_Button)
        Trigger - Run HSS Main Save <gen> (ignoring conditions)
        -------- ------------------------------------ --------
        -------- Cameras --------
        -------- ------------------------------------ --------
        Set HSS_Camera[0] = Camera Debugger <gen>
        Set HSS_Camera[1] = Camera Player 1 <gen>
        Set HSS_Camera[2] = Camera Player 2 <gen>
        -------- ------------------------------------ --------
        -------- Regions --------
        -------- ------------------------------------ --------
        -------- ------------------------------------ --------
        -------- Main --------
        -------- ------------------------------------ --------
        Set HSS_MainRegion[1] = Main 1 <gen>
        Set HSS_MainRegion[2] = Main 2 <gen>
        -------- ------------------------------------ --------
        -------- Info --------
        -------- ------------------------------------ --------
        Set HSS_RegionInfo[1] = Hero Info 1 <gen>
        Set HSS_RegionInfo[2] = Hero Info 2 <gen>
        -------- ------------------------------------ --------
        -------- Heroes --------
        -------- ------------------------------------ --------
        Set HSS_RegionHeroes[1] = Heroes 1 <gen>
        Set HSS_RegionHeroes[2] = Heroes 2 <gen>
        -------- ------------------------------------ --------
        -------- Hero Model --------
        -------- ------------------------------------ --------
        Set HSS_HeroModelRegion[1] = Hero 3D Model 1 <gen>
        Set HSS_HeroModelRegion[2] = Hero 3D Model 2 <gen>
        -------- ------------------------------------ --------
        -------- Hero Icon --------
        -------- ------------------------------------ --------
        Set HSS_HeroIconRegion[1] = Hero Icon 1 <gen>
        Set HSS_HeroIconRegion[2] = Hero Icon 2 <gen>
        -------- ------------------------------------ --------
        -------- Hero Name --------
        -------- ------------------------------------ --------
        Set HSS_HeroNameRegion[1] = Hero Name 1 <gen>
        Set HSS_HeroNameRegion[2] = Hero Name 2 <gen>
        -------- ------------------------------------ --------
        -------- Agility --------
        -------- ------------------------------------ --------
        Set HSS_AgiRegion[1] = Hero Agi 1  <gen>
        Set HSS_AgiRegion[2] = Hero Agi 2 <gen>
        -------- ------------------------------------ --------
        -------- Strength --------
        -------- ------------------------------------ --------
        Set HSS_StrRegion[1] = Hero Str 1 <gen>
        Set HSS_StrRegion[2] = Hero Str 2 <gen>
        -------- ------------------------------------ --------
        -------- Intelligence --------
        -------- ------------------------------------ --------
        Set HSS_IntRegion[1] = Hero Int 1  <gen>
        Set HSS_IntRegion[2] = Hero Int 2 <gen>
        -------- ------------------------------------ --------
        -------- Sets all Players --------
        -------- ------------------------------------ --------
        Set HSS_Player[1] = Player 1 (Red)
        Set HSS_Player[2] = Player 2 (Blue)
        -------- ------------------------------------ --------
        -------- You can add all of the players if you want --------
        -------- Adding the triggers and cameras for them --------
        -------- ------------------------------------ --------
        For each (Integer HSS_Integer) from 1 to 2, do (Actions)
            Loop - Actions
                Custom script:   set udg_HSS_Key[2] = GetHandleId(udg_HSS_Player[udg_HSS_Integer])
                -------- ------------------------------------ --------
                -------- Creates a text which will be replaced by an info --------
                -------- ------------------------------------ --------
                Set HSS_TextLoc = (Center of HSS_RegionInfo[HSS_Integer])
                Floating Text - Create floating text that reads     at HSS_TextLoc with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                Set HSS_InfoText[HSS_Integer] = (Last created floating text)
                Custom script:   call RemoveLocation(udg_HSS_TextLoc)
                -------- ------------------------------------ --------
                -------- Creates a text which will be replaced by a hero name --------
                -------- ------------------------------------ --------
                Set HSS_TextLoc = (Center of HSS_HeroNameRegion[HSS_Integer])
                Floating Text - Create floating text that reads     at HSS_TextLoc with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                Set HSS_NameText[HSS_Integer] = (Last created floating text)
                Custom script:   call RemoveLocation(udg_HSS_TextLoc)
                -------- ------------------------------------ --------
                -------- Creates a text which will be replaced by the agility of the hero --------
                -------- ------------------------------------ --------
                Set HSS_TextLoc = (Center of HSS_AgiRegion[HSS_Integer])
                Floating Text - Create floating text that reads     at HSS_TextLoc with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                Set HSS_Agi[HSS_Integer] = (Last created floating text)
                Custom script:   call RemoveLocation(udg_HSS_TextLoc)
                -------- ------------------------------------ --------
                -------- Creates a text which will be replaced by the Strength of the hero --------
                -------- ------------------------------------ --------
                Set HSS_TextLoc = (Center of HSS_StrRegion[HSS_Integer])
                Floating Text - Create floating text that reads     at HSS_TextLoc with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                Set HSS_Str[HSS_Integer] = (Last created floating text)
                Custom script:   call RemoveLocation(udg_HSS_TextLoc)
                -------- ------------------------------------ --------
                -------- Creates a text which will be replaced by the Intelligence of the hero --------
                -------- ------------------------------------ --------
                Set HSS_TextLoc = (Center of HSS_IntRegion[HSS_Integer])
                Floating Text - Create floating text that reads     at HSS_TextLoc with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                Set HSS_Int[HSS_Integer] = (Last created floating text)
                Custom script:   call RemoveLocation(udg_HSS_TextLoc)
                -------- ------------------------------------ --------
                -------- Creates the visibility --------
                -------- ------------------------------------ --------
                Set HSS_VisibilityLoc = (Center of HSS_MainRegion[HSS_Integer])
                Unit - Create 1 Selector for HSS_Player[HSS_Integer] at HSS_VisibilityLoc facing Default building facing degrees
                Set HSS_Selector[HSS_Integer] = (Last created unit)
                Custom script:   call RemoveLocation(udg_HSS_VisibilityLoc)
                -------- ------------------------------------ --------
                -------- Starts the camera --------
                -------- ------------------------------------ --------
                Player Group - Add HSS_Player[HSS_Integer] to HSS_CameraGroup
                Trigger - Turn on HSS Camera <gen>
                Trigger - Add to HSS Select <gen> the event (Player - HSS_Player[HSS_Integer] Selects a unit)
        -------- ------------------------------------ --------
        -------- Hides all buttons --------
        -------- ------------------------------------ --------
        For each (Integer HSS_Integer) from 1 to 2, do (Actions)
            Loop - Actions
                Custom script:   set bj_wantDestroyGroup = true
                Unit Group - Pick every unit in (Units in HSS_MainRegion[HSS_Integer]) and do (Animation - Change (Picked unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with 100.00% transparency)

Trigger: HSS Save
    Events
    Conditions
    Actions
        Custom script:   call SaveInteger(udg_HSS_Hash,udg_HSS_Key[1],1,udg_HSS_HeroType)
        Custom script:   call SaveInteger(udg_HSS_Hash,udg_HSS_Key[1],2,udg_HSS_Model)
        Custom script:   call SaveInteger(udg_HSS_Hash,udg_HSS_Key[1],3,udg_HSS_Icon)
        Hashtable - Save HSS_Info as 4 of HSS_Key[1] in HSS_Hash
        Hashtable - Save HSS_Attribute[1] as 5 of HSS_Key[1] in HSS_Hash
        Hashtable - Save HSS_Attribute[2] as 6 of HSS_Key[1] in HSS_Hash
        Hashtable - Save HSS_Attribute[3] as 7 of HSS_Key[1] in HSS_Hash
        Hashtable - Save Handle OfHSS_Trigger as 8 of HSS_Key[1] in HSS_Hash
        Hashtable - Save HSS_Name as 9 of HSS_Key[1] in HSS_Hash

Trigger: HSS Main Save
    Events
    Conditions
    Actions
        Hashtable - Save Handle OfHSS_Trigger as 8 of HSS_Key[1] in HSS_Hash

Trigger: HSS Select
    Events
    Conditions
        (Unit-type of (Triggering unit)) Equal to Button
    Actions
        Set HSS_CurrentButton = (Triggering unit)
        Custom script:   set udg_HSS_Key[3] = GetHandleId(udg_HSS_CurrentButton)
        Set HSS_TempPlayer = (Triggering player)
        -------- ------------------------------------ --------
        -------- Starting Trigger --------
        -------- ------------------------------------ --------
        Set HSS_ID = (Player number of HSS_TempPlayer)
        Trigger - Turn off (This trigger)
        Selection - Clear selection for HSS_TempPlayer
        Set HSS_TempTrigger = (Load 8 of HSS_Key[3] in HSS_Hash)
        Trigger - Run HSS_TempTrigger (ignoring conditions)
        Trigger - Turn on (This trigger)

Trigger: HSS Info
    Events
    Conditions
    Actions
        -------- ------------------------------------ --------
        -------- Removing all models --------
        -------- ------------------------------------ --------
        Unit - Remove HSS_CurrentModel[HSS_ID] from the game
        Destructible - Remove HSS_CurrentIcon[HSS_ID]
        -------- ------------------------------------ --------
        -------- Load --------
        -------- ------------------------------------ --------
        Custom script:   set udg_HSS_TempHeroType = LoadInteger(udg_HSS_Hash,udg_HSS_Key[3],1)
        Custom script:   set udg_HSS_TempModel = LoadInteger(udg_HSS_Hash,udg_HSS_Key[3],2)
        Custom script:   set udg_HSS_TempIcon = LoadInteger(udg_HSS_Hash,udg_HSS_Key[3],3)
        Set HSS_TempInfo = (Load 4 of HSS_Key[3] from HSS_Hash)
        Set HSS_TempAttribute[1] = (Load 5 of HSS_Key[3] from HSS_Hash)
        Set HSS_TempAttribute[2] = (Load 6 of HSS_Key[3] from HSS_Hash)
        Set HSS_TempAttribute[3] = (Load 7 of HSS_Key[3] from HSS_Hash)
        Set HSS_TempName = (Load 9 of HSS_Key[3] from HSS_Hash)
        -------- ------------------------------------ --------
        -------- Creating Icon --------
        -------- ------------------------------------ --------
        Set HSS_TempLoc = (Center of HSS_HeroIconRegion[HSS_ID])
        Destructible - Create a HSS_TempIcon at HSS_TempLoc facing 0.00 with scale 1.50 and variation 0
        Set HSS_CurrentIcon[HSS_ID] = (Last created destructible)
        Custom script:   call RemoveLocation(udg_HSS_TempLoc)
        -------- ------------------------------------ --------
        -------- Creating Hero Model --------
        -------- ------------------------------------ --------
        Set HSS_TempLoc = (Center of HSS_HeroModelRegion[HSS_ID])
        Unit - Create 1 HSS_TempModel for HSS_TempPlayer at HSS_TempLoc facing 180.00 degrees
        Set HSS_CurrentModel[HSS_ID] = (Last created unit)
        Custom script:   call RemoveLocation(udg_HSS_TempLoc)
        -------- ------------------------------------ --------
        -------- Creating Info --------
        -------- ------------------------------------ --------
        Set HSS_TempLocSys = (Center of HSS_RegionInfo[HSS_ID])
        Floating Text - Destroy HSS_InfoText[HSS_ID]
        Floating Text - Create floating text that reads HSS_TempInfo at HSS_TempLocSys with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
        Set HSS_InfoText[HSS_ID] = (Last created floating text)
        Custom script:   call RemoveLocation(udg_HSS_TempLocSys)
        -------- ------------------------------------ --------
        -------- Creating Name Info --------
        -------- ------------------------------------ --------
        Set HSS_TempLocSys = (Center of HSS_HeroNameRegion[HSS_ID])
        Floating Text - Destroy HSS_NameText[HSS_ID]
        Floating Text - Create floating text that reads HSS_TempName at HSS_TempLocSys with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
        Set HSS_NameText[HSS_ID] = (Last created floating text)
        Custom script:   call RemoveLocation(udg_HSS_TempLocSys)
        -------- ------------------------------------ --------
        -------- Creates all attribute info --------
        -------- ------------------------------------ --------
        -------- ------------------------------------ --------
        -------- Str --------
        -------- ------------------------------------ --------
        Set HSS_TempLocSys = (Center of HSS_StrRegion[HSS_ID])
        Floating Text - Destroy HSS_Str[HSS_ID]
        Floating Text - Create floating text that reads HSS_TempAttribute[1] at HSS_TempLocSys with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
        Set HSS_Str[HSS_ID] = (Last created floating text)
        Custom script:   call RemoveLocation(udg_HSS_TempLocSys)
        -------- ------------------------------------ --------
        -------- Agi --------
        -------- ------------------------------------ --------
        Set HSS_TempLocSys = (Center of HSS_AgiRegion[HSS_ID])
        Floating Text - Destroy HSS_Agi[HSS_ID]
        Floating Text - Create floating text that reads HSS_TempAttribute[2] at HSS_TempLocSys with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
        Set HSS_Agi[HSS_ID] = (Last created floating text)
        Custom script:   call RemoveLocation(udg_HSS_TempLocSys)
        -------- ------------------------------------ --------
        -------- Int --------
        -------- ------------------------------------ --------
        Set HSS_TempLocSys = (Center of HSS_IntRegion[HSS_ID])
        Floating Text - Destroy HSS_Int[HSS_ID]
        Floating Text - Create floating text that reads HSS_TempAttribute[3] at HSS_TempLocSys with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
        Set HSS_Int[HSS_ID] = (Last created floating text)
        Custom script:   call RemoveLocation(udg_HSS_TempLocSys)
        -------- ------------------------------------ --------
        -------- Creates a current selected indicator --------
        -------- ------------------------------------ --------
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                HSS_Indicator[HSS_ID] Equal to No unit
            Then - Actions
                Set HSS_TempLoc = (Position of HSS_CurrentButton)
                Unit - Create 1 Current Selected for HSS_TempPlayer at HSS_TempLoc facing Default building facing degrees
                Set HSS_Indicator[HSS_ID] = (Last created unit)
                Custom script:   call RemoveLocation(udg_HSS_TempLoc)
            Else - Actions
                Set HSS_TempLoc = (Position of HSS_CurrentButton)
                Unit - Move HSS_Indicator[HSS_ID] instantly to HSS_TempLoc
                Custom script:   call RemoveLocation(udg_HSS_TempLoc)
        Set HSS_CurrentSelected[HSS_ID] = HSS_CurrentButton
        Set HSS_CurrentHeroType[HSS_ID] = HSS_TempHeroType

Trigger: HSS Create Hero
    Events
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                HSS_CurrentSelected[HSS_ID] Not equal to No unit
            Then - Actions
                Set HSS_TempLoc = (HSS_TempPlayer start location)
                Unit - Create 1 HSS_CurrentHeroType[HSS_ID] for HSS_TempPlayer at HSS_TempLoc facing Default building facing degrees
                -------- ------------------------------------ --------
                -------- Removing Units --------
                -------- ------------------------------------ --------
                Unit - Remove HSS_Selector[HSS_ID] from the game
                Unit - Remove HSS_CurrentSelected[HSS_ID] from the game
                -------- ------------------------------------ --------
                -------- Removing all models --------
                -------- ------------------------------------ --------
                Unit - Remove HSS_CurrentModel[HSS_ID] from the game
                Destructible - Remove HSS_CurrentIcon[HSS_ID]
                -------- ------------------------------------ --------
                -------- Restoring Camera --------
                -------- ------------------------------------ --------
                Player Group - Remove HSS_TempPlayer from HSS_CameraGroup
                Camera - Apply HSS_Camera[0] for HSS_TempPlayer over 0.00 seconds
                Camera - Pan camera for HSS_TempPlayer to HSS_TempLoc over 0.00 seconds
                Selection - Select (Last created unit) for HSS_TempPlayer
                Custom script:   call RemoveLocation(udg_HSS_TempLoc)
                -------- ------------------------------------ --------
                -------- Creating Disabled Icon --------
                -------- ------------------------------------ --------
                Set HSS_TempLoc = (Position of HSS_CurrentSelected[HSS_ID])
                Destructible - Create a   Button (Disabled) at HSS_TempLoc facing 0.00 with scale 1.50 and variation 0
                Custom script:   call RemoveLocation(udg_HSS_TempLoc)
                -------- ------------------------------------ --------
                -------- Destroying all text --------
                -------- ------------------------------------ --------
                Floating Text - Destroy HSS_InfoText[HSS_ID]
                Floating Text - Destroy HSS_NameText[HSS_ID]
                Floating Text - Destroy HSS_Agi[HSS_ID]
                Floating Text - Destroy HSS_Int[HSS_ID]
                Floating Text - Destroy HSS_Str[HSS_ID]
                Set HSS_CurrentSelected[HSS_ID] = No unit
            Else - Actions

Trigger: HSS Random
    Events
    Conditions
    Actions
        Set HSS_RandomGroup[1] = (Units in HSS_MainRegion[HSS_ID] matching ((((Unit-type of (Matching unit)) Equal to Button) and ((Matching unit) Not equal to Button 0020 <gen>)) and ((((Matching unit) Not equal to Button 0021 <gen>) and ((Matching unit) Not equal to Button 0042 <gen>)) and
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Number of units in HSS_RandomGroup[1]) Greater than 0
            Then - Actions
                Set HSS_RandomGroup[2] = (Random 1 units from HSS_RandomGroup[1])
                Set HSS_TempButton[1] = Button 0021 <gen>
                Set HSS_TempButton[2] = Button 0042 <gen>
                Unit Group - Pick every unit in HSS_RandomGroup[2] and do (Actions)
                    Loop - Actions
                        Selection - Select (Picked unit) for HSS_TempPlayer
                Selection - Select HSS_TempButton[HSS_ID] for HSS_TempPlayer
                Custom script:   call DestroyGroup(udg_HSS_RandomGroup[2])
            Else - Actions
        Custom script:   call DestroyGroup(udg_HSS_RandomGroup[1])

Trigger: HSS Camera
    Events
        Time - Every 0.03 seconds of game time
    Conditions
    Actions
        Player Group - Pick every player in HSS_CameraGroup and do (Actions)
            Loop - Actions
                Set HSS_TempID = (Player number of (Picked player))
                Camera - Apply HSS_Camera[HSS_TempID] for (Picked player) over 0.00 seconds

Warcraft III models

Inferno Knight


By Tarrasque

a Fire version of:
http://blizzardmodding.info/5387/demon-knight/

Give credit if you use it.

Picked from the vault...

Armored Centaur


By eubz

I am back. Here's my new unit model for everyone.

Warcraft III Skins

Hellfire Spawn


By Heinvers

The standard armies of Hell are nothing but bothersome creatures summoned forth by the Lesser Evils for their various biding.

These vile one are Mephisto's favorite 'pet' creatures.

Screenshots taken with the 512x version. Here it is the HD variation if needed.

Picked from the vault...

Hellfire Spawn


By Heinvers

The standard armies of Hell are nothing but bothersome creatures summoned forth by the Lesser Evils for their various biding.

These vile one are Mephisto's favorite 'pet' creatures.

Screenshots taken with the 512x version. Here it is the HD variation if needed.

Blizzard Modding Network News

Warcraft III Modding News

Posted by: moyack, November 10, 2012, 07:29:03 AM

Posted by: moyack, November 10, 2012, 07:29:03 AM

Posted by: moyack, November 10, 2012, 07:29:03 AM

Pages: [1] 2 3   Go Up
Blizzard Modding Information Center Starcraft II Modding Information Center Wacraft III Modding Information Center WC3JASS.com - The JASS Vault Chronicles of Darkness - A Warcraft III mod Jetcraft - A Starcraft II mod Troll Smash - A Warcraft III Arena
  Mod DB - Change the Game Power of Corruption - A Warcraft III altered melee map Chaos Realm - The world of Game modders and wc3 addicts Follow us on Facebook!!