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

Napalm Missile v0.02

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
Launches a napalm missile that will circle around you before hurling towards the target.
The napalm missile leaves a trail of flaming napalm that will burn and damage enemies that it lands on.
The missile explodes and deals AOE damage to enemies nearby
MUI

The Triggers:

  • MissileInit
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) Napalm Missile
    • Actions
      • -------- Set Spell Index --------
      • Set Index = (Index + 1)
      • -------- << --------
      • -------- Set AOE and AOE Increment --------
      • Set BaseAOE[Index] = 250.00
      • Set AOEIncrement[Index] = 75.00
      • Set TrailAOE[Index] = 75.00
      • Set TrailAOEIncrement[Index] = 5.00
      • -------- << --------
      • -------- Set Damage and Damage Increment --------
      • Set BaseDmg[Index] = 100.00
      • Set DmgIncrement[Index] = 125.00
      • Set BaseTrailDmg[Index] = 6.00
      • Set TrailDmgIncrement[Index] = 3.00
      • -------- << --------
      • -------- Reset Variables --------
      • Set Time[Index] = 0.00
      • Set TurnBool[Index] = True
      • Set AngleCount[Index] = 0.00
      • Set IndexBoolMissile[Index] = True
      • -------- << --------
      • -------- Set Variables --------
      • Set TempLoc1 = (Position of (Triggering unit))
      • Set TempLoc2 = (Target point of ability being cast)
      • Set FacingAngle[Index] = (Angle from TempLoc1 to TempLoc2)
      • Set CenterPoint[Index] = (TempLoc1 offset by 128.00 towards (FacingAngle[Index] + 90.00) degrees)
      • Set Angle[Index] = (Angle from CenterPoint[Index] to TempLoc1)
      • Set Distance[Index] = (Distance between TempLoc1 and TempLoc2)
      • Set Caster[Index] = (Triggering unit)
      • Set IndexAMax = Index
      • -------- << --------
      • -------- Create Projectile --------
      • Unit - Create 1 fire missile for Neutral Passive at TempLoc1 facing FacingAngle[Index] degrees
      • Set Fire[Index] = (Last created unit)
      • -------- << --------
      • -------- Clear Leaks --------
      • Custom script: call RemoveLocation(udg_TempLoc1)
      • Custom script: call RemoveLocation(udg_TempLoc2)
      • -------- << --------
  • MissileMove
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Do Multiple ActionsFor each (Integer A) from IndexAMin to IndexAMax, do (Actions)
        • Loop - Actions
          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • IndexBoolMissile[A] Equal to (==) True
            • Then - Actions
              • -------- Set Missile Height --------
              • Unit - Add Storm Crow Form to Fire[A]
              • Unit - Remove Storm Crow Form from Fire[A]
              • Animation - Change Fire[A] flying height to (((Sin(((Time[A] x 308.00) + 0.00))) x 150.00) + 200.00) at 0.00
              • -------- << --------
              • Set Time[A] = (Time[A] + 0.03)
              • -------- Create Circle Path --------
                • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • TurnBool[A] Equal to (==) True
                  • Then - Actions
                    • -------- Set Variables --------
                    • Set Angle[A] = (Angle[A] + 7.00)
                    • Set AngleCount[A] = (AngleCount[A] + 7.00)
                    • Custom script: set udg_X = GetLocationX(udg_CenterPoint[udg_A]) + 128 * Cos(udg_Angle[udg_A] * bj_DEGTORAD)
                    • Custom script: set udg_Y = GetLocationY(udg_CenterPoint[udg_A]) + 128 * Sin(udg_Angle[udg_A] * bj_DEGTORAD)
                    • Custom script: set udg_X2 = GetLocationX(udg_CenterPoint[udg_A]) + 128 * Cos((udg_Angle[udg_A] + 7) * bj_DEGTORAD)
                    • Custom script: set udg_Y2 = GetLocationY(udg_CenterPoint[udg_A]) + 128 * Sin((udg_Angle[udg_A] + 7) * bj_DEGTORAD)
                    • -------- << --------
                    • -------- Move Missile and create trail --------
                    • Custom script: call SetUnitX(udg_Fire[udg_A], udg_X)
                    • Custom script: call SetUnitY(udg_Fire[udg_A], udg_Y)
                    • Custom script: call SetUnitFacing(udg_Fire[udg_A], bj_RADTODEG * Atan2(udg_Y2 - udg_Y, udg_X2 - udg_X))
                    • Custom script: set udg_U = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE), 'h001', udg_X, udg_Y, GetRandomReal(0,360))
                    • Unit - Add Storm Crow Form to U
                    • Unit - Remove Storm Crow Form from U
                    • Animation - Change U flying height to (((Sin(((Time[A] x 308.00) + 0.00))) x 150.00) + 200.00) at 0.00
                    • Animation - Change U flying height to 0.00 at ((Current flying height of U) x 1.00)
                    • Unit - Add a 1.00 second Generic expiration timer to U
                    • Unit Group - Add U to TrailGroup[A]
                    • -------- << --------
                  • Else - Actions
              • -------- << --------
              • -------- Forward Path (to target) --------
                • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • AngleCount[A] Greater than or equal to (>=) 360.00
                  • Then - Actions
                    • Custom script: set udg_X = GetUnitX(udg_Fire[udg_A])
                    • Custom script: set udg_Y = GetUnitY(udg_Fire[udg_A])
                    • Custom script: set udg_X2 = udg_X + udg_Distance[udg_A] * 0.06 * Cos((udg_FacingAngle[udg_A]) * bj_DEGTORAD)
                    • Custom script: set udg_Y2 = udg_Y + udg_Distance[udg_A] * 0.06 * Sin((udg_FacingAngle[udg_A]) * bj_DEGTORAD)
                    • -------- Create Trail --------
                    • Custom script: set udg_U = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE), 'h001', udg_X2, udg_Y2, GetRandomReal(0,360))
                    • Unit - Add Storm Crow Form to U
                    • Unit - Remove Storm Crow Form from U
                    • Animation - Change U flying height to (((Sin(((Time[A] x 308.00) + 0.00))) x 150.00) + 200.00) at 0.00
                    • Animation - Change U flying height to 0.00 at ((Current flying height of U) x 1.00)
                    • Unit - Add a 1.00 second Generic expiration timer to U
                    • Unit Group - Add U to TrailGroup[A]
                    • -------- << --------
                    • -------- Move Missile --------
                    • Custom script: call SetUnitX(udg_Fire[udg_A], udg_X2)
                    • Custom script: call SetUnitY(udg_Fire[udg_A], udg_Y2)
                    • -------- << --------
                    • -------- Stop the turning path --------
                    • Set TurnBool[A] = False
                    • -------- << --------
                    • -------- Kill Missile when it reaches target --------
                      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Current flying height of Fire[A]) Less than or equal to (<=) 55.00
                        • Then - Actions
                          • Unit - Kill Fire[A]
                          • Custom script: call RemoveLocation(udg_CenterPoint[udg_A])
                        • Else - Actions
                    • -------- << --------
                  • Else - Actions
              • -------- << --------
            • Else - Actions
  • MissileDamageAndRemove
    • Events
      • Unit - A unit Dies
    • Conditions
      • Multiple ConditionsOr - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to (==) fire missile
          • (Unit-type of (Triggering unit)) Equal to (==) fire trail
    • Actions
      • -------- Point to be damaged --------
      • Set TempLoc1 = (Position of (Triggering unit))
      • -------- << --------
      • -------- Main Missile Damage --------
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Unit-type of (Triggering unit)) Equal to (==) fire missile
          • Then - Actions
            • Do Multiple ActionsFor each (Integer A) from IndexAMin to IndexAMax, do (Actions)
              • Loop - Actions
                • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • IndexBoolMissile[A] Equal to (==) True
                    • (Fire[A] is dead) Equal to (==) True
                  • Then - Actions
                    • -------- Sets units to be damaged and damages them --------
                    • Set TempGroup = (Units within ((((Real((Level of Napalm Missile for Caster[A]))) - 1.00) x AOEIncrement[A]) + BaseAOE[A]) of TempLoc1 matching (((Matching unit) belongs to an enemy of (Owner of Caster[A])) Equal to (==) True))
                    • Unit Group - Pick every unit in TempGroup and do (Unit - Cause Caster[A] to damage (Picked unit), dealing ((((Real((Level of Napalm Missile for Caster[A]))) - 1.00) x DmgIncrement[A]) + BaseDmg[A]) damage of attack type Spells and damage type Normal)
                    • -------- << --------
                    • -------- Clear Leak --------
                    • Custom script: call DestroyGroup(udg_TempGroup)
                    • -------- << --------
                    • Set IndexBoolMissile[A] = False
                  • Else - Actions
          • Else - Actions
      • -------- << --------
      • -------- Missile Trail Damage --------
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Unit-type of (Triggering unit)) Equal to (==) fire trail
          • Then - Actions
            • Do Multiple ActionsFor each (Integer A) from IndexAMin to IndexAMax, do (Actions)
              • Loop - Actions
                • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • ((Triggering unit) is in TrailGroup[A]) Equal to (==) True
                  • Then - Actions
                    • -------- Sets units to be damaged and damages them --------
                    • Set TempGroup = (Units within ((((Real((Level of Napalm Missile for Caster[A]))) - 1.00) x TrailAOEIncrement[A]) + TrailAOE[A]) of TempLoc1 matching (((Matching unit) belongs to an enemy of (Owner of Caster[A])) Equal to (==) True))
                    • Unit Group - Pick every unit in TempGroup and do (Unit - Cause Caster[A] to damage (Picked unit), dealing ((((Real((Level of Napalm Missile for Caster[A]))) - 1.00) x TrailDmgIncrement[A]) + BaseTrailDmg[A]) damage of attack type Spells and damage type Normal)
                    • -------- << --------
                    • -------- Clear Leak --------
                    • Custom script: call DestroyGroup(udg_TempGroup)
                    • -------- << --------
                    • Unit Group - Remove (Triggering unit) from TrailGroup[A]
                      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Number of units in TrailGroup[A]) Less than or equal to (<=) 0
                          • (Fire[(A - 1)] is alive) Equal to (==) False
                        • Then - Actions
                          • Set IndexAMin = A
                        • Else - Actions
                  • Else - Actions
          • Else - Actions
      • -------- << --------
      • -------- Clear Leak --------
      • Custom script: call RemoveLocation(udg_TempLoc1)
      • -------- << --------
      • Wait 2.00 seconds
      • -------- Remove Projectile --------
      • Unit - Remove (Triggering unit) from the game
      • -------- << --------

v0.00 - submission
v0.01 - changed/removed a few variables
v0.02 - Improved indexing system, used some custom script to make the movement more efficient


Keywords:
napalm, fire, spiral, bomb, wolfman, missile
Contents

Just another Warcraft III map (Map)

Reviews
12th Dec 2015 IcemanBo: Too long time as NeedsFix. Rejected. 10:48, 31st May 2011 Maker: The looping trigger should be initially off and turned off when there's no active instance of the spell running. The Unit Dies trigger should be turned...

Moderator

M

Moderator

12th Dec 2015
IcemanBo: Too long time as NeedsFix. Rejected.

10:48, 31st May 2011
Maker: The looping trigger should be initially off and turned off when there's no active instance of the spell running. The Unit Dies trigger should be turned on/off also.
You could improve the tooltips, look at standard WC3 abilities for comaparison.
You're adding/removing Storm Crow form in the looping trigger which is bad, only add it once or add it in the object editor.
Remove the + 0.00:
  • Animation - Change Fire[A] flying height to (((Sin(((Time[A] x 308.00) + 0.00))) x 150.00) + 200.00) at 0.00
Remove the x 1:
  • Animation - Change U flying height to 0.00 at ((Current flying height of U) x 1.00)
Set the dummies to can't raise, does not decay. Then you can remove the 2 second wait and Remove unit from game.
The spell creates about 70 dummies, maybe you could use less.
You should recycle the indexes.
 
I suggest you learn recycling indexing coz right now, this could cause bug if a user makes this run 201 times before the first spell finishes since you reset the index when it reaches 200... and its also a bad idea to just recycle after it reaches a set amount...

also its better to save the max index currently used into a variable and use that as the higher bound of the integer loop so that you would only loop thru the indexes in use instead of the current one which loops all indexes...
 
Level 11
Joined
May 31, 2008
Messages
698
ohh okay i will change that.
I was trying to figure out how to make the loops less lol. thanks

Edit:
So if i just keep on increasing the index and never reset it, and make all the loops from IndexMin to IndexMax, that would be okay?
Would it be a problem if the index gets really high? like over 1000
 
Level 16
Joined
Jun 24, 2009
Messages
1,409
Not the best but looks cool. Here you are a good indexing example.
first set the maximum array value, try to set it to a proper value around 4-5.
  • Init
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Ability
    • Actions
      • Set Get = False
      • For each (Integer A) from 1 to Max, do (Actions) [loop till the maximum size given in an init trigger]
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Get Equal to False
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Recycle[(Integer A)] Equal to True [checks if the integer A slot is free]
                • Then - Actions
                  • Set Index = (Integer A)
                  • Set Get= True [with this the trigger only choose the first free slot]
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Integer A) Equal to Max
                    • Then - Actions
                      • Set Max = (Max + 1) [if the current size is not enought it increases it]
                      • Set Recycle[Max] = True
                    • Else - Actions
            • Else - Actions
      • Set Caster[Index] = (Triggering unit)
      • Set Timer[Index] = (2.00 + (Real((Level of Ability for Caster[Index]))))
      • Set Etc.... [other things you want to store example locations or damage]
      • Set Has[Index] = True [this will check if the trigger still have to run for that unit]
      • Set Count = (Count + 1) [counts the number of units casted the spell]
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Loop <gen> is on) Equal to False
        • Then - Actions
          • Trigger - Turn on Loop <gen>
        • Else - Actions
  • Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer Integer) from 1 to Max, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Has[Integer] Equal to True
            • Then - Actions
              • [Things you want to do]
              • Set Has[Index] = False
              • Set Count = (Count - 1)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Count Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
Also the wait.... you should just add a 2 second expiration timer to that unit and a trigger that removes the unit when it dies.
 
its already dead before the wait, there's no reason to add expiration timer... that wait wont cause bugs but its better to get rid of it...

also rather than running it four times per loop, you might want to make the Angle*bj_DEGTORAD done at the top (replacing the current Set Angle[A] = blahblah with something like maybe Custom script: set udg_Angle[A] = udg_Angle[A] + 7*bj_DEGTORAD), of course the initial angle should also be multiplied by bj_DEGTORAD right at the start...
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Improve the tooltip. Add level data for example. Remove the last "s" in "increases".
Set the ability icon position to 0,2 for example.
Missile move trigger should be initially off and turned on/off when needed.
Remove the +0.00
  • Animation - Change Fire[A] flying height to (((Sin(((Time[A] x 308.00) + 0.00))) x 150.00) + 200.00) at 0.00
Remove the x1
  • Animation - Change U flying height to 0.00 at ((Current flying height of U) x 1.00)
In the dying trigger, instead of using unit group variables you could use
  • Custom script: set bj_wantDestroyGroup = true
and you could calculate the damage before the loop.


The effect looks good and so does the movement. Could you make it randomize the side?
 
Level 6
Joined
Aug 20, 2009
Messages
95
Improve the tooltip. Add level data for example. Remove the last "s" in "increases".
Set the ability icon position to 0,2 for example.
Missile move trigger should be initially off and turned on/off when needed.
Remove the +0.00
  • Animation - Change Fire[A] flying height to (((Sin(((Time[A] x 308.00) + 0.00))) x 150.00) + 200.00) at 0.00
Remove the x1
  • Animation - Change U flying height to 0.00 at ((Current flying height of U) x 1.00)
In the dying trigger, instead of using unit group variables you could use
  • Custom script: set bj_wantDestroyGroup = true
and you could calculate the damage before the loop.


The effect looks good and so does the movement. Could you make it randomize the side?

I agree completely, Only thing I'd add is to fix the Tooltip, and make some real testing units, just make them able to continuously spawn, 5000 health with no movement is kinda annoying.
 
Level 11
Joined
May 31, 2008
Messages
698
The effect looks good and so does the movement. Could you make it randomize the side?

Should i make the missile spin either to the left or to the right? or just to any random angle around the caster?
Because now it just spins around a point offset 128 from the caster towards caster facing + 90
So would you suggest changing the angle to a random angle or should i make it only either +90 or -90

Btw, thanks for the feedback everybody :D

And as far as the testing units, i only made them not move so you could make the missile go directly over them and see the trail damage caused by the napalm. But that was mostly for testing purposes to make sure it worked properly xD so i will consider making it more exciting:)
 
Level 6
Joined
Aug 20, 2009
Messages
95
Should i make the missile spin either to the left or to the right? or just to any random angle around the caster?
Because now it just spins around a point offset 128 from the caster towards caster facing + 90
So would you suggest changing the angle to a random angle or should i make it only either +90 or -90

Btw, thanks for the feedback everybody :D

And as far as the testing units, i only made them not move so you could make the missile go directly over them and see the trail damage caused by the napalm. But that was mostly for testing purposes to make sure it worked properly xD so i will consider making it more exciting:)

Good, the only other comment, that i just thought of now, would be to make the trail last longer, as it doesn't do substantial burn damage. Also, just another idea, why not make the ball start small, then get bigger as it rotates, then when its at the final scale (You choose) it launches.
 
Level 11
Joined
May 31, 2008
Messages
698
Good, the only other comment, that i just thought of now, would be to make the trail last longer, as it doesn't do substantial burn damage. Also, just another idea, why not make the ball start small, then get bigger as it rotates, then when its at the final scale (You choose) it launches.

Thanks, these sound like good ideas
And the napalm trail isnt really supposed to do much damage, it is kind of like a little bonus thing as the main part of the spell is the actual missile.
But i will consider adding an option of making the trail actually stay on the ground and continue to do damage for a set amount of time.



And as far as the other spell, yeah i guess it looks similar, but i didnt copy your idea or anything, ive never even seen that before :p
 
Level 11
Joined
May 31, 2008
Messages
698
1 Thing that you must do, is to add prefix + _ before each of variables, cause there are many spells like yours and it comes to conflicts + they overlay each other... fix and +rep + 5/5, for now 4/5 (Prefix Example NM_XXXXXXXXX)

Yeah i figured i would have to do something like that lol. But should i do that to all of them? or only ones with arrays, since it wouldnt matter if the others overlap because i dont have to save a value for any period of time.
For example, X and Y. Or TempGroup or TempLoc, stuff like that
 
Level 3
Joined
Jul 2, 2007
Messages
42
Is there really a need to add crow form to the "fire missle" unit.
Cant you just set it to flying movement , then set its default height to 0 . then do the animation.

Just saying lol. But the math..... omg... lol
 
Top