• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Heavy Slash[GUI/MUI]

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
Hello,
At this time,this spell trigger have been added spell initialization...so it will be easy to configure.

--Screenshot--
234492-albums7033-picture77958.png


--The triggers--


  • HSInit
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- IF YOU CONFIG ANYTHING BELOW THIS LINE,MAKE SURE THE SPELL DESCRIPTION MATCH WITH THIS SETTINGS. --------
      • -------- ============================SPELL_CONFIG============================ --------
      • -------- /////////////////////////////////////////////////////////////////////////////////////////////// --------
      • -------- The spell. --------
      • Set HS_Ability = Heavy Slash
      • -------- /////////////////////////////////////////////////////////////////////////////////////////////// --------
      • -------- The spell maximum distance. --------
      • Set HS_MaxDistance_Config[1] = 800.00
      • Set HS_MaxDistance_Config[2] = 1000.00
      • Set HS_MaxDistance_Config[3] = 1400.00
      • -------- /////////////////////////////////////////////////////////////////////////////////////////////// --------
      • -------- The spell damage per point. --------
      • Set HS_Damage[1] = 200.00
      • Set HS_Damage[2] = 400.00
      • Set HS_Damage[3] = 600.00
      • -------- /////////////////////////////////////////////////////////////////////////////////////////////// --------
      • -------- The spell starting distance. --------
      • Set HS_CurDistance_Config[1] = 100.00
      • -------- /////////////////////////////////////////////////////////////////////////////////////////////// --------
      • -------- The spell distance per point. --------
      • Set HS_DistancePerPoint_Config[1] = 150.00
      • -------- /////////////////////////////////////////////////////////////////////////////////////////////// --------
      • -------- The spell effect. --------
      • Set HS_Effect[1] = Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
      • Set HS_Effect[2] = Abilities\Spells\NightElf\BattleRoar\RoarCaster.mdl
      • -------- This effect will be created at enemy unit. --------
      • Set HS_Effect[3] = Abilities\Spells\Human\MarkOfChaos\MarkOfChaosTarget.mdl
      • -------- /////////////////////////////////////////////////////////////////////////////////////////////// --------
      • -------- ============================SPELL_CONFIG============================ --------



  • HSStart
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to HS_Ability
    • Actions
      • -------- /////////////////////////////////////////////////////////////////////////////////////////////// --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • HS_LoopIndex[1] Equal to 0
        • Then - Actions
          • Trigger - Turn on HSLoop <gen>
        • Else - Actions
      • Set HS_LoopIndex[1] = (HS_LoopIndex[1] + 1)
      • Set HS_LoopIndex[2] = (HS_LoopIndex[2] + 1)
      • Set HS_Check[HS_LoopIndex[2]] = True
      • -------- /////////////////////////////////////////////////////////////////////////////////////////////// --------
      • -------- Caster --------
      • Set HS_Caster[HS_LoopIndex[2]] = (Casting unit)
      • -------- /////////////////////////////////////////////////////////////////////////////////////////////// --------
      • Set HS_CurDistance[HS_LoopIndex[2]] = HS_CurDistance_Config[1]
      • Set HS_DistancePerPoint[HS_LoopIndex[2]] = HS_DistancePerPoint_Config[1]
      • Set HS_MaxDistance[HS_LoopIndex[2]] = HS_MaxDistance_Config[(Level of HS_Ability for HS_Caster[HS_LoopIndex[2]])]
      • Set HS_Damage1[HS_LoopIndex[2]] = HS_Damage[(Level of HS_Ability for HS_Caster[HS_LoopIndex[2]])]
      • -------- /////////////////////////////////////////////////////////////////////////////////////////////// --------
      • Set HS_Angle[HS_LoopIndex[2]] = (Facing of HS_Caster[HS_LoopIndex[2]])
      • Set HS_LeakPoint[1] = (Position of HS_Caster[HS_LoopIndex[2]])
      • Set HS_LeakPoint[2] = ((Position of HS_Caster[HS_LoopIndex[2]]) offset by HS_CurDistance[HS_LoopIndex[2]] towards HS_Angle[HS_LoopIndex[2]] degrees)
      • Unit - Create 1 FireEffect for (Owner of HS_Caster[HS_LoopIndex[2]]) at HS_LeakPoint[2] facing HS_Angle[HS_LoopIndex[2]] degrees
      • Set HS_Dummy[HS_LoopIndex[2]] = (Last created unit)
      • -------- /////////////////////////////////////////////////////////////////////////////////////////////// --------
      • Custom script: call RemoveLocation(udg_HS_LeakPoint[1])
      • Custom script: call RemoveLocation(udg_HS_LeakPoint[2])
      • Animation - Play HS_Caster[HS_LoopIndex[2]]'s attack animation
      • -------- /////////////////////////////////////////////////////////////////////////////////////////////// --------



  • HSLoop
    • Events
      • Time - Every 0.08 seconds of game time
    • Conditions
    • Actions
      • -------- DON'T CHANGE ANYTHING BELOW THIS LINE. --------
      • -------- ************************************************************************************************************* --------
      • For each (Integer HS_LoopIndex[3]) from 1 to HS_LoopIndex[2], do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • HS_Check[HS_LoopIndex[3]] Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • HS_CurDistance[HS_LoopIndex[3]] Less than or equal to HS_MaxDistance[HS_LoopIndex[3]]
                • Then - Actions
                  • Set HS_CurDistance[HS_LoopIndex[3]] = (HS_CurDistance[HS_LoopIndex[3]] + HS_DistancePerPoint[HS_LoopIndex[3]])
                  • Set HS_LeakPoint[1] = (Position of HS_Dummy[HS_LoopIndex[3]])
                  • Set HS_LeakPoint[2] = (HS_LeakPoint[1] offset by HS_DistancePerPoint[HS_LoopIndex[3]] towards HS_Angle[HS_LoopIndex[3]] degrees)
                  • Unit - Move HS_Dummy[HS_LoopIndex[3]] instantly to HS_LeakPoint[2], facing HS_Angle[HS_LoopIndex[3]] degrees
                  • Unit - Create 1 FireEffect for (Owner of HS_Caster[HS_LoopIndex[3]]) at HS_LeakPoint[1] facing HS_Angle[HS_LoopIndex[3]] degrees
                  • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
                  • Special Effect - Create a special effect at HS_LeakPoint[2] using HS_Effect[1]
                  • Special Effect - Destroy (Last created special effect)
                  • Special Effect - Create a special effect at HS_LeakPoint[2] using HS_Effect[2]
                  • Special Effect - Destroy (Last created special effect)
                  • Set HS_EnemyGroup = (Units within 200.00 of HS_LeakPoint[2] matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of HS_Caster[HS_LoopIndex[3]])) Equal to True) and (((Matching unit) is Magic Immune) Equal to False))))
                  • Unit Group - Pick every unit in HS_EnemyGroup and do (Actions)
                    • Loop - Actions
                      • Unit - Cause HS_Caster[HS_LoopIndex[3]] to damage (Picked unit), dealing HS_Damage1[HS_LoopIndex[3]] damage of attack type Spells and damage type Normal
                      • Special Effect - Create a special effect at (Position of (Picked unit)) using HS_Effect[3]
                      • Special Effect - Destroy (Last created special effect)
                  • -------- /////////////////////////////////////////////////////////////////////////////////////////////// --------
                  • Custom script: call DestroyGroup(udg_HS_EnemyGroup)
                  • Custom script: call RemoveLocation(udg_HS_LeakPoint[1])
                  • Custom script: call RemoveLocation(udg_HS_LeakPoint[2])
                  • -------- /////////////////////////////////////////////////////////////////////////////////////////////// --------
                • Else - Actions
                  • Set HS_LoopIndex[1] = (HS_LoopIndex[1] - 1)
                  • Set HS_Check[HS_LoopIndex[3]] = False
                  • Unit - Remove HS_Dummy[HS_LoopIndex[3]] from the game
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • HS_LoopIndex[1] Equal to 0
        • Then - Actions
          • Set HS_LoopIndex[2] = 0
          • Trigger - Turn off (This trigger)
        • Else - Actions
Contents

Just another Warcraft III map (Map)

Reviews
01:29, 14th Jan 2014 BPower: Do not duplicate posts. I'll reject this one in favor of the admiral spell pack. For any questions feel free to pm me.

Moderator

M

Moderator

01:29, 14th Jan 2014
BPower:
Do not duplicate posts. I'll reject this one in favor of the admiral spell pack. For any questions feel free to pm me.
 
Level 19
Joined
Mar 18, 2012
Messages
1,716
Hi KaelKorther,
congratulations on your first and hopefully not last submission in the spell section :).

There are some things, that must be done to get your resource approved:
  • You need a configuration trigger which runs on map initialization.
    This should covers settings like damage per level, the ability id, used effects, ...

    • Heavy Slash Init
      • Events
        • Map initialization
      • Conditions
      • Actions
        • -------- Configuration --------
        • -------- -------------------------------------------------------------------- --------
        • -------- The ability that used in the spell. Ability Name: --------
        • Set HS_Ability = Heavy Slash
        • -------- Attack Type and Damage Type used by the spell --------
        • Set HS_Attacktype = Normal
        • Set HS_Damagetype = Normal
        • -------- -------------------------------------------------------------------- --------
        • -------- Effect which is displayed when .... --------
        • Set HS_Effect = Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
        • -------- -------------------------------------------------------------------- --------
        • -------- Damage Configuration based on the ability level --------
        • Set HS_Damage[1] = 100.00
        • Set HS_Damage[2] = 200.00
        • Set HS_Damage[3] = 300.00
  • This will of course also result in some changes in your "start" tigger, look into other approved GUI resources how it is done there.
  • The boolean HS_Check is not required, if you do a proper dynamic indexing. Take a look into my signature "dynamic indexing". It is a very user-friendly tutorial about proper dynamic indexing.

In general this resource is very simple and therefore might face rejection.
Please also remove the picture from the desciption. As you can see, it is already uploaded in the screenshot window.
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
@BPower
the TO is not using Dynamic Indexing he is using an old form of Indexed Arrays.
Dynamic Indexing also has flaws as shown in a thread created by Maker.

@TO
You use an old indexing method which is inefficient and can cause the op-limit or the array limit to be reached breaking your spell. There is a chapter called how to index in my tutorial that shows you the new efficient way on how to index.
 
Level 19
Joined
Mar 18, 2012
Messages
1,716
@KaelKorther: Dynamic indexing is only "flawed", if the instance order matters. Here it is very well explained: Why is dynamic indexing flawed

@deathismyfriend: In this spell it doesn't.
Don't argue the spell could be launched three times or more within a very short interval in the same angle and/or with a point of intersection for instance 2 and 3. That will most likely never gonna happen.

Edit (10.1.2014): I don't intend on bumping the thread with an off-topic so I just add it here.
I guess you assume I was refering to Hanky's Dynamic Indexing, which I'm not. The tutorial in my signature is exactly the same like yours is.

The term "Indexed Array" does not exist as an name for this form of data structure. It is just a normal array with an index.
Back to the original problem, if you really care about the instance order, use a different form of collection, which we call a "linked list".
In general they are neither "more efficient" nor faster than arrays.
Personally I wouldn't use a linked list here, because the chance of a spell missbehaviour is close to zero. Furthermore there other parameters which must be taken into consideration like the TimerTimeout, if we are talking about extreme fidelity.
My opinion on this case is very close to Cokemonkeys.
 
Last edited:
Level 29
Joined
Oct 24, 2012
Messages
6,543
@deathismyfriend: In this spell it doesn't.
Don't argue the spell could be launched three times or more within a very short interval in the same angle and/or with a point of intersection for instance 2 and 3. That will most likely never gonna happen.

In every spell it matters. In the current state this spell is in it can break. Also dynamic indexing is slower than indexed arrays. You can also keep order with indexed arrays as i have done it plenty of times.
If a spell can break because of a flaw in the design then that means it should not be approved. Just because it may not happen doesn't mean anything.
Also people can edit the length of the spell which is the whole point of a config trigger. That can cause it to break a lot easier than what it is currently set at. That is why spells need to be as error proof as possible.

@TO
this leaks.
  • Special Effect - Create a special effect at (Position of (Picked unit)) using HS_Effect[3]
In your unit group creation this should be stored in a player variable before it is used.
  • (Owner of HS_Caster[HS_LoopIndex[3]])) Equal to True)
anything used twice or more should be stored in a variable.
 
Level 2
Joined
Dec 7, 2013
Messages
7
In every spell it matters. In the current state this spell is in it can break. Also dynamic indexing is slower than indexed arrays. You can also keep order with indexed arrays as i have done it plenty of times.
If a spell can break because of a flaw in the design then that means it should not be approved. Just because it may not happen doesn't mean anything.
Also people can edit the length of the spell which is the whole point of a config trigger. That can cause it to break a lot easier than what it is currently set at. That is why spells need to be as error proof as possible.

@TO
this leaks.
  • Special Effect - Create a special effect at (Position of (Picked unit)) using HS_Effect[3]
In your unit group creation this should be stored in a player variable before it is used.
  • (Owner of HS_Caster[HS_LoopIndex[3]])) Equal to True)
anything used twice or more should be stored in a variable.
Then...how to fix this...
  • Special Effect - Create a special effect at (Position of (Picked unit)) using HS_Effect[3]
 
Level 5
Joined
Sep 28, 2010
Messages
75
KaelKorther said:
Then...how to fix this...
  • Special Effect - Create a special effect at (Position of (Picked unit)) using HS_Effect[3]
You mean the leak right?

  • Set Temp_Point = (Position of (Picked unit))
  • Special Effect - Create a special effect at Temp_Point using HS_Effect[3]
  • Custom script - call RemoveLocation(udg_Temp_Point)
Basically what this does is that it stores the point onto a variable which can then be destroyed through the use of the RemoveLocation function through custom script.

Temp_Point can be any Point variable that is not used by other spells/systems. Since the point is destroyed right after it is created and used, Temp_Point can be reused again and again as long as you don't use waits.
 
Top