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

Lightfall v0.03

  • Like
Reactions: Faith
The Lightfall Spell.
I simply was caught by inspiration after doing Double Fistin trick over and over again in THUG2.
Perfect for making falling things and such.
I can already tell, that the screenie I provided you with is a piece o' crap and I reccomand you to try the spell yourself.

Give me credits if you use it.

Calls down a ball of light, to deal damage to enemies in area it lands.


  • Lightfall Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Lightfall
    • Actions
      • -------- Stores Caster into variable --------
      • Set Caster = (Triggering unit)
      • -------- Finds Target point, the point on which the Lightfall will-- fall --------
      • Set Point1 = (Target point of ability being cast)
      • -------- Sets starting flying height of the dummy units, allowing you to control the time, at which the Lightfall strikes the earth --------
      • -------- NOTE 1: Change your flying height here --------
      • Set FlyingHeight = 4000.00
      • -------- Clears variable for the marking the targeted AoE --------
      • Set Angle = 0.00
      • -------- Sets number of effects for marking the AoE of spell --------
      • -------- NOTE 2: Change your marking SFXes number here --------
      • Set SfxNumber = 10
      • -------- Creates a circle of SFXes, marking the AoE --------
      • -------- NOTE 3: This Loop along with the integer are purely estetics. You can delete it to make it harder to predict, where shall Lightfall-- fall --------
      • For each (Integer LoopInteger) from 1 to SfxNumber, do (Actions)
        • Loop - Actions
          • Set Angle = (Angle + (360.00 / (Real(SfxNumber))))
          • Set Point2 = (Point1 offset by 300.00 towards Angle degrees)
          • -------- NOTE 4: Change your marking SFX here --------
          • Special Effect - Create a special effect at Point2 using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation(udg_Point2)
      • -------- Creates the Dummy Lightfall ball of light --------
      • -------- NOTE 5: Change your Ball's model in Object editor, Lightfall Unit --------
      • Unit - Create 1 Lightfall for (Owner of Caster) at Point1 facing Default building facing degrees
      • -------- Adds and removes Storm Crow Form spell from The dummy units, allowing us to manipulate its flying height --------
      • Unit - Add Storm Crow Form to (Last created unit)
      • Unit - Remove Storm Crow Form from (Last created unit)
      • -------- Changes the Flying Height of Dummy unit --------
      • Animation - Change (Last created unit) flying height to FlyingHeight at 0.00
      • -------- Stores the Dummy Unit into variable, making it the main dummy unit for falling art --------
      • -------- NOTE 6: From here on, I'll call this main dummy unit The Ball --------
      • Set DummyUnits[0] = (Last created unit)
      • -------- Stores Handle ID of the Ball into variable --------
      • Set HandleID = (Key (Last created unit))
      • -------- Sets number of Extra SFXes flying around the Ball --------
      • -------- NOTE 7: Change your number of extra SFXes flying around the Ball here --------
      • Set SfxNumber = 3
      • -------- Creates the Adds for the Ball --------
      • -------- NOTE 8: Change your Add's model at Object Editor, unit Lightfall Add --------
      • Set Angle = 0.00
      • For each (Integer LoopInteger) from 1 to SfxNumber, do (Actions)
        • Loop - Actions
          • Set Point2 = (Point1 offset by 125.00 towards Angle degrees)
          • Unit - Create 1 Lightfall add for (Owner of Caster) at Point2 facing Default building facing degrees
          • Unit - Add Storm Crow Form to (Last created unit)
          • Unit - Remove Storm Crow Form from (Last created unit)
          • Animation - Change (Last created unit) flying height to FlyingHeight at 0.00
          • Set DummyUnits[LoopInteger] = (Last created unit)
          • Custom script: call RemoveLocation(udg_Point2)
          • Set Angle = (Angle + (360.00 / (Real(SfxNumber))))
      • -------- Stores all information needed into hashtable --------
      • -------- NOTE 9: All information is attached to the Ball --------
      • Hashtable - Save Handle OfCaster as 0 of HandleID in Hashtable
      • Hashtable - Save FlyingHeight as 1 of HandleID in Hashtable
      • Hashtable - Save 0.00 as 2 of HandleID in Hashtable
      • Hashtable - Save SfxNumber as 3 of HandleID in Hashtable
      • For each (Integer LoopInteger) from 1 to SfxNumber, do (Actions)
        • Loop - Actions
          • Hashtable - Save Handle OfDummyUnits[LoopInteger] as (LoopInteger + 3) of HandleID in Hashtable
      • -------- Checks if there is any ball falling already --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Rays is empty) Equal to True
        • Then - Actions
          • Trigger - Turn on Lightfall Fall <gen>
        • Else - Actions
      • -------- Adds the Ball into Balls' group --------
      • Unit Group - Add DummyUnits[0] to Rays
      • -------- Clears the leak --------
      • Custom script: call RemoveLocation(udg_Point1)
  • Lightfall Fall
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Rays and do (Actions)
        • Loop - Actions
          • Set HandleID = (Key (Picked unit))
          • -------- Loads the Caster --------
          • Set Caster = (Load 0 of HandleID in Hashtable)
          • -------- Loads the Current Location of the Ball --------
          • Set Point1 = (Position of (Picked unit))
          • -------- Loads the Number of Adds --------
          • Set SfxNumber = (Load 3 of HandleID from Hashtable)
          • -------- Loads the Adds --------
          • For each (Integer LoopInteger) from 1 to SfxNumber, do (Actions)
            • Loop - Actions
              • Set DummyUnits[LoopInteger] = (Load (LoopInteger + 3) of HandleID in Hashtable)
          • -------- Loads and Reduces the range to the ground for impact --------
          • Set FlyingHeight = (Load 1 of HandleID from Hashtable)
          • -------- NOTE 1: The falling speed is determined by the substracted number. --------
          • -------- NOTE 1: To increase/decrease the speed, adjust the substracted number --------
          • Set FlyingHeight = (FlyingHeight - 100.00)
          • -------- Checks if it is time to impact the ground --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • FlyingHeight Less than or equal to 10.00
            • Then - Actions
              • -------- If it is, then... --------
              • -------- Creates a dummy unit --------
              • Unit - Create 1 Dummy Caster for (Owner of Caster) at Point1 facing Default building facing degrees
              • -------- Adds the Impact Emitter (The Ripple of Impact) ability to the Dummy Caster --------
              • -------- NOTE 2: Change the Damage and Impact animation of the ability in Object Editor, ability Impact Emitter --------
              • -------- NOTE 2: Change the Damage SFX of ability in Object Editor, Buff Lightfall --------
              • Unit - Add Impact Emitter to (Last created unit)
              • Unit - Set level of Impact Emitter for (Last created unit) to (Level of Lightfall for Caster)
              • -------- Issues the Dummy Caster to cast the Impact Emitter, causing damage and creating the Ripple of Impct --------
              • Unit - Order (Last created unit) to Neutral - Slam
              • -------- Removes the Dummy Caster --------
              • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
              • -------- Clears the Hashtable for the Ball --------
              • Hashtable - Clear all child hashtables of child HandleID in Hashtable
              • -------- Removes Ball from Balls' group --------
              • Unit Group - Remove (Picked unit) from Rays
              • -------- Checks if there is any Ball still falling after this loop. If not, turns this trigger off --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Rays is empty) Equal to True
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
              • -------- Kills the Ball and all Adds --------
              • Unit - Kill (Picked unit)
              • For each (Integer LoopInteger) from 1 to SfxNumber, do (Actions)
                • Loop - Actions
                  • Unit - Kill DummyUnits[LoopInteger]
            • Else - Actions
              • -------- If it isn't, then... --------
              • -------- Loads angle of the First Extra SFX, and increases it by small angle --------
              • -------- NOTE 3: The added amount of angle determines the speed of Extra SFXes' spinning. Change it to Adjust the Speed of SFX spinning --------
              • -------- NOTE 4: I only use the First Add's angle, allowing me to spin infinite amount of Adds, given you have powerful enoug system --------
              • Set Angle = (Load 2 of HandleID from Hashtable)
              • Set Angle = (Angle + 15.00)
              • -------- Changes and Updates the Flying height of the Ball and all adds --------
              • Animation - Change (Picked unit) flying height to FlyingHeight at 0.00
              • Unit - Move (Picked unit) instantly to Point1
              • For each (Integer LoopInteger) from 1 to SfxNumber, do (Actions)
                • Loop - Actions
                  • Set Point2 = (Point1 offset by 100.00 towards Angle degrees)
                  • Animation - Change DummyUnits[LoopInteger] flying height to FlyingHeight at 0.00
                  • Unit - Move DummyUnits[LoopInteger] instantly to Point2, facing Angle degrees
                  • Custom script: call RemoveLocation(udg_Point2)
                  • Set Angle = (Angle + (360.00 / (Real(SfxNumber))))
              • -------- Updates current height to ground and angle of first add --------
              • Hashtable - Save FlyingHeight as 1 of HandleID in Hashtable
              • Hashtable - Save Angle as 2 of HandleID in Hashtable
          • -------- Clears the Leak --------
          • Custom script: call RemoveLocation(udg_Point1)


v0.01 - First Upload
v0.03 - Improved performance, made ball alot faster for better effect.


Keywords:
light, fall, Blast, trail, add, Thug, thug2, double, fistin,
Contents

Lightfall v0.03 (Map)

Reviews
Bribe: You use a lot of arrays which impair readability and in-game performance. More specific names would be beneficial here, to make it easier to follow what's happening with the code. Set Real[1], for example, could be "FlyingHeight" Same...

Moderator

M

Moderator

Bribe:

You use a lot of arrays which impair readability and in-game performance. More specific names would be beneficial here, to make it easier to follow what's happening with the code.

Set Real[1], for example, could be "FlyingHeight"

Same with Integer[1] = 10, could be "FX_Count"

While arrays may remove bloat from the variable editor, they add bloat to everything else.

I also recommend hashing function call results before repeat-referencing them. For example, using integer variable loops instead of integer A loops, and you use (Key (Picked unit)) a lot which could instead be set to a variable. Variables execute much faster in-game than function calls.

Overall could use some under-the-hood work, but the result is nice.

Maker, v0.01, 14.07.2011
Approved. But you should do as Bribe said to improve performance a bit. The spell is also a bit heavy with effects, but they look good.
GetForLoopIndexA() -> bj_forLoopAIndex
Do the Ray is empty check only after you remove a unit from the group.
 
no actually you dont have to array the integer variable integer. Just create a variable like "Light_Fall_int"

One more thing i just realized: It would be much better if you give better names for your variables cuz they have really common names and might overwrite other variables. You should give them names like LF_Points, LF_Caster,.... To be on the safe side, give them names like Light_Fall_Points, Light_Fall_Caster....

Other than that, this spell is great :D

EDIT:
I felt i was a bit unclear. You should use Integer "variable", then every place that you used (integer A) in should be replaced with that variable you used in the integer "variable".
 
Level 9
Joined
Oct 31, 2009
Messages
121
Like I said in my Spellpack, it can look that imma insolent or ignorant, but I think that users should rename variables whatever they like before copy->Pasting the spell.

Just my 2 cents ;)

Oh, and thank you. I thought over and over again how to make this spell really cool. I like when the falling speed is like 50/loop and there is no AoE marking part in cast trigger. It just looks nice, modeled starfall star :D
 
Level 10
Joined
Jul 12, 2009
Messages
318
The spell's basic operation is a simple delayed AOE, similar to the default spell Inferno and not especially unique, to be brutally honest.

Mostly, it's a bunch of custom visuals to go along with it. That said, it is quite pretty, and easy to reconfigure for inexperienced mappers. :csmile:
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
I saw no leaks, it is MUI, the tooltip is ok and so are things object editor. Good job there.

The effects look good, but are a bit over the top. And like Weep said it is not very original.

Trigger-wise, you could add an initialization trigger where you set the constants and init hashtable.

You could store the Key(Picked unit) into a variable and use the variable.

GetForLoopIndexA() -> bj_forLoopAIndex

This
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Rays is empty) Equal to True
    • Then - Actions
      • Trigger - Turn off (This trigger)
    • Else - Actions
should be after this
  • Unit Group - Remove (Picked unit) from Rays
And remember to put two units in ability maps so one can test whether the ability is MUI or not :)
 
Level 9
Joined
Oct 31, 2009
Messages
121
The spell's basic operation is a simple delayed AOE, similar to the default spell Inferno and not especially unique, to be brutally honest.

Mostly, it's a bunch of custom visuals to go along with it. That said, it is quite pretty, and easy to reconfigure for inexperienced mappers. :csmile:

Exactly, I hadn't idea to make smt very hugely unique, just wanted to make my own model w/e moddeling :D

EDIT:
I saw no leaks, it is MUI, the tooltip is ok and so are things object editor. Good job there.

Ty ;)

The effects look good, but are a bit over the top. And like Weep said it is not very original.

As I said, I didn't intend doing smt very original


You could store the Key(Picked unit) into a variable and use the variable.

Dunno, for me I already am used to pressing several 'hotkeys' for Key(Picked Unit) :D

This
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Rays is empty) Equal to True
    • Then - Actions
      • Trigger - Turn off (This trigger)
    • Else - Actions
should be after this
  • Unit Group - Remove (Picked unit) from Rays

Should I check it once or 20 times per 0.03 seconds? I don't know, I put it there, every1 says put it at loop and, put it at the end of loop, and you say put it after removing the unit from group -_-. I'll stick to checking once.

And remember to put two units in ability maps so one can test whether the ability is MUI or not :)

OOORr. you could simply cast it several times quickly, there is no CD/Mana cost in test map :D


_____________________________________________________________________________

Off Topic: Who is Spell Section Moderator? I'd like to have a pair of words w/ him :D
 
Last edited:
When i saw this spell in the Queque, i thought it was just another one of those noob spells that use waits.

Anyways, you shouldn't use Integer A loops cuz they can cause some really wierd bugs.
Try using integer variable loops.

I forgot to mention this:

Good job! :D
5/5

Did I actually sound like that? o_O
WOW I was nooby xD

-----------
New comments:

Looks pretty good.
You could get rid of those arrays though.
Arrays are much slower than normal variables :)
 
Top