1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  3. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  4. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  5. Dismiss Notice
  6. The Highway to Hell has been laid open. Come along and participate in the 5th Special Effect Contest.
    Dismiss Notice
  7. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Heaven's Justice v1.1 GUI

Submitted by jakeZinc
This bundle is marked as awaiting update. A staff member has requested changes to it before it can be approved.
HEAVEN'S JUSTICE [ GUI ]

SPELL DESCRIPTION:
[​IMG]


SPELL IMAGES:

  • Enemy and Friendly Souls are leaving their hosts.
    [​IMG]
    [​IMG]

  • Souls are returning to their hosts or body after the heaven judges them
    [​IMG]
    After returning to their individual hosts, if they are friendly souls then the host receives damage, if they are enemy souls then the host receives half damage.
    [​IMG]

  • [​IMG]
    [​IMG]

CHANGELOGS: v1.0 - Released
v1.1 - Updated, based on KILLCIDE review.

CREDITS: Bribe ( Unit Indexer System )
Maker ( Pause Concept )

    • Heavens Justice Configuration
      • Events
        • Map initialization
      • Conditions
      • Actions
        • -------- ---------------------------------------------------------------------------------------------------------------------------------------- --------
        • -------- SPELL CONFIGURATION FIELD --------
        • -------- ---------------------------------------------------------------------------------------------------------------------------------------- --------
        • -------- OBJECT EDITOR ( F6 ) --------
        • -------- The spell or ability used in the triggers. ( Strictly Import the Heaven's Justice Ability ) --------
        • Set HJ_Ability = Heaven's Justice
        • -------- --------
        • -------- The pause ability ( based on channel ) used in the triggers. --------
        • Set HJ_PauseAbility = Heaven's Justice Pause ( Maker )
        • -------- ^ Configure HJ_Pause boolean expression below ( SPELL DATA SECTION ). IF: True = Import the Heaven's Justice Pause Ability ( Maker ), False = Delete this ( HJ_PauseAbility ) and don't import the Pause Ability. --------
        • -------- --------
        • -------- The dummy unit used in the triggers. ( Strictly Import the Heaven's Justice Dummy Unit ) --------
        • Set HJ_DummyType = Heaven's Justice Dummy
        • -------- ^ Tip: You can also select one of the dummies already existed or created in your map. ( Make sure dummy.mdx is the model used in that dummy unit and the unit's data value must be similar to it. ) --------
        • -------- ^ This tip is useful for sharing dummy type units. ( Saves you 1 Unit Type in your object editor ) ( As long as they have similar object data values. ) --------
        • -------- ^ The shadow image of the dummy unit is enabled ( flyer ), you can disable it by setting it to 'none' in Object Editor ( F6 ). --------
        • -------- ---------------------------------------------------------------------------------------------------------------------------------------- --------
        • -------- * DATA ARRAY VALUES: [ 1 ] = Level 1, [ 2 ] = Level 2, [ 3 ] = Level 3 ..., You can increase the array value if you want to add the levels of the ability in an integer consecutive order. --------
        • -------- ---------------------------------------------------------------------------------------------------------------------------------------- --------
        • -------- SPELL DATA --------
        • -------- ---------------------------------------------------------------------------------------------------------------------------------------- --------
        • -------- The maximum level of the ability or the number of levels in Heaven's Justice Ability. --------
        • Set HJ_AbilityMaxLevel = 3
        • -------- ^ Modify at your own risk: Must be equal to the amount of levels in Heaven's Justice Ability in OBJECT EDITOR ( F6 ). Wrong value causes error. --------
        • -------- --------
        • -------- The area of effect of the spell. ( Must be equal to Area of Effect values in the Heaven's Justice ability data. ) --------
        • Set HJ_Radius[1] = 400.00
        • Set HJ_Radius[2] = 450.00
        • Set HJ_Radius[3] = 500.00
        • -------- --------
        • -------- An effect occurs in the area of effect ( radius ) in circular formation. --------
        • Set HJ_Effect[1] = Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
        • -------- --------
        • -------- The number of effects ( Effect[ 1 ] ) created in the area of effect ( radius ). --------
        • Set HJ_RadiusEffectCount[1] = 30
        • Set HJ_RadiusEffectCount[2] = 40
        • Set HJ_RadiusEffectCount[3] = 50
        • -------- --------
        • -------- Want the body unable to move or follow an order when the soul leaves it? --------
        • -------- Boolean Expression: True = Yes, False = No --------
        • Set HJ_Pause = True
        • -------- --------
        • -------- The base order ID of the pause ability. ( Must be equal to Heaven's Justice Pause Ability base order ID value. ) --------
        • Set HJ_PauseOrder = defend
        • -------- ^ I'd use defend order as it is rarely used in immediate order. --------
        • -------- --------
        • -------- An effect occurs in the attachment when the units are in pause state. --------
        • -------- Pause Friendly Units: --------
        • Set HJ_Effect[2] = Abilities\Spells\Items\AIta\CrystalBallCaster.mdl
        • Set HJ_PauseFriendlyEffectAttach = overhead
        • -------- Pause Enemy Units: --------
        • Set HJ_Effect[3] = Abilities\Spells\NightElf\shadowstrike\shadowstrike.mdl
        • Set HJ_PauseEnemyEffectAttach = overhead
        • -------- --------
        • -------- The duration when the heaven judges the soul. --------
        • Set HJ_JudgeDuration[1] = 1.75
        • Set HJ_JudgeDuration[2] = 1.50
        • Set HJ_JudgeDuration[3] = 1.25
        • -------- --------
        • -------- The attack and damage type of spell. ( Spell Damage ) --------
        • Set HJ_AttackType = Spells
        • Set HJ_DamageType = Normal
        • -------- --------
        • -------- The interval of the looping trigger. * Recommended Value: 0.03 for great spell performance. --------
        • Set HJ_LoopInterval = 0.02
        • -------- ^ 0.02 value is optional for the smooth motions but it is your choice in performance. --------
        • -------- ^Modify at your own risk: Lowering this modified value can cause serious lags because of the possibility of filtering large amount of units in looping. --------
        • -------- ---------------------------------------------------------------------------------------------------------------------------------------- --------
        • -------- SOULS DATA --------
        • -------- ---------------------------------------------------------------------------------------------------------------------------------------- --------
        • -------- Friendly units' soul art model and it's attachment point. --------
        • Set HJ_Effect[4] = Abilities\Weapons\FaerieDragonMissile\FaerieDragonMissile.mdl
        • Set HJ_SoulFriendlyModelAttach = origin
        • Set HJ_SoulFriendlyExitAttach = chest
        • -------- Enemy units' soul art model and it's attachment point. --------
        • Set HJ_Effect[5] = Abilities\Weapons\AvengerMissile\AvengerMissile.mdl
        • Set HJ_SoulEnemyModelAttach = origin
        • Set HJ_SoulEnemyExitAttach = chest
        • -------- --------
        • -------- The size of the soul. --------
        • Set HJ_SoulSize[1] = 0.90
        • Set HJ_SoulSize[2] = 0.90
        • Set HJ_SoulSize[3] = 0.90
        • -------- --------
        • -------- The initial height of the soul when leaves the body. --------
        • Set HJ_SoulInitialHeight[1] = 40.00
        • Set HJ_SoulInitialHeight[2] = 40.00
        • Set HJ_SoulInitialHeight[3] = 40.00
        • -------- --------
        • -------- The maximum height of the soul to reach the heaven. Must be greater than game camera distance field target to be realistic. --------
        • Set HJ_SoulMaxHeight[1] = 1500.00
        • Set HJ_SoulMaxHeight[2] = 1500.00
        • Set HJ_SoulMaxHeight[3] = 1500.00
        • -------- --------
        • -------- The levitate speed of the soul to reach the heaven. It is based on a time value. ( Seconds ) --------
        • Set HJ_SoulLevitateTime[1] = 4.20
        • Set HJ_SoulLevitateTime[2] = 4.40
        • Set HJ_SoulLevitateTime[3] = 4.60
        • -------- --------
        • -------- Allow the soul to travel in different direction while levitating? --------
        • -------- Boolean Expression: True = Yes, False = No --------
        • Set HJ_SoulLevitateTravel = True
        • -------- --------
        • -------- An effect occurs when the soul is now in motion state. --------
        • -------- Friendly Soul: --------
        • Set HJ_Effect[6] = Abilities\Weapons\FaerieDragonMissile\FaerieDragonMissile.mdl
        • -------- Enemy Soul: --------
        • Set HJ_Effect[7] = Abilities\Weapons\AvengerMissile\AvengerMissile.mdl
        • -------- The probability of a soul motion looping effect to occur. Consider this value as a percentage ( 0%,100% ) --------
        • Set HJ_SoulMotionEffectChance = 0
        • -------- ^ If you want to disable the motion effect, set the chance value to 0. --------
        • -------- ^ Modify at your own risk; The large maximum value is 100 do not EXCEED or it will cause problems. Recommended Value: the modified value ( 15 ). --------
        • -------- --------
        • -------- The heal value to the friendly units when the soul already returned to their own host/body. --------
        • Set HJ_SoulHeal[1] = 100.00
        • Set HJ_SoulHeal[2] = 200.00
        • Set HJ_SoulHeal[3] = 300.00
        • -------- --------
        • -------- An effect occurs to the friendly units when the soul is returning to the host/body. --------
        • Set HJ_Effect[8] = Abilities\Spells\Human\Resurrect\ResurrectTarget.mdl
        • Set HJ_SoulReturnHealAttach = origin
        • -------- --------
        • -------- The damage value to the enemy units when the soul already returned to their own host/body. --------
        • Set HJ_SoulDamage[1] = 50.00
        • Set HJ_SoulDamage[2] = 100.00
        • Set HJ_SoulDamage[3] = 150.00
        • -------- --------
        • -------- An effect occurs to the enemy units when the soul is returning to the host/body. --------
        • Set HJ_Effect[9] = Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl
        • Set HJ_SoulReturnDamageAttach = chest
        • -------- ---------------------------------------------------------------------------------------------------------------------------------------- --------
        • -------- CODE DATA --------
        • -------- ( BE CAREFUL TOUCHING THE LINES BELOW IF YOU ARE UNEXPERIENCED IN TRIGGERING CODES ) --------
        • -------- ---------------------------------------------------------------------------------------------------------------------------------------- --------
        • -------- PRELOAD OBJECTS --------
        • -------- Abilities And Units: --------
        • Custom script: set udg_HJ_Unit = CreateUnit( Player( 15 ), udg_HJ_DummyType, 0, 0, 0 )
        • Custom script: call UnitAddAbility( udg_HJ_Unit, udg_HJ_Ability )
        • Custom script: call RemoveUnit( udg_HJ_Unit )
        • -------- Effects: --------
        • -------- The highest number of an effect array variable used. --------
        • Set HJ_EffectCount = 9
        • For each (Integer HJ_CustomInteger) from 1 to HJ_EffectCount, do (Actions)
          • Loop - Actions
            • Custom script: call Preload( udg_HJ_Effect[ udg_HJ_CustomInteger ] )
        • -------- ---------------------------------------------------------------------------------------------------------------------------------------- --------
        • -------- DON'T TOUCH THESE. ( If this line malfunctions you can touch it to correct the needed parameters or values. ) --------
        • -------- ---------------------------------------------------------------------------------------------------------------------------------------- --------
        • Trigger - Add to Heavens Justice Loop <gen> the event (Time - Every HJ_LoopInterval seconds of game time)
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • HJ_SoulLevitateTravel Equal to True
          • Then - Actions
            • Set HJ_CollisionRange = 10.00
          • Else - Actions
            • Set HJ_CollisionRange = HJ_Radius[1]
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • HJ_SoulMotionEffectChance Equal to 0
          • Then - Actions
            • Set HJ_SoulMotionEffectChance = -1
          • Else - Actions
        • -------- Initialize Calculations --------
        • For each (Integer HJ_CustomInteger) from 1 to HJ_AbilityMaxLevel, do (Actions)
          • Loop - Actions
            • Set HJ_CustomReal[HJ_CustomInteger] = (360.00 / (Real(HJ_RadiusEffectCount[HJ_CustomInteger])))
            • Set HJ_CustomReal2[HJ_CustomInteger] = (HJ_SoulMaxHeight[HJ_CustomInteger] / (HJ_SoulLevitateTime[HJ_CustomInteger] / HJ_LoopInterval))
            • Set HJ_CustomReal3[HJ_CustomInteger] = (HJ_Radius[HJ_CustomInteger] / 1.50)
            • Set HJ_CustomReal4[HJ_CustomInteger] = (HJ_Radius[HJ_CustomInteger] x 2.50)
        • -------- ---------------------------------------------------------------------------------------------------------------------------------------- --------
        • -------- END OF SPELL CONFIGURATION FIELD --------
        • -------- ---------------------------------------------------------------------------------------------------------------------------------------- --------
    • Heavens Justice Execution
      • Events
        • Unit - A unit Starts the effect of an ability
      • Conditions
        • (Ability being cast) Equal to HJ_Ability
      • Actions
        • -------- ---------------------------------------------------------------------------------------------------------------------------------------- --------
        • -------- onCast --------
        • -------- ---------------------------------------------------------------------------------------------------------------------------------------- --------
        • -------- declaration of locals --------
        • Custom script: local real spellX = GetSpellTargetX( )
        • Custom script: local real spellY = GetSpellTargetY( )
        • Custom script: local real spawnX
        • Custom script: local real spawnY
        • Custom script: local real pickedX
        • Custom script: local real pickedY
        • Custom script: local real soulX
        • Custom script: local real soulY
        • Custom script: local real destinationX
        • Custom script: local real destinationY
        • -------- --------
        • -------- [ 0 ] = temporary array value before index declares. --------
        • Set HJ_Caster[0] = (Triggering unit)
        • Set HJ_Level[0] = (Level of HJ_Ability for HJ_Caster[0])
        • -------- --------
        • -------- Radius Effects Creation --------
        • -------- --------
        • For each (Integer HJ_CustomInteger) from 1 to HJ_RadiusEffectCount[HJ_Level[0]], do (Actions)
          • Loop - Actions
            • Set HJ_RadiusEffectAngle = (HJ_RadiusEffectAngle + HJ_CustomReal[HJ_Level[0]])
            • Custom script: set spawnX = spellX + udg_HJ_Radius[ udg_HJ_Level[ 0 ] ] * Cos( udg_HJ_RadiusEffectAngle * bj_DEGTORAD )
            • Custom script: set spawnY = spellY + udg_HJ_Radius[ udg_HJ_Level[ 0 ] ] * Sin( udg_HJ_RadiusEffectAngle * bj_DEGTORAD )
            • Custom script: call DestroyEffect( AddSpecialEffect( udg_HJ_Effect[ 1 ], spawnX, spawnY ) )
        • -------- --------
        • -------- Souls Creation --------
        • -------- --------
        • Custom script: call GroupEnumUnitsInRange( bj_lastCreatedGroup, spellX, spellY, udg_HJ_Radius[ udg_HJ_Level[ 0 ] ], null )
        • Custom script: loop
        • Custom script: set udg_HJ_PickedUnit = FirstOfGroup( bj_lastCreatedGroup )
        • Custom script: exitwhen udg_HJ_PickedUnit == null
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (HJ_PickedUnit is dead) Equal to False
            • (HJ_PickedUnit is A structure) Equal to False
            • (HJ_PickedUnit is Magic Immune) Equal to False
            • (HJ_PickedUnit is A flying unit) Equal to False
            • (HJ_PickedUnit is Mechanical) Equal to False
            • HJ_PickedUnit Not equal to HJ_Caster[0]
            • (HJ_PickedUnit is in HJ_Group) Equal to False
          • Then - Actions
            • -------- --------
            • Custom script: set udg_HJ_ID = GetUnitUserData( udg_HJ_PickedUnit )
            • -------- --------
            • Set HJ_Caster[HJ_ID] = HJ_Caster[0]
            • Set HJ_CasterPlayer[HJ_ID] = (Owner of HJ_Caster[HJ_ID])
            • Set HJ_Level[HJ_ID] = HJ_Level[0]
            • Set HJ_JudgeDurationCounter[HJ_ID] = 0.00
            • Set HJ_ReturnHeightCalculation[HJ_ID] = HJ_SoulMaxHeight[HJ_Level[HJ_ID]]
            • Set HJ_LevitateSpeedCalculation[HJ_ID] = HJ_CustomReal2[HJ_Level[HJ_ID]]
            • -------- Return to Host = False --------
            • Set HJ_CustomBoolean[HJ_ID] = False
            • -------- --------
            • Custom script: set pickedX = GetWidgetX( udg_HJ_PickedUnit )
            • Custom script: set pickedY = GetWidgetY( udg_HJ_PickedUnit )
            • -------- --------
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (HJ_PickedUnit belongs to an enemy of HJ_CasterPlayer[HJ_ID]) Equal to False
              • Then - Actions
                • -------- --------
                • -------- Friendly Souls --------
                • Custom script: call DestroyEffect( AddSpecialEffectTarget( udg_HJ_Effect[ 4 ], udg_HJ_PickedUnit, udg_HJ_SoulFriendlyExitAttach ) )
                • Custom script: set udg_HJ_FriendlySoulUnit[ udg_HJ_ID ] = CreateUnit( udg_HJ_CasterPlayer[ udg_HJ_ID ], udg_HJ_DummyType, pickedX, pickedY, 0 )
                • Custom script: set udg_HJ_FriendlySoulModelHandler[ udg_HJ_ID ] = AddSpecialEffectTarget( udg_HJ_Effect[ 4 ], udg_HJ_FriendlySoulUnit[ udg_HJ_ID ], udg_HJ_SoulFriendlyModelAttach )
                • Custom script: call SetUnitScale( udg_HJ_FriendlySoulUnit[ udg_HJ_ID ], udg_HJ_SoulSize[ udg_HJ_Level[ 0 ] ], 0, 0 )
                • Custom script: call SetUnitFlyHeight( udg_HJ_FriendlySoulUnit[ udg_HJ_ID ], udg_HJ_SoulInitialHeight[ udg_HJ_Level[ 0 ] ], 0 )
                • Custom script: set soulX = GetUnitX( udg_HJ_FriendlySoulUnit[ udg_HJ_ID ] )
                • Custom script: set soulY = GetUnitY( udg_HJ_FriendlySoulUnit[ udg_HJ_ID ] )
                • -------- --------
              • Else - Actions
                • -------- --------
                • -------- Enemy Souls --------
                • Custom script: call DestroyEffect( AddSpecialEffectTarget( udg_HJ_Effect[ 5 ], udg_HJ_PickedUnit, udg_HJ_SoulEnemyExitAttach ) )
                • Custom script: set udg_HJ_EnemySoulUnit[ udg_HJ_ID ] = CreateUnit( udg_HJ_CasterPlayer[ udg_HJ_ID ], udg_HJ_DummyType, pickedX, pickedY, 0 )
                • Custom script: set udg_HJ_EnemySoulModelHandler[ udg_HJ_ID ] = AddSpecialEffectTarget( udg_HJ_Effect[ 5 ], udg_HJ_EnemySoulUnit[ udg_HJ_ID ], udg_HJ_SoulEnemyModelAttach )
                • Custom script: call SetUnitScale( udg_HJ_EnemySoulUnit[ udg_HJ_ID ], udg_HJ_SoulSize[ udg_HJ_Level[ 0 ] ], 0, 0 )
                • Custom script: call SetUnitFlyHeight( udg_HJ_EnemySoulUnit[ udg_HJ_ID ], udg_HJ_SoulInitialHeight[ udg_HJ_Level[ 0 ] ], 0 )
                • Custom script: set soulX = GetUnitX( udg_HJ_EnemySoulUnit[ udg_HJ_ID ] )
                • Custom script: set soulY = GetUnitY( udg_HJ_EnemySoulUnit[ udg_HJ_ID ] )
                • -------- --------
            • -------- --------
            • -------- Travel Boolean --------
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • HJ_SoulLevitateTravel Equal to True
              • Then - Actions
                • Set HJ_SoulLevitateTravelAngle[HJ_ID] = (Random angle)
                • Custom script: set destinationX = soulX + GetRandomReal( udg_HJ_CustomReal3[ udg_HJ_Level[ udg_HJ_ID ] ], udg_HJ_CustomReal4[ udg_HJ_Level[ udg_HJ_ID ] ] ) * Cos( udg_HJ_SoulLevitateTravelAngle[ udg_HJ_ID ] )
                • Custom script: set destinationY = soulY + GetRandomReal( udg_HJ_CustomReal3[ udg_HJ_Level[ udg_HJ_ID ] ], udg_HJ_CustomReal4[ udg_HJ_Level[ udg_HJ_ID ] ] ) * Sin( udg_HJ_SoulLevitateTravelAngle[ udg_HJ_ID ] )
                • Custom script: set udg_HJ_SoulDistance[ udg_HJ_ID ] = SquareRoot( ( soulX - destinationX ) * ( soulX - destinationX ) + ( soulY - destinationY ) * ( soulY - destinationY ) )
                • Set HJ_TravelSpeedCalculation[HJ_ID] = (HJ_SoulDistance[HJ_ID] / (HJ_SoulLevitateTime[HJ_Level[HJ_ID]] / HJ_LoopInterval))
                • Set HJ_SoulDistanceCounter[HJ_ID] = 0.00
              • Else - Actions
            • -------- --------
            • -------- Pause Boolean --------
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • HJ_Pause Equal to True
              • Then - Actions
                • -------- --------
                • Custom script: if UnitAddAbility( udg_HJ_PickedUnit, udg_HJ_PauseAbility ) and IssueImmediateOrder( udg_HJ_PickedUnit, udg_HJ_PauseOrder ) then
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • (HJ_PickedUnit belongs to an enemy of HJ_CasterPlayer[HJ_ID]) Equal to True
                  • Then - Actions
                    • Custom script: set udg_HJ_PauseEnemyEffectHandler[ udg_HJ_ID ] = AddSpecialEffectTarget( udg_HJ_Effect[ 3 ], udg_HJ_PickedUnit, udg_HJ_PauseEnemyEffectAttach )
                  • Else - Actions
                    • Custom script: set udg_HJ_PauseFriendlyEffectHandler[ udg_HJ_ID ] = AddSpecialEffectTarget( udg_HJ_Effect[ 2 ], udg_HJ_PickedUnit, udg_HJ_PauseFriendlyEffectAttach )
                • Custom script: endif
                • -------- --------
              • Else - Actions
            • -------- --------
            • Unit Group - Add HJ_PickedUnit to HJ_Group
            • -------- --------
          • Else - Actions
        • Custom script: call GroupRemoveUnit( bj_lastCreatedGroup, udg_HJ_PickedUnit )
        • Custom script: endloop
        • -------- --------
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Heavens Justice Loop <gen> is on) Equal to False
            • (Number of units in HJ_Group) Greater than 0
          • Then - Actions
            • Trigger - Turn on Heavens Justice Loop <gen>
          • Else - Actions
        • -------- ---------------------------------------------------------------------------------------------------------------------------------------- --------
    • Heavens Justice Loop
      • Events
      • Conditions
      • Actions
        • -------- ---------------------------------------------------------------------------------------------------------------------------------------- --------
        • -------- onLoop --------
        • -------- ---------------------------------------------------------------------------------------------------------------------------------------- --------
        • Unit Group - Pick every unit in HJ_Group and do (Actions)
          • Loop - Actions
            • -------- ---------------------------------------------------------------------------------------------------------------------------------------- --------
            • -------- declaration of locals --------
            • Custom script: local real hostX
            • Custom script: local real hostY
            • Custom script: local real soulX
            • Custom script: local real soulY
            • Custom script: local real returnAngle
            • Custom script: local real travelMotionX
            • Custom script: local real travelMotionY
            • Custom script: local real returnMotionX
            • Custom script: local real returnMotionY
            • -------- --------
            • Set HJ_Unit = (Picked unit)
            • Custom script: set udg_HJ_ID = GetUnitUserData( udg_HJ_Unit )
            • -------- --------
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (HJ_Unit is dead) Equal to True
              • Then - Actions
                • -------- ---------------------------------------------------------------------------------------------------------------------------------------- --------
                • -------- onEnd --------
                • -------- ---------------------------------------------------------------------------------------------------------------------------------------- --------
                • -------- destroy the attached values into ID --------
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • (HJ_Unit belongs to an enemy of HJ_CasterPlayer[HJ_ID]) Equal to True
                  • Then - Actions
                    • Special Effect - Destroy HJ_EnemySoulModelHandler[HJ_ID]
                    • Unit - Kill HJ_EnemySoulUnit[HJ_ID]
                  • Else - Actions
                    • Special Effect - Destroy HJ_FriendlySoulModelHandler[HJ_ID]
                    • Unit - Kill HJ_FriendlySoulUnit[HJ_ID]
                • -------- --------
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • HJ_Pause Equal to True
                  • Then - Actions
                    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • (HJ_Unit belongs to an enemy of HJ_CasterPlayer[HJ_ID]) Equal to True
                      • Then - Actions
                        • Special Effect - Destroy HJ_PauseEnemyEffectHandler[HJ_ID]
                      • Else - Actions
                        • Special Effect - Destroy HJ_PauseFriendlyEffectHandler[HJ_ID]
                    • Unit - Remove HJ_PauseAbility from HJ_Unit
                  • Else - Actions
                • -------- --------
                • Unit Group - Remove HJ_Unit from HJ_Group
                • -------- --------
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • (Number of units in HJ_Group) Equal to 0
                  • Then - Actions
                    • Trigger - Turn off (This trigger)
                  • Else - Actions
                • -------- ---------------------------------------------------------------------------------------------------------------------------------------- --------
              • Else - Actions
                • -------- --------
                • -------- Soul Motions Phase --------
                • -------- --------
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • (HJ_Unit belongs to an enemy of HJ_CasterPlayer[HJ_ID]) Equal to False
                  • Then - Actions
                    • -------- passing parameters --------
                    • Set HJ_SoulUnit[HJ_ID] = HJ_FriendlySoulUnit[HJ_ID]
                    • Set HJ_SoulMotionEffect[HJ_ID] = HJ_Effect[6]
                    • Set HJ_SoulMotionEffectAttach[HJ_ID] = HJ_SoulFriendlyModelAttach
                  • Else - Actions
                    • -------- passing parameters --------
                    • Set HJ_SoulUnit[HJ_ID] = HJ_EnemySoulUnit[HJ_ID]
                    • Set HJ_SoulMotionEffect[HJ_ID] = HJ_Effect[7]
                    • Set HJ_SoulMotionEffectAttach[HJ_ID] = HJ_SoulEnemyModelAttach
                • -------- --------
                • Custom script: set soulX = GetWidgetX( udg_HJ_SoulUnit[ udg_HJ_ID ] )
                • Custom script: set soulY = GetWidgetY( udg_HJ_SoulUnit[ udg_HJ_ID ] )
                • -------- --------
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • HJ_LevitateSpeedCalculation[HJ_ID] Less than or equal to HJ_SoulMaxHeight[HJ_Level[HJ_ID]]
                    • HJ_SoulDistanceCounter[HJ_ID] Less than or equal to HJ_SoulDistance[HJ_ID]
                  • Then - Actions
                    • -------- --------
                    • -------- Loads, Updates, Saves: LevitateSpeedCalculation --------
                    • Set HJ_LevitateSpeedCalculation[HJ_ID] = (HJ_LevitateSpeedCalculation[HJ_ID] + HJ_CustomReal2[HJ_Level[HJ_ID]])
                    • Custom script: call SetUnitFlyHeight( udg_HJ_SoulUnit[ udg_HJ_ID ], udg_HJ_LevitateSpeedCalculation[ udg_HJ_ID ], 0 )
                    • -------- --------
                    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • HJ_SoulLevitateTravel Equal to True
                      • Then - Actions
                        • -------- --------
                        • -------- Travel Motion --------
                        • -------- --------
                        • Custom script: set travelMotionX = soulX + udg_HJ_TravelSpeedCalculation[ udg_HJ_ID ] * Cos( udg_HJ_SoulLevitateTravelAngle[ udg_HJ_ID ] )
                        • Custom script: set travelMotionY = soulY + udg_HJ_TravelSpeedCalculation[ udg_HJ_ID ] * Sin( udg_HJ_SoulLevitateTravelAngle[ udg_HJ_ID ] )
                        • Custom script: call SetUnitX( udg_HJ_SoulUnit[ udg_HJ_ID ], travelMotionX )
                        • Custom script: call SetUnitY( udg_HJ_SoulUnit[ udg_HJ_ID ], travelMotionY )
                        • -------- --------
                        • -------- Loads, Updates, Saves: SoulDistanceCounter --------
                        • Set HJ_SoulDistanceCounter[HJ_ID] = (HJ_SoulDistanceCounter[HJ_ID] + HJ_TravelSpeedCalculation[HJ_ID])
                        • -------- --------
                      • Else - Actions
                    • -------- --------
                  • Else - Actions
                    • -------- --------
                    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • HJ_JudgeDurationCounter[HJ_ID] Greater than or equal to HJ_JudgeDuration[HJ_Level[HJ_ID]]
                      • Then - Actions
                        • -------- --------
                        • -------- Return to Host = True --------
                        • Set HJ_CustomBoolean[HJ_ID] = True
                        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          • If - Conditions
                            • HJ_CustomBoolean[HJ_ID] Equal to True
                          • Then - Actions
                            • -------- --------
                            • -------- Return Motion --------
                            • -------- --------
                            • Custom script: set hostX = GetWidgetX( udg_HJ_Unit )
                            • Custom script: set hostY = GetWidgetY( udg_HJ_Unit )
                            • Custom script: set returnAngle = Atan2( hostY - soulY, hostX - soulX )
                            • Custom script: set returnMotionX = soulX + udg_HJ_TravelSpeedCalculation[ udg_HJ_ID ] * Cos( returnAngle )
                            • Custom script: set returnMotionY = soulY + udg_HJ_TravelSpeedCalculation[ udg_HJ_ID ] * Sin( returnAngle )
                            • -------- --------
                            • -------- Loads, Updates, Saves: ReturnHeightCalculation --------
                            • Set HJ_ReturnHeightCalculation[HJ_ID] = (HJ_ReturnHeightCalculation[HJ_ID] - HJ_CustomReal2[HJ_Level[HJ_ID]])
                            • Custom script: call SetUnitFlyHeight( udg_HJ_SoulUnit[ udg_HJ_ID ], udg_HJ_ReturnHeightCalculation[ udg_HJ_ID ], 0 )
                            • -------- --------
                            • Custom script: if IsUnitInRangeXY( udg_HJ_SoulUnit[ udg_HJ_ID ], hostX, hostY, udg_HJ_CollisionRange ) then
                            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                              • If - Conditions
                                • Or - Any (Conditions) are true
                                  • Conditions
                                    • HJ_ReturnHeightCalculation[HJ_ID] Less than or equal to HJ_SoulInitialHeight[HJ_Level[HJ_ID]]
                                    • (Current flying height of HJ_SoulUnit[HJ_ID]) Less than or equal to HJ_SoulInitialHeight[HJ_Level[HJ_ID]]
                              • Then - Actions
                                • -------- ---------------------------------------------------------------------------------------------------------------------------------------- --------
                                • -------- onEnd --------
                                • -------- ---------------------------------------------------------------------------------------------------------------------------------------- --------
                                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                  • If - Conditions
                                    • (HJ_Unit belongs to an enemy of HJ_CasterPlayer[HJ_ID]) Equal to True
                                  • Then - Actions
                                    • Custom script: call DestroyEffect( AddSpecialEffectTarget( udg_HJ_Effect[ 9 ], udg_HJ_Unit, udg_HJ_SoulReturnDamageAttach ) )
                                    • Unit - Cause HJ_Caster[HJ_ID] to damage HJ_Unit, dealing HJ_SoulDamage[HJ_Level[HJ_ID]] damage of attack type HJ_AttackType and damage type HJ_DamageType
                                  • Else - Actions
                                    • Custom script: call DestroyEffect( AddSpecialEffectTarget( udg_HJ_Effect[ 8 ], udg_HJ_Unit, udg_HJ_SoulReturnHealAttach ) )
                                    • Unit - Set life of HJ_Unit to ((Life of HJ_Unit) + HJ_SoulHeal[HJ_Level[HJ_ID]])
                                • -------- --------
                                • Special Effect - Destroy HJ_ModelHandler[HJ_ID]
                                • Unit - Kill HJ_SoulUnit[HJ_ID]
                                • -------- --------
                                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                  • If - Conditions
                                    • HJ_Pause Equal to True
                                  • Then - Actions
                                    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                      • If - Conditions
                                        • (HJ_Unit belongs to an enemy of HJ_CasterPlayer[HJ_ID]) Equal to True
                                      • Then - Actions
                                        • Special Effect - Destroy HJ_PauseEnemyEffectHandler[HJ_ID]
                                      • Else - Actions
                                        • Special Effect - Destroy HJ_PauseFriendlyEffectHandler[HJ_ID]
                                    • Unit - Remove HJ_PauseAbility from HJ_Unit
                                  • Else - Actions
                                • -------- --------
                                • Unit Group - Remove HJ_Unit from HJ_Group
                                • -------- --------
                                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                  • If - Conditions
                                    • (Number of units in HJ_Group) Equal to 0
                                  • Then - Actions
                                    • Trigger - Turn off (This trigger)
                                  • Else - Actions
                                • -------- ---------------------------------------------------------------------------------------------------------------------------------------- --------
                              • Else - Actions
                            • Custom script: elseif udg_HJ_SoulLevitateTravel == true then
                            • Custom script: call SetUnitX( udg_HJ_SoulUnit[ udg_HJ_ID ], returnMotionX )
                            • Custom script: call SetUnitY( udg_HJ_SoulUnit[ udg_HJ_ID ], returnMotionY )
                            • Custom script: else
                            • Custom script: call SetUnitX( udg_HJ_SoulUnit[ udg_HJ_ID ], hostX )
                            • Custom script: call SetUnitY( udg_HJ_SoulUnit[ udg_HJ_ID ], hostY )
                            • Custom script: endif
                          • Else - Actions
                        • -------- --------
                      • Else - Actions
                        • -------- --------
                        • -------- Loads, Updates, Saves: JudgeDurationCounter --------
                        • Set HJ_JudgeDurationCounter[HJ_ID] = (HJ_JudgeDurationCounter[HJ_ID] + HJ_LoopInterval)
                        • -------- --------
                    • -------- --------
                • -------- --------
                • Custom script: if GetRandomInt( 0, 100 ) <= udg_HJ_SoulMotionEffectChance then
                • Custom script: call DestroyEffect( AddSpecialEffectTarget( udg_HJ_SoulMotionEffect[ udg_HJ_ID ], udg_HJ_SoulUnit[ udg_HJ_ID ], udg_HJ_SoulMotionEffectAttach[ udg_HJ_ID ] ) )
                • Custom script: endif
                • -------- --------

Greetings Hivers!
* Just another spell or ability that uses Unit Indexer System ( Bribe ) and testing the Pause Concept ( Maker ) "
* Useful at changing the result or outcome of the battlefield and combat ( Infantry Units ). "
Contents

Heaven's Justice v1.1 GUI (Map)

Reviews
KILLCIDE
An awesome spell concept accompanied with great spell effects. The configuration trigger is extremely extensive and neatly organized. The triggers also look good (excluding the overuse of Jass in GUI Custom script). I also personally think you only...
  1. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,505
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    Another awesome spell you have here, jakeZinc! However, it does have two similar problems from your previous submission:
    • Please keep map demo stuff in their own folder (TreeRevival)
    • TreeRevival was not letting me launch the map because of an "unexpected: elseif"
    • Since you are not using Bribe's other systems that require his Unit Indexer, the user is free to use any other unit indexer. However, since your configurable runs off Bribe's UnitIndexEvent, you make it a requirement. I would change it to Map Initilization just to get rid of that "requirement" :) Also, why run off the onIndex event in the first place? You don't create any units off of it
    • When you are preloading, why have users input the strings manually when you can just directly refer to their variables?
    • Insetad of having to recalculate
      360. / HJ_RadiusEffectCount[HJ_AbilityLevel]
      onCast per loop iteration, you can just calculate it on map init like I explained here
    • HJ_LevitateSpeedCalculation can also be applied to ^
    • Special Effects that are applied on the target directly should always have their attachment point as a configurable. Some effects look weird when applied to chest, but look great on origin. Some effects look werid when applied to origin, but look great on overhead. Please make them all configurable (ex: HJ_FriendlySoulModelHandler &
      call DestroyEffect( AddSpecialEffectTarget( udg_HJ_SoulFriendlyModel, udg_HJ_PickedUnit, "chest" ) )
      )
    • Woow the SoulLevitateTravel actions look like black magic. Do you mind explaining what's going on here o:
    • It's not necessary to null global unit variables
    • soulX and Y will never change since the affected units are paused. You can store them onCast as well as Cos and Sin
    • This spell creates a lot of dummy units! I recommend you take a look at DummyRecycler to help with performance
    Like I said for your previous submission, this spell uses way more Jass than GUI. The lack of indentation and colored syntax makes this a real pain to read :( please spare me. Set to Awaiting Update!
     
  2. jakeZinc

    jakeZinc

    Joined:
    Aug 13, 2013
    Messages:
    1,395
    Resources:
    20
    Spells:
    20
    Resources:
    20
    you mean hostX and hostY right?, pausing the affected units is configurable so in case the user wants to disable the pause then the hostX and hostY will change.

    your right, I will change that.

    it is about the souls will travel at different places inside the calculated radius, GetRandomReal( minimumdistance, maximum distance ). ( Yeah right I'll gonna calculate them onInit in the next version. )


    Gonna update this spell as soon as I have time ^^.
     
  3. jakeZinc

    jakeZinc

    Joined:
    Aug 13, 2013
    Messages:
    1,395
    Resources:
    20
    Spells:
    20
    Resources:
    20
    Updated to v1.1.

    - Deleted unused systems inside the demo map.
    - Users are now free to choose any unit indexer. ( Changed UnitIndexEvent to Map Initialization event onInit )
    - Preloads now effect string variables instead of manually writing it.
    - 9 effect variables converted into 1 effect array variable. ( reduced string effect variables )
    - Now initializes some calculations onInit. ( prevents recalculating issues. )
    - Added ability's max level configuration. ( for calculating purposes and etc. )
    - Attachment points on dummy unit is now configurable.
    - UnitXY native changed to WidgetXY. ( faster )
     
  4. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,505
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    An awesome spell concept accompanied with great spell effects. The configuration trigger is extremely extensive and neatly organized. The triggers also look good (excluding the overuse of Jass in GUI Custom script). I also personally think you only need to check if "(Number of units in HJ_Group) Greater than 0" to turn on the loop instead of both that and "(Heavens Justice Loop <gen> is on) Equal to False." I'd also prefer it if you used an integer variable to keep track the number of units instead of having to call the function to count it for you :)

    Approved with a 5/5 rating.
     
  5. thegodfather9

    thegodfather9

    Joined:
    Jul 20, 2016
    Messages:
    11
    Resources:
    0
    Resources:
    0
    Love this spell! The effects are so cool especially the soul leaving the body idea! 1 problem I found is that when used on enemies who are asleep, the units are not paused. They don't wake up or anything but if I use the ability on them then attack them they wake up and are able to move. It still does its damage but it just doesn't pause them! Other than that i gave it a 5/5!
     
  6. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,804
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Moved to awaiting update. The spell is heavily bugged when cast against Neutral Hostile units. The Neutral Hostile units are paused permanently and never take any damage, with visually their souls not flying away and returning.

    It works correctly against other player units as shown in the test map. The problem seems to be with Neutral Hostile, possibly because Neutral Hostile units do not like taking orders due to their strange AI and mechanics. I would also suggest making sure it works when targeting all other neutral slots as well. In worst case there needs to be special logic to prevent the units from becoming permanently paused, for example a fail safe timeout that unpauses them at the expected time even if their soul did not visually fly around as intended.
     
    Last edited: Nov 16, 2018
  7. jakeZinc

    jakeZinc

    Joined:
    Aug 13, 2013
    Messages:
    1,395
    Resources:
    20
    Spells:
    20
    Resources:
    20
    That's kinda strange... Guess I'll check it out and find a solution for this one.
     
  8. jakeZinc

    jakeZinc

    Joined:
    Aug 13, 2013
    Messages:
    1,395
    Resources:
    20
    Spells:
    20
    Resources:
    20
    Found out that the indexer system is the culprit and not from the neutral hostiles and code itself. It's just minor as the newest patches implemented this 24 player thing and made the system excludes those. Therefore, the system can only index 12 players. I maybe using the outdated version of the system and gonna update it soon as possible.

    Regarding to those sleeping units unable to pause is because it requires to wake them first before they can follow my artificial pausing order. Fortunately, it can be easily fixed as there's a native for it.

    Thanks for your considerations,
    I may update this resource concerning those soon.