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. Choose your ride to damnation in the 5th Special Effect Contest Poll.
    Dismiss Notice
  6. The winners of the 13th Techtree Contest have been announced!
    Dismiss Notice
  7. Vote for the best entries in the 13th Music Contest Poll.
    Dismiss Notice
  8. 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.

Spiritual Disrupt v1.1

Submitted by BUP
This bundle is marked as substandard. It may contain bugs, not perform optimally or otherwise be in violation of the submission rules.
Description

HERO releases a spiritual wave from his ancient totem by slamming his totem.The wave heads towards the targeted point while the repulsive force around the wave pushes the enemies.Along it's path the wave causes a certain damage to the enemies.

[Level 1] - Deals 90 damage and pushes enemies with a weak force. The wave Travels to 800 distance.
[Level 2] - Deals 120 damage and pushes enemies with a moderate force. The wave Travels to 1100 distance.
[Level 3] - Deals 150 damage and pushes enemies with a strong force. The wave Travels to 1400 distance.
[Level 4] - Deals 180 damage and pushes enemies with an extreme force. The wave Travels to 1700 distance.

Cooldown - 4,3.5,3,2.5 seconds.

Triggers

spr Config

  • spr Config
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Sets the ability to activate the trigger --------
      • Set spr_ability = Spiritual Disrupt
      • -------- The animation string for the caster[The "slam" animation is set bcuz it looks good on Tauren] --------
      • Set spr_caster_animation = slam
      • -------- Damage dealt to the enemies[Arrays are Levels e.g. Array 1 = Level 1] --------
      • Set spr_damage[1] = 90.00
      • Set spr_damage[2] = 120.00
      • Set spr_damage[3] = 150.00
      • Set spr_damage[4] = 180.00
      • -------- Is the picked units a structure?? --------
      • Set spr_condition[1] = False
      • -------- Do the picked units belong to the enemy of the caster?? --------
      • Set spr_condition[2] = True
      • -------- Is the Picked Unit Alive?? --------
      • Set spr_condition[3] = True
      • -------- Is the Picked Unit belong in the spr_finished_group? --------
      • Set spr_condition[4] = False
      • -------- Is the Picked Unit in spr_finished_group in desirable range?? --------
      • Set spr_condition[5] = True
      • -------- The max distances that the wave will travel[Arrays are Levels e.g. Array 1 = Level 1] --------
      • Set spr_max_distance[1] = 800.00
      • Set spr_max_distance[2] = 1100.00
      • Set spr_max_distance[3] = 1400.00
      • Set spr_max_distance[4] = 1700.00
      • -------- The size of the wave travelled.[Arrays are Levels e.g. Array 1 = Level 1] --------
      • Set spr_dummy_size[1] = 140.00
      • Set spr_dummy_size[2] = 140.00
      • Set spr_dummy_size[3] = 140.00
      • Set spr_dummy_size[4] = 140.00
      • -------- The range around the wave that the enemies will be pushed out [Arrays are Levels e.g. Array 1 = Level 1] --------
      • Set spr_range[1] = 280.00
      • Set spr_range[2] = 280.00
      • Set spr_range[3] = 280.00
      • Set spr_range[4] = 280.00
      • -------- The travelling speed of the wave --------
      • Set spr_speed[1] = 20.00
      • Set spr_speed[2] = 20.00
      • Set spr_speed[3] = 20.00
      • Set spr_speed[4] = 20.00
      • -------- The repulsive force speed of the wave --------
      • Set spr_recoil_speed[1] = 9.00
      • Set spr_recoil_speed[2] = 12.00
      • Set spr_recoil_speed[3] = 15.00
      • Set spr_recoil_speed[4] = 18.00
      • -------- The time interval that the wave effect ocuuring --------
      • Set spr_Howl_Interval = 0.09
      • -------- Damage cause type --------
      • Set spr_attack_type = Chaos
      • -------- The model file of the wave effect --------
      • Set spr_effect_model[1] = Abilities\Spells\Other\HowlOfTerror\HowlCaster.mdl
      • -------- The attachent & model file of the damage caused effect --------
      • Set spr_attachment[2] = chest
      • Set spr_effect_model[2] = Abilities\Spells\Undead\DeathandDecay\DeathandDecayTarget.mdl
      • -------- The attachent & model file of the pushing effect --------
      • Set spr_attachment[3] = overhead
      • Set spr_effect_model[3] = Abilities\Weapons\DruidoftheTalonMissile\DruidoftheTalonMissile.mdl
      • -------- FOR PROS --------
      • Set spr_dummy_type = Universal Dummy
      • Set global_interval = 0.03
      • Trigger - Add to spr Loop <gen> the event (Time - Every global_interval seconds of game time)


spr Cast

  • spr Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to spr_ability
    • Actions
      • -------- ---------INDEXING STARTS---------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • spr_index_listener Equal to 0
        • Then - Actions
          • Trigger - Turn on spr Loop <gen>
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • spr_recycle_size Greater than 0
        • Then - Actions
          • Set spr_recycle_size = (spr_recycle_size - 1)
          • Set spr_current_index = spr_recycle_container[spr_recycle_size]
        • Else - Actions
          • Set spr_current_index = spr_index_size
          • Set spr_index_size = (spr_index_size + 1)
      • -------- ---------INDEXING ENDS---------- --------
      • Set spr_timer[spr_current_index] = spr_Howl_Interval
      • Set spr_caster[spr_current_index] = (Triggering unit)
      • Animation - Play spr_caster[spr_current_index]'s spr_caster_animation animation
      • Set spr_player[spr_current_index] = (Owner of spr_caster[spr_current_index])
      • Set spr_level[spr_current_index] = (Level of spr_ability for spr_caster[spr_current_index])
      • Set spr_caster_point[spr_current_index] = (Position of spr_caster[spr_current_index])
      • Set spr_target_point[spr_current_index] = (Target point of ability being cast)
      • Set spr_angle[spr_current_index] = (Angle from spr_caster_point[spr_current_index] to spr_target_point[spr_current_index])
      • Unit - Create 1 spr_dummy_type for spr_player[spr_current_index] at spr_caster_point[spr_current_index] facing spr_angle[spr_current_index] degrees
      • Set spr_dummy[spr_current_index] = (Last created unit)
      • Animation - Change spr_dummy[spr_current_index]'s size to (spr_dummy_size[spr_level[spr_current_index]]%, spr_dummy_size[spr_level[spr_current_index]]%, spr_dummy_size[spr_level[spr_current_index]]%) of its original size
      • Custom script: call RemoveLocation(udg_spr_target_point[udg_spr_current_index])
      • -------- ---------INDEXING STARTS---------- --------
      • Set spr_index_container[spr_index_listener] = spr_current_index
      • Set spr_index_listener = (spr_index_listener + 1)
      • -------- ---------INDEXING ENDS---------- --------


spr Loop

  • spr Loop
    • Events
    • Conditions
    • Actions
      • -------- ---------INDEXING STARTS---------- --------
      • For each (Integer spr_loop) from 0 to (spr_index_listener - 1), do (Actions)
        • Loop - Actions
          • Set spr_current_index = spr_index_container[spr_loop]
          • -------- ---------INDEXING ENDS---------- --------
          • Set spr_dummy_point[spr_current_index] = (Position of spr_dummy[spr_current_index])
          • Set spr_distance[spr_current_index] = (Distance between spr_caster_point[spr_current_index] and spr_dummy_point[spr_current_index])
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • spr_distance[spr_current_index] Greater than spr_max_distance[spr_level[spr_current_index]]
            • Then - Actions
              • Custom script: call RemoveLocation(udg_spr_caster_point[udg_spr_current_index])
              • Special Effect - Create a special effect at spr_dummy_point[spr_current_index] using spr_effect_model[1]
              • Special Effect - Destroy (Last created special effect)
              • Unit - Kill spr_dummy[spr_current_index]
              • Unit Group - Remove all units from spr_finished_group[spr_current_index]
              • Unit Group - Remove all units from spr_group[spr_current_index]
              • -------- ---------INDEXING STARTS---------- --------
              • Set spr_index_listener = (spr_index_listener - 1)
              • Set spr_index_container[spr_loop] = spr_index_container[spr_index_listener]
              • Set spr_recycle_container[spr_recycle_size] = spr_current_index
              • Set spr_recycle_size = (spr_recycle_size + 1)
              • Set spr_loop = (spr_loop - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • spr_index_listener Equal to 0
                • Then - Actions
                  • Trigger - Turn off spr Loop <gen>
                • Else - Actions
              • -------- ---------INDEXING ENDS---------- --------
            • Else - Actions
              • Set spr_dummy_point[spr_current_index] = (Position of spr_dummy[spr_current_index])
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • spr_timer[spr_current_index] Greater than 0.00
                • Then - Actions
                  • Set spr_timer[spr_current_index] = (spr_timer[spr_current_index] - global_interval)
                • Else - Actions
                  • Set spr_timer[spr_current_index] = spr_Howl_Interval
                  • Special Effect - Create a special effect at spr_dummy_point[spr_current_index] using spr_effect_model[1]
                  • Special Effect - Destroy (Last created special effect)
              • Custom script: call SetUnitX(udg_spr_dummy[udg_spr_current_index],GetUnitX(udg_spr_dummy[udg_spr_current_index]) + udg_spr_speed[udg_spr_level[udg_spr_current_index]] * Cos(udg_spr_angle[udg_spr_current_index] * bj_DEGTORAD))
              • Custom script: call SetUnitY(udg_spr_dummy[udg_spr_current_index],GetUnitY(udg_spr_dummy[udg_spr_current_index]) + udg_spr_speed[udg_spr_level[udg_spr_current_index]] * Sin(udg_spr_angle[udg_spr_current_index] * bj_DEGTORAD))
              • Set spr_group[spr_current_index] = (Units within spr_range[spr_level[spr_current_index]] of spr_dummy_point[spr_current_index] matching (((((Matching unit) is A structure) Equal to spr_condition[1]) and (((Matching unit) belongs to an enemy of spr_player[spr_current_index]) Equal to spr_condit
              • Unit Group - Pick every unit in spr_group[spr_current_index] and do (Actions)
                • Loop - Actions
                  • Set spr_picked = (Picked unit)
                  • Custom script: call DestroyEffect(AddSpecialEffectTarget(udg_spr_effect_model[2], udg_spr_picked,udg_spr_attachment[2]))
                  • Unit - Cause spr_caster[spr_current_index] to damage spr_picked, dealing spr_damage[spr_level[spr_current_index]] damage of attack type spr_attack_type and damage type Normal
                  • Unit Group - Add spr_picked to spr_finished_group[spr_current_index]
              • Custom script: call DestroyGroup(udg_spr_group[udg_spr_current_index])
              • Unit Group - Pick every unit in spr_finished_group[spr_current_index] and do (Actions)
                • Loop - Actions
                  • Set spr_picked2 = (Picked unit)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (spr_picked2 is in (Units within spr_range[spr_level[spr_current_index]] of spr_dummy_point[spr_current_index])) Equal to spr_condition[5]
                    • Then - Actions
                      • Set spr_picked2_point = (Position of spr_picked2)
                      • Set spr_angle_2[spr_current_index] = (Angle from spr_dummy_point[spr_current_index] to spr_picked2_point)
                      • Custom script: call RemoveLocation(udg_spr_picked2_point)
                      • Custom script: call SetUnitX(udg_spr_picked2,GetUnitX(udg_spr_picked2) + udg_spr_recoil_speed[udg_spr_level[udg_spr_current_index]] * Cos(udg_spr_angle_2[udg_spr_current_index] * bj_DEGTORAD))
                      • Custom script: call SetUnitY(udg_spr_picked2,GetUnitY(udg_spr_picked2) + udg_spr_recoil_speed[udg_spr_level[udg_spr_current_index]] * Sin(udg_spr_angle_2[udg_spr_current_index] * bj_DEGTORAD))
                      • Custom script: call DestroyEffect(AddSpecialEffectTarget(udg_spr_effect_model[3], udg_spr_picked2,udg_spr_attachment[3]))
                    • Else - Actions
                      • Unit Group - Remove spr_picked2 from spr_finished_group[spr_current_index]
              • Custom script: call RemoveLocation(udg_spr_dummy_point[udg_spr_current_index])


spr Cleaner

  • spr Cleaner
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set spr_dying = (Triggering unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of spr_dying) Equal to spr_dummy_type
        • Then - Actions
          • Unit - Remove spr_dying from the game
        • Else - Actions




ChangeLogs

v1.0 - Uploaded Spell
v1.1 - Changed Indexing method



Keywords:
BUP,GUI,MUI,Spell,
Contents

Spiritual Disrupt v1.0 (Map)

Reviews
Moderator
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. 22:40, 6th Jul 2014 PurgeandFire: Review: http://www.hiveworkshop.com/forums/2552191-post8.html
  1. 12th Dec 2015
    IcemanBo: Too long as NeedsFix. Rejected.

    22:40, 6th Jul 2014
    PurgeandFire: Review:
    http://www.hiveworkshop.com/forums/2552191-post8.html
     
  2. deathismyfriend

    deathismyfriend

    Joined:
    Oct 24, 2012
    Messages:
    6,528
    Resources:
    14
    Spells:
    12
    Tutorials:
    2
    Resources:
    14
    This is in your else block so it leaks if the else is not run.
    • Custom script: call RemoveLocation(udg_spr_dummy_point[udg_spr_current_index])

    Don't use 2 unit groups. Put the ITE from the second group into the first and get rid of the second unit group.

    This leaks a unit group.
    • (spr_picked2 is in (Units within spr_range[spr_level[spr_current_index]] of spr_dummy_point[spr_current_index])) Equal to spr_condition[5]


    You also use an old and very inefficient method of indexing. Look at my tutorial Things You Should Know When Using Triggers / GUI on how to properly index / de-index.
     
  3. pOke

    pOke

    Joined:
    Mar 24, 2013
    Messages:
    1,104
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Instead of the dummy removed trigger, just go to the OE and set the death type to Can't Raise Does not Decay
     
  4. enterprise

    enterprise

    Joined:
    Oct 8, 2012
    Messages:
    19
    Resources:
    1
    Tools:
    1
    Resources:
    1
    • (spr_picked2 is in (Units within spr_range[spr_level[spr_current_index]] of spr_dummy_point[spr_current_index])) Equal to spr_condition[5]

    Use variable to create unit group for check instead
     
  5. deathismyfriend

    deathismyfriend

    Joined:
    Oct 24, 2012
    Messages:
    6,528
    Resources:
    14
    Spells:
    12
    Tutorials:
    2
    Resources:
    14
    A variable is not needed. This can be used instead.
    • Custom script: set bj_wantDestroyGroup = true

    As long as that is set before the unit group creation it will destroy the unit group.
     
  6. nhocklanhox6

    nhocklanhox6

    Joined:
    Feb 12, 2012
    Messages:
    343
    Resources:
    28
    Models:
    6
    Spells:
    21
    Tutorials:
    1
    Resources:
    28
    Yes, It doesn't need variable. But
    set bj_wantDestroyGroup = true
    is unsafe and drop fps faster than
    call DestroyGroup()
    . You can test it by yourself.

    ----

    @BUP: If you use variables array, you need to limit array size of those variables.

    • spr Config
      • Events
      • Conditions
      • Actions
        • Set global_interval = 0.03
        • Trigger - Add to spr Loop <gen> the event (Time - Every global_interval seconds of game time)


    If you use this way, you should use timer instead of the trigger timer because timer faster than trigger timer.

    • Animation - Change spr_dummy[spr_current_index]'s size to (spr_dummy_size[spr_level[spr_current_index]]%, spr_dummy_size[spr_level[spr_current_index]]%, spr_dummy_size[spr_level[spr_current_index]]%) of its original size


    =>

    • Animation - Change spr_dummy[spr_current_index]'s size to (spr_dummy_size[spr_level[spr_current_index]]%, 0.00%, 0.00%) of its original size


    Fix this:

    • spr Loop
      • Events
      • Conditions
      • Actions
        • For each (Integer spr_loop) from 0 to (spr_index_listener (- 1 ??????)), do (Actions)
          • Loop - Actions


    Saves
    udg_spr_angle[udg_spr_current_index] * bj_DEGTORAD


    udg_spr_speed[udg_spr_level[udg_spr_current_index]] * Cos(constantVar)
    udg_spr_speed[udg_spr_level[udg_spr_current_index]] * Sin(constantVar)


    into variable since they are constant variables.

    You've leaked this location I guess since you forgoted to clean the first location.

    • For each (Integer spr_loop) from 0 to (spr_index_listener - 1), do (Actions)
      • Loop - Actions
        • Set spr_current_index = spr_index_container[spr_loop]
        • -------- ---------INDEXING ENDS---------- --------
        • Set spr_dummy_point[spr_current_index] = (Position of spr_dummy[spr_current_index])
        • Set spr_distance[spr_current_index] = (Distance between spr_caster_point[spr_current_index] and spr_dummy_point[spr_current_index])


    • Else - Actions
      • Set spr_dummy_point[spr_current_index] = (Position of spr_dummy[spr_current_index])
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • spr_timer[spr_current_index] Greater than 0.00
      • Then - Actions
        • Set spr_timer[spr_current_index] = (spr_timer[spr_current_index] - global_interval)
      • Else - Actions
        • Set spr_timer[spr_current_index] = spr_Howl_Interval
        • Special Effect - Create a special effect at spr_dummy_point[spr_current_index] using spr_effect_model[1]
        • Special Effect - Destroy (Last created special effect)


    In my memory leaks checker, you've leaked location and group 0.0...

    And as pOke said too ^_^..
     
    Last edited: Mar 29, 2014
  7. BUP

    BUP

    Joined:
    Sep 9, 2012
    Messages:
    149
    Resources:
    8
    Spells:
    8
    Resources:
    8
    @nhocklanhox6 ,@deathismyfriend , @poke and @enterprise
    Thanks for the advices.
    I'll be uploading a fixed version of this spell soon:ogre_hurrhurr:
     
  8. PurgeandFire

    PurgeandFire

    Code Moderator

    Joined:
    Nov 11, 2006
    Messages:
    7,426
    Resources:
    18
    Icons:
    1
    Spells:
    4
    Tutorials:
    9
    JASS:
    4
    Resources:
    18
    Review:
    • Fix the leaks as deathismyfriend described (the location and unit group).
    • See what pOke said. Change it to can't raise, doesn't decay.
    • And fix what nhocklanhox6 said.

    Hehe. Thanks guys for helping out with the review. :D
     
  9. GywGod133

    GywGod133

    Joined:
    Jul 16, 2012
    Messages:
    631
    Resources:
    3
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    3
    i recommend you use 0.03125 instead using 0.03
     
  10. Mythic

    Mythic

    Media Manager

    Joined:
    Apr 24, 2012
    Messages:
    7,883
    Resources:
    107
    Models:
    91
    Icons:
    5
    Maps:
    3
    Spells:
    6
    Tutorials:
    2
    Resources:
    107
    Nice, we don't see much Taurens using spiritual powers. :p

    However you may choose to not include the last trigger, and set Dummies in the OE properly.