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

[GUI] Death Fall v1.02

Death Fall

by Amigurumi


Summons a big skull, which falls on the ground.
When touching the ground, the skull explodes, unleashing all of
it's dark energy, to damage all nearby (enemy) units. After that,
the area around the skull begins to decay, damaging all (enemy) units.


JASS:
------------------------------------------------
<-+''+->Death Fall<-+''+->
        by Amigurumi
             v1.02

------------------------------------------------

Content:

Step 1: Settings
Step 2: Imports
Step 3: Objects
Step 4: Triggers
Step 5: Edits

------------------------------------------------

Step 1: Settings
-------------------------

You don't have to copy all variables by yourself.
Just go to:
File -> Preferences -> General
and tick the: Automatically create unknown variables while pasting trigger data.
Now the World Editor automatically creates the variables, which the spell needs.

Step 2: Imports
-----------------------

You need a specific model, which can't be seen. Well, you think we could just
set the model path to .mdl, but then it wouldn't have any attachment points,
and special effects wouldn't scale.
So export the dummy.mdx file from this map, and import it into your map.

Step 3: Objects
------------------------

Go to the Object Editor under the 'Unit' category.
Copy the DeathFallDummy to your map.
Now go to the 'Ability' category.
Copy the ability Death Fall into your map.

Step 4: Triggers
-------------------------

Now go to the Trigger Editor.
Copy the whole folder into your map.
But be sure, that you did Step 1 before you copy the spell,
otherwise you have to copy all variables manually, and this might take some time.

Step 5: Edits
--------------------

After copying the triggers, you can edit the spell.
You can change everything on the dummy spell, aka the spell which you use.
Then you can edit all actions between the comments: THIS CAN BE EDITED.
I recommend you to NOT change the other things, if you're not sure what you're doing,
because it could destroy the spell.

Now have fun with it, and don't forget to give credits to Amigurumi.

  • Death Fall
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Death Fall
    • Actions
      • -------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
      • -------- DO NOT CHANGE ANYTHING IN THIS --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DF_index[1] Equal to 0
        • Then - Actions
          • Trigger - Turn on Death Fall loop <gen>
        • Else - Actions
      • Set DF_index[1] = (DF_index[1] + 1)
      • Set DF_index[2] = (DF_index[2] + 1)
      • Set DF_Caster[DF_index[2]] = (Casting unit)
      • Set DF_Target[DF_index[2]] = (Target point of ability being cast)
      • Set DF_Boolean[DF_index[2]] = False
      • Set DF_Boolean2[DF_index[2]] = False
      • Set DF_Real[DF_index[2]] = 0.00
      • Set DF_Real2[DF_index[2]] = 0.00
      • -------- DO NOT CHANGE ANYTHING IN THIS --------
      • -------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
      • -------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
      • -------- DO ONLY CHANGE SOMETHING IN HERE, IF YOU KNOW WHAT YOU ARE DOING --------
      • -------- How long it takes for the first phase (not in seconds!) --------
      • Set DF_Timer[DF_index[2]] = 30
      • -------- How long it takes for the second phase (not in seconds!) --------
      • Set DF_Timer2[DF_index[2]] = 8
      • -------- This is the speed, which shows how fast the skull is falling to the ground --------
      • Set DF_Fallspeed[DF_index[2]] = 10.00
      • -------- DO ONLY CHANGE SOMETHING IN HERE, IF YOU KNOW WHAT YOU ARE DOING --------
      • -------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
      • -------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
      • -------- THIS CAN BE EDITED --------
      • -------- This is the damage, which is dealt at first. --------
      • Set DF_Damage[DF_index[2]] = ((Real((Hero level of DF_Caster[DF_index[2]]))) x 35.00)
      • -------- This is the second damage, which is smaller than the first one. --------
      • Set DF_Damage2[DF_index[2]] = ((Real((Hero level of DF_Caster[DF_index[2]]))) x 5.00)
      • -------- This is the range of the spell. Should fit to the aoe circle of the ability. --------
      • Set DF_Range[DF_index[2]] = 550.00
      • -------- This activates/deactivates the friendly damage. --------
      • Set DF_FriendlyDamage[DF_index[2]] = False
      • -------- THIS CAN BE EDITED --------
      • -------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
      • -------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
      • -------- DO NOT CHANGE ANYTHING IN THIS --------
      • Unit - Create 1 DeathFallDummy for Neutral Passive at DF_Target[DF_index[2]] facing 270.00 degrees
      • Set DF_Dummy[DF_index[2]] = (Last created unit)
      • Animation - Change DF_Dummy[DF_index[2]] flying height to 800.00 at 999999.00
      • Special Effect - Create a special effect attached to the origin of DF_Dummy[DF_index[2]] using Abilities\Spells\Undead\DeathCoil\DeathCoilMissile.mdl
      • Set DF_SEffect1[DF_index[2]] = (Last created special effect)
      • Animation - Change DF_Dummy[DF_index[2]]'s size to (600.00%, 600.00%, 600.00%) of its original size
      • Unit - Create 1 DeathFallDummy for Neutral Passive at DF_Target[DF_index[2]] facing Default building facing (270.0) degrees
      • Unit - Add a 6.00 second Generic expiration timer to (Last created unit)
      • Animation - Change (Last created unit) flying height to 0.00 at 0.00
      • Animation - Change (Last created unit)'s size to (800.00%, 800.00%, 800.00%) of its original size
      • Special Effect - Create a special effect attached to the origin of (Last created unit) using Abilities\Spells\NightElf\TargetArtLumber\TargetArtLumber.mdl
      • Set DF_SEffect2[DF_index[2]] = (Last created special effect)
      • -------- DO NOT CHANGE ANYTHING IN THIS --------
      • -------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
  • Death Fall loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • -------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
      • -------- DO NOT CHANGE ANYTHING IN THIS --------
      • For each (Integer DF_index[3]) from 1 to DF_index[2], do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • DF_Boolean[DF_index[3]] Equal to False
            • Then - Actions
              • Set DF_Timer[DF_index[3]] = (DF_Timer[DF_index[3]] - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • DF_Timer[DF_index[3]] Not equal to 0
                • Then - Actions
                  • Set DF_Fallspeed[DF_index[3]] = (DF_Fallspeed[DF_index[3]] + 10.00)
                  • Animation - Change DF_Dummy[DF_index[3]] flying height to ((Current flying height of DF_Dummy[DF_index[3]]) - DF_Fallspeed[DF_index[3]]) at 600.00
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Current flying height of DF_Dummy[DF_index[3]]) Less than or equal to 1.00
                    • Then - Actions
                      • Set DF_Boolean[DF_index[3]] = True
                      • Special Effect - Create a special effect at DF_Target[DF_index[3]] using Objects\Spawnmodels\Undead\UCancelDeath\UCancelDeath.mdl
                      • Special Effect - Destroy (Last created special effect)
                      • Special Effect - Create a special effect at DF_Target[DF_index[3]] using Abilities\Spells\Human\FlameStrike\FlameStrikeTarget.mdl
                      • Special Effect - Destroy (Last created special effect)
                      • Special Effect - Create a special effect at DF_Target[DF_index[3]] using Abilities\Spells\Human\FlameStrike\FlameStrikeTarget.mdl
                      • Special Effect - Destroy (Last created special effect)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • DF_FriendlyDamage[DF_index[3]] Equal to True
                        • Then - Actions
                          • Set DF_Group[1] = (Units within DF_Range[DF_index[3]] of DF_Target[DF_index[3]])
                        • Else - Actions
                          • Set DF_Group[1] = (Units within DF_Range[DF_index[3]] of DF_Target[DF_index[3]] matching (((Owner of (Matching unit)) is an enemy of (Owner of DF_Caster[DF_index[3]])) Equal to True))
                      • Unit Group - Pick every unit in DF_Group[1] and do (Actions)
                        • Loop - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • ((Picked unit) is alive) Equal to True
                              • ((Picked unit) is Magic Immune) Equal to False
                              • ((Picked unit) is A flying unit) Equal to False
                            • Then - Actions
                              • Unit - Cause DF_Caster[DF_index[3]] to damage (Picked unit), dealing DF_Damage[DF_index[3]] damage of attack type Spells and damage type Death
                              • Set DF_point[1] = (Position of (Picked unit))
                              • Special Effect - Create a special effect at DF_point[1] using Objects\Spawnmodels\NightElf\EntBirthTarget\EntBirthTarget.mdl
                              • Special Effect - Destroy (Last created special effect)
                              • Custom script: call RemoveLocation(udg_DF_point[1])
                            • Else - Actions
                      • Custom script: call DestroyGroup(udg_DF_Group[1])
                      • Unit - Kill DF_Dummy[DF_index[3]]
                      • Special Effect - Destroy DF_SEffect1[DF_index[3]]
                      • Unit - Create 1 DeathFallDummy for Neutral Passive at DF_Target[DF_index[3]] facing Default building facing (270.0) degrees
                      • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
                      • Animation - Change (Last created unit) flying height to 0.00 at 0.00
                      • Animation - Change (Last created unit)'s size to (400.00%, 400.00%, 400.00%) of its original size
                      • Special Effect - Create a special effect attached to the chest of (Last created unit) using Objects\Spawnmodels\Undead\UCancelDeath\UCancelDeath.mdl
                      • Set DF_SEffect1[DF_index[3]] = (Last created special effect)
                      • Set DF_Timer[DF_index[3]] = 1
                    • Else - Actions
                      • Set DF_Timer[DF_index[3]] = (DF_Timer[DF_index[3]] + 2)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • DF_Boolean2[DF_index[3]] Equal to False
                • Then - Actions
                  • Set DF_Timer[DF_index[3]] = (DF_Timer[DF_index[3]] - 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • DF_Timer[DF_index[3]] Equal to 0
                    • Then - Actions
                      • Set DF_Timer[DF_index[3]] = 20
                      • Set DF_Timer2[DF_index[3]] = (DF_Timer2[DF_index[3]] - 1)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • DF_Timer2[DF_index[3]] Not equal to 0
                        • Then - Actions
                          • Set DF_Real2[DF_index[3]] = (DF_Real2[DF_index[3]] + 75.00)
                          • For each (Integer A) from 1 to 10, do (Actions)
                            • Loop - Actions
                              • Set DF_Real[DF_index[3]] = (DF_Real[DF_index[3]] + (360.00 / 10.00))
                              • Set DF_point[1] = (DF_Target[DF_index[3]] offset by DF_Real2[DF_index[3]] towards DF_Real[DF_index[3]] degrees)
                              • Special Effect - Create a special effect at DF_point[1] using Objects\Spawnmodels\Undead\UndeadDissipate\UndeadDissipate.mdl
                              • Special Effect - Destroy (Last created special effect)
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • DF_FriendlyDamage[DF_index[3]] Equal to True
                                • Then - Actions
                                  • Set DF_Group[1] = (Units within 100.00 of DF_point[1])
                                • Else - Actions
                                  • Set DF_Group[1] = (Units within 100.00 of DF_point[1] matching (((Owner of (Matching unit)) is an enemy of (Owner of DF_Caster[DF_index[3]])) Equal to True))
                              • Unit Group - Pick every unit in DF_Group[1] and do (Actions)
                                • Loop - Actions
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • ((Picked unit) is alive) Equal to True
                                      • ((Picked unit) is Magic Immune) Equal to False
                                      • ((Picked unit) is A flying unit) Equal to False
                                    • Then - Actions
                                      • Unit - Cause DF_Caster[DF_index[3]] to damage (Picked unit), dealing DF_Damage2[DF_index[3]] damage of attack type Spells and damage type Death
                                      • Set DF_point[2] = (Position of (Picked unit))
                                      • Special Effect - Create a special effect at DF_point[2] using Abilities\Spells\Items\AIil\AIilTarget.mdl
                                      • Special Effect - Destroy (Last created special effect)
                                      • Custom script: call RemoveLocation(udg_DF_point[2])
                                    • Else - Actions
                              • Special Effect - Destroy DF_SEffect1[DF_index[3]]
                              • Custom script: call DestroyGroup(udg_DF_Group[1])
                              • Custom script: call RemoveLocation(udg_DF_point[1])
                        • Else - Actions
                          • Special Effect - Destroy DF_SEffect2[DF_index[3]]
                          • Set DF_Boolean2[DF_index[3]] = True
                          • Set DF_index[1] = (DF_index[1] - 1)
                          • Custom script: call RemoveLocation(udg_DF_Target[udg_DF_index[3]])
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • DF_index[1] Equal to 0
                            • Then - Actions
                              • Set DF_index[2] = 0
                              • Trigger - Turn off (This trigger)
                            • Else - Actions
                    • Else - Actions
                • Else - Actions
      • -------- DO NOT CHANGE ANYTHING IN THIS --------
      • -------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
JASS:
v1.01
• fixed the leaking special effects
• removed the unneeded trigger
• changed damage to level based
JASS:
v1.02
• fixed the special effect bug
• added some unit conditions

If you find any bugs, comment/criticise please!
Have fun, and give credits if you use this!

Keywords:
amigurumi, gui, death, undead, fall, fly, ing, dead, skull, explosion, ultimate, awesome, boom, documentation, trigger, spell
Contents

Death Fall by Amigurumi (Map)

Reviews
15:32, 6th Feb 2010 The_Reborn_Devil: The triggering look good and there are no leaks. Status: Approved Rating: Useful

Moderator

M

Moderator

15:32, 6th Feb 2010
The_Reborn_Devil:
The triggering look good and there are no leaks.

Status: Approved
Rating: Useful
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
I think you've subscribed to this thread by creating it, so no need to post a "subscribing" post :)

Looking at the triggers, I only noticed this:
  • f (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
    • DF_index[1] Equal to 0
  • Then - Actions
    • Set DF_index[2] = 0
    • Trigger - Turn off (This trigger)
  • Else - Actions
Move this block after the line that subtracts 1 from DF_index[1], because it can be zero only then.

You could edit the equations to support more levels of the spell.
 

Rmx

Rmx

Level 19
Joined
Aug 27, 2007
Messages
1,164
aren't they cleaned, when the unit, which has the special effects, get removed?

No they aren't, also removing the unit for the game is not acutally removing it.
It will just move the unit instantly out of map bounds and will still be part of the game.
So you should Add an expiration timer of 0.01 sec and remove the special effects.
Have a nice day :)
 
No they aren't, also removing the unit for the game is not acutally removing it.
It will just move the unit instantly out of map bounds and will still be part of the game.
So you should Add an expiration timer of 0.01 sec and remove the special effects.
Have a nice day :)

wut? that's new to me. But if I remove a unit from game, I can't do anything
with the unit.
But well, kay I try to fix all these things you mentioned. thanks. +rep

//updated
 
Last edited:
Top