• 🏆 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!

Soul Grasp v1.6

  • Like
Reactions: Mantis_Style
Soul Grasp v1.5

Description: Takes a hold of the target's soul, slowly dragging it towards the caster. When it reaches, the caster thrusts the target outward, dealing damage. Damage is based on how many seconds it took the soul to reach the caster.

Level 1 - 50 x Time Damage.
Level 2 - 75 x Time Damage.
Level 3 - 100 x Time Damage.

v1.0:
- Released.
v1.0b:
- Fixed locations.
- Fixed tree boolean.
- Removed some unused variables.
v1.2:
- Changed real to integer so it looks much better and cleaner.
- Now uses Dynamic Index Recycling [DIR]
v1.3:
- Fixed MUI Checking.
- Made floating text optional.
v1.4:
- Fixed location.
v1.5:
- Target now has a "Faded" effect [See Screenie].
- Added a neat looking lightning effect. [See Screenie].
- Target now faces the caster when being dragged.
v1.6:
- Fixed speed issue.


  • Soul Grasp Init
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Soul Grasp
    • Actions
      • -------- Start the indexing --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MUI_1 Equal to 0
        • Then - Actions
          • -------- No instances are running = turn on loop trigger. --------
          • Trigger - Turn on Soul Grasp Loop <gen>
        • Else - Actions
      • -------- Increase the indexes --------
      • Set MUI_1 = (MUI_1 + 1)
      • -------- End the indexing --------
      • -------- Start the dynamic indexing --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MUI_1 Greater than Max_Index
        • Then - Actions
          • -------- Indexing ~~ --------
          • Set MUI_2[MUI_1] = MUI_1
          • Set Max_Index = MUI_1
        • Else - Actions
      • -------- End the Dynamic Indexing --------
      • -------- Makes it easier to read and cleaner. --------
      • Set Temp = MUI_2[MUI_1]
      • -------- Storing the caster unit into a variable --------
      • Set Caster[Temp] = (Triggering unit)
      • -------- Storing the target unit into a variable --------
      • Set Target[Temp] = (Target unit of ability being cast)
      • -------- ** This is the damage that gets multiplied with the time. Change this if you want --------
      • Set Damage[Temp] = (50.00 + (25.00 x (Real((Level of Soul Grasp for (Triggering unit))))))
      • -------- ** This is how fast the soul gets sucked in. Shouln't be too low. --------
      • Set Speed[Temp] = -15.00
      • -------- ** If you want trees to be destroyed, set this to true, else set it to false. --------
      • Set Destroy_Trees[Temp] = True
      • -------- ** If you want the floaty text, this should be true --------
      • Set Float_Text[Temp] = True
      • -------- The Knockback used later on --------
      • Set Knockback[Temp] = 0.00
      • -------- This dictates if the lightning has been created yet. --------
      • Set Lightning_On[Temp] = False
      • -------- The total damage variable used to calculate damage. --------
      • Set Total_Damage[Temp] = 0.00
      • -------- The is gonna be used to display the damage in the text. --------
      • Set Display[Temp] = 0
      • -------- The Time variable used to count the time --------
      • Set Time[Temp] = 0.00
      • -------- This will be used to check if the soul has arrived. --------
      • Set Arrived[Temp] = False
      • -------- This will be used to make sure the "howl" effect is created only once. --------
      • Set Effect[Temp] = False
      • -------- Makes the target invulnerable --------
      • Unit - Make (Target unit of ability being cast) Invulnerable
      • -------- Turns his collision off so he can travel smoothly --------
      • Unit - Turn collision for (Target unit of ability being cast) Off
      • -------- Makes the target look faded" --------
      • Animation - Change Target[Temp]'s vertex coloring to (80.00%, 15.00%, 100.00%) with 45.00% transparency
  • Soul Grasp Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • -------- Start the indexing --------
      • For each (Integer MUI_3) from 1 to MUI_1, do (Actions)
        • Loop - Actions
          • -------- Makes the trigger look cleaner and easier to read. --------
          • Set Temp = MUI_2[MUI_3]
          • -------- Sets the current location of the caster. --------
          • Set Loc1 = (Position of Caster[Temp])
          • -------- Sets the current location of the target. --------
          • Set Loc2 = (Position of Target[Temp])
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Lightning_On[Temp] Equal to False
            • Then - Actions
              • -------- Confirms that the effect has been created --------
              • Set Lightning_On[Temp] = True
              • -------- Creates the lightning effect --------
              • Lightning - Create a Healing Wave - Primary lightning effect from source Loc1 to target Loc2
              • -------- Alters the colour of the effect --------
              • Lightning - Change color of (Last created lightning effect) to (0.75 0.15 1.00) with 1.00 alpha
              • -------- Saves lightning in a variable --------
              • Set Lightning[Temp] = (Last created lightning effect)
            • Else - Actions
              • -------- Moves the created lightning --------
              • Lightning - Move Lightning[Temp] to source Loc1 and target Loc2
          • -------- The angle which will be used for moving purposes. --------
          • Set Angle[Temp] = (Angle from Loc1 to Loc2)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Distance between Loc1 and Loc2) Greater than ((Abs(Speed[Temp])) + 10.00)
              • Arrived[Temp] Equal to False
            • Then - Actions
              • -------- If the soul hasn't arrived yet, we increase the time which will be multiplied with the damage. --------
              • Set Time[Temp] = (Time[Temp] + 0.03)
              • -------- Here we define the next moving location of the soul --------
              • Set Loc3 = (Loc2 offset by Speed[Temp] towards Angle[Temp] degrees)
              • -------- Here we move the soul to the defined location. --------
              • Unit - Move Target[Temp] instantly to Loc3
              • -------- Lets the target face the caster. --------
              • Unit - Make Target[Temp] face Loc1 over 0.00 seconds
              • -------- Creates some cool effects o.o --------
              • Special Effect - Create a special effect at Loc3 using Abilities\Spells\Undead\OrbOfDeath\AnnihilationMissile.mdl
              • Special Effect - Destroy (Last created special effect)
              • -------- Remove the location leak --------
              • Custom script: call RemoveLocation( udg_Loc3 )
            • Else - Actions
              • -------- If the soul has arrived, we set this value to true. --------
              • Set Arrived[Temp] = True
              • -------- Resets his "faded" animation --------
              • Animation - Change Target[Temp]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
              • -------- Here we turn his collision off, since we hid him it got turned back on. --------
              • Unit - Turn collision for Target[Temp] Off
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Effect[Temp] Equal to False
                • Then - Actions
                  • -------- If the effect hasn't occured yet, we let it happen. --------
                  • Special Effect - Create a special effect at Loc1 using Abilities\Spells\Other\HowlOfTerror\HowlCaster.mdl
                  • Special Effect - Destroy (Last created special effect)
                • Else - Actions
              • -------- Set the effect has occured to true. --------
              • Set Effect[Temp] = True
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Knockback[Temp] Less than or equal to 90.00
                • Then - Actions
                  • -------- Here we increase the knockback timer. --------
                  • Set Knockback[Temp] = (Knockback[Temp] + 3.00)
                  • -------- Defining the location which the target will be "knocked back" --------
                  • Set Loc3 = (Loc2 offset by ((Abs(Speed[Temp])) + 5.00) towards Angle[Temp] degrees)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Playable map area) contains Target[Temp]) Equal to True
                    • Then - Actions
                      • -------- Here we move the target, if he is still in the map that is. --------
                      • Unit - Move Target[Temp] instantly to Loc3
                    • Else - Actions
                  • -------- Some kewl effects o.o --------
                  • Special Effect - Create a special effect at Loc3 using Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Destroy_Trees[Temp] Equal to True
                    • Then - Actions
                      • -------- Defining the trees. --------
                      • Destructible - Pick every destructible within 125.00 of Loc3 and do (Actions)
                        • Loop - Actions
                          • -------- Destroying the trees! Smokey says no! =] --------
                          • Destructible - Kill (Picked destructible)
                    • Else - Actions
                  • -------- Removing the location leak. --------
                  • Custom script: call RemoveLocation( udg_Loc3 )
                • Else - Actions
                  • -------- Here we calculate the total damage which will be caused --------
                  • Set Total_Damage[Temp] = (Damage[Temp] x Time[Temp])
                  • Set Display[Temp] = (Integer(Total_Damage[Temp]))
                  • -------- A simple floating text so we can't get confused on how much damage was caused. --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Float_Text[Temp] Equal to True
                    • Then - Actions
                      • Floating Text - Create floating text that reads (|cffBA55D3 + ((String(Display[Temp])) + !|r)) at Loc2 with Z offset 0.00, using font size 13.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                      • Floating Text - Change (Last created floating text): Disable permanence
                      • Floating Text - Change the fading age of (Last created floating text) to 0.00 seconds
                      • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
                      • Floating Text - Set the velocity of (Last created floating text) to 80.00 towards 124.00 degrees
                    • Else - Actions
                  • -------- Makes the target vulnerable again. --------
                  • Unit - Make Target[Temp] Vulnerable
                  • -------- Dealing the damage to the target. --------
                  • Unit - Cause Caster[Temp] to damage Target[Temp], dealing Total_Damage[Temp] damage of attack type Spells and damage type Normal
                  • -------- Some kewl effects o.o --------
                  • Special Effect - Create a special effect at Loc2 using Objects\Spawnmodels\Undead\UndeadDissipate\UndeadDissipate.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • -------- Some kewl effects o.o --------
                  • Special Effect - Create a special effect at Loc2 using Abilities\Spells\Undead\DeathPact\DeathPactTarget.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • -------- Turning his collision back on, else he can walk thru stuffs. --------
                  • Unit - Turn collision for Target[Temp] On
                  • -------- Destroy the lightning effect --------
                  • Lightning - Destroy Lightning[Temp]
                  • -------- Recycling all the indexes --------
                  • Set MUI_2[MUI_3] = MUI_2[MUI_1]
                  • Set MUI_2[MUI_1] = Temp
                  • Set MUI_1 = (MUI_1 - 1)
                  • Set MUI_3 = (MUI_3 - 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • MUI_1 Equal to 0
                    • Then - Actions
                      • -------- Turning off this trigger, if no instances are running --------
                      • Trigger - Turn off (This trigger)
                    • Else - Actions
          • -------- Removing the location leaks. --------
          • Custom script: call RemoveLocation( udg_Loc1 )
          • Custom script: call RemoveLocation( udg_Loc2 )
Keywords:
Soul, grab, grasp, voodoo, shadow, dark, pull, fire, earth, element, light, warrior, purple, shaman, animate, f0rsak3n, legend, explode, air, wind.
Contents

Soul Grasp v1.6 (Map)

Reviews
15:57, 28th June 2011 Maker: Approved. Good effects, but too many of them. Limit the amount of effects when the unit is pulled. Add the hotkey to the tooltip. You could add an initialization trigger where you set all the constants. You could use...

Moderator

M

Moderator

15:57, 28th June 2011
Maker: Approved.
Good effects, but too many of them. Limit the amount of effects when the unit is pulled.
Add the hotkey to the tooltip.
You could add an initialization trigger where you set all the constants.
You could use AddLighningEx with custom scripts to add some height to the lightnings.
 
the indexing can be improved I think using dynamic recycling indexing rather than just recycling when the running instances become 0...

I suggest replacing the loc array with 4 different variables since you just use 4 indexes of the loc array

and I suggest controlling the destructable killing by a boolean...

not sure but I think the floating texts leak...
 
Level 14
Joined
Nov 2, 2008
Messages
579
the indexing can be improved I think using dynamic recycling indexing rather than just recycling when the running instances become 0...

I suggest replacing the loc array with 4 different variables since you just use 4 indexes of the loc array

and I suggest controlling the destructable killing by a boolean...

not sure but I think the floating texts leak...

Okay i fixed the locs and the boolean, but i don't get the dynamic recycling part. Can you elaborate on that please.

I've never really used floating texts before, so you may be right.
 
for the Floating texts, as far as I know, if you dont remove them manually they still remain on memory...

dynamic recycling is recycling the indexes once its not used anymore...

for example, on your trigger, you can totally remove MUI_1 then just do this on the part of the loop where you set MUI_1 = MUI_1 - 1

we will just use MUI_2 and MUI_3

  • Set MUI[MUI_3] = MUI[MUI_2]
  • Set MUI_2 = MUI_2 - 1
  • Set MUI_3 = MUI_3 - 1
1st line: it sets the data that is currently on the max instance into the current instance

2nd line: it reduces the max instance so that we have now 1 free instance again

3rd line: we reduce the loop variable by 1 and since the GUI function adds 1 to it at the end of the loop, MUI_3 will remain the same which is essential, since we replaced the data in the current index by the data on the max index, so that the new data will still be looped...
 
Level 14
Joined
Nov 2, 2008
Messages
579
Maker:
Instead of Loc4 variable, use Loc3 variable. You can delete Loc4.
I don't see how this is possible. EDIT: Nevermind. Fixed.
MUI_1 Equal to 0 should be checked only after you reduce the MUI_1, not during every loop.
Fixed This. Thanks, I'm new to DIR.
Make the floating text optional.
Fixed.
You could add a configuration trigger where you set all the constants.
I didnt see the point in this. I mean I already state neatly and with documentation everything that can be configured.
This is not a good check since if the speed is > 20 then the check can fail:
It works perfectly. I set the speed to 30 and tested 40, nothing happend. The target will never be moved through the caster, just until it reaches it, no matter the speed.
 
Last edited:
For the Loc4 thingy, since you don't need the Loc3 variable on the part where you use Loc4, you can just use Loc3 (the variable) instead of Loc4...

  • Set Loc4 = (Loc2 offset by ((Abs(Speed[Temp])) + 5.00) towards Angle[Temp] degrees)
change it to

  • Set Loc3 = (Loc2 offset by ((Abs(Speed[Temp])) + 5.00) towards Angle[Temp] degrees)
then use Loc3 for the actions that will use Loc4
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
It works perfectly. I set the speed to 30 and tested 40, nothing happend. The target will never be moved through the caster, just until it reaches it, no matter the speed.

I tested it and it can bug. It's a matter of the original distance and the moving speed. With the > 20 check, there is a chance the unit will hit the 20 range with high moving speeds, but there also a chance it will not hit that range. With a speed of 40 there's a very high chance (practically 100%) for the unit to hit the range, since the total distance range is 2*19.9999... = about 40. Test with higher speeds.

I won't approve it while that issue exists. Make the distance check speed dependent :)
 
Level 14
Joined
Nov 2, 2008
Messages
579
I tested it and it can bug. It's a matter of the original distance and the moving speed. With the > 20 check, there is a chance the unit will hit the 20 range with high moving speeds, but there also a chance it will not hit that range. With a speed of 40 there's a very high chance (practically 100%) for the unit to hit the range, since the total distance range is 2*19.9999... = about 40. Test with higher speeds.

I won't approve it while that issue exists. Make the distance check speed dependent :)

Oh i see haha, my bad :p

Okay i did
  • (Distance between Loc1 and Loc2) Greater than ((Abs(Speed[Temp])) + 10.00)
So no matter how much the user sets the speed, it won't bug. It also fixed the angle issue with when the target got blast out luul :>. Thanks/
 
Level 12
Joined
Aug 12, 2008
Messages
349
Isn't this trigger destroy the bridges too?
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • Destroy_Trees[Temp] Equal to True
    • Then - Actions
    • -------- Defining the trees. --------
    • Destructible - Pick every destructible within 125.00 of Loc3 and do (Actions)
    • Loop - Actions
    • -------- Destroying the trees! Smokey says no! =] --------
    • Destructible - Kill (Picked destructible)
 
Top