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

Impact Wave v1.2

Hi, i created a simple spell. i know its really simple i just missed uploading stuff here so i thought maybe upload a simple eye candy. enjoy


Slams the weapon to the ground creating multiple shockwaves that deals damage to enemy units in a line.

Level 1 - deals 75 + 30% agility
Level 2 - deals 125 + 30% agility
Level 3 - deals 175 + 30% agility
Level 4 - deals 225 + 30% agility



  • Impact Wave Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- ability --------
      • Set IX_Ability = Impact Wave
      • -------- damage --------
      • Set IX_AttackType = Normal
      • Set IX_DamageType = Normal
      • -------- area of effect --------
      • Set IX_AoE[1] = 100.00
      • Set IX_AoE[2] = 100.00
      • Set IX_AoE[3] = 100.00
      • Set IX_AoE[4] = 100.00
      • -------- maximum distance --------
      • Set IX_MaxDistance[1] = 500.00
      • Set IX_MaxDistance[2] = 500.00
      • Set IX_MaxDistance[3] = 500.00
      • Set IX_MaxDistance[4] = 500.00
      • -------- delay --------
      • Set IX_Delay[1] = 0.60
      • Set IX_Delay[2] = 0.60
      • Set IX_Delay[3] = 0.60
      • Set IX_Delay[4] = 0.60
      • -------- wave count --------
      • Set IX_WaveCount[1] = 3
      • Set IX_WaveCount[2] = 3
      • Set IX_WaveCount[3] = 3
      • Set IX_WaveCount[4] = 3
      • -------- absolute damage --------
      • Set IX_Absolute[1] = 75.00
      • Set IX_Absolute[2] = 125.00
      • Set IX_Absolute[3] = 175.00
      • Set IX_Absolute[4] = 225.00
      • -------- strength --------
      • Set IX_Strength[1] = 0.00
      • Set IX_Strength[2] = 0.00
      • Set IX_Strength[3] = 0.00
      • Set IX_Strength[4] = 0.00
      • -------- agility --------
      • Set IX_Agility[1] = 30.00
      • Set IX_Agility[2] = 30.00
      • Set IX_Agility[3] = 30.00
      • Set IX_Agility[4] = 30.00
      • -------- intelligence --------
      • Set IX_Intelligence[1] = 0.00
      • Set IX_Intelligence[2] = 0.00
      • Set IX_Intelligence[3] = 0.00
      • Set IX_Intelligence[4] = 0.00
      • -------- wave gap --------
      • Set IX_Gap[1] = 30.00
      • Set IX_Gap[2] = 30.00
      • Set IX_Gap[3] = 30.00
      • Set IX_Gap[4] = 30.00
      • -------- missle --------
      • Set IX_Offset = 150.00
      • Set IX_ImpactSfx = Abilities\Spells\Other\Doom\DoomDeath.mdl
      • Set IX_MissleSfx = Abilities\Weapons\FireBallMissile\FireBallMissile.mdl
      • Set IX_Hit = Environment\SmallBuildingFire\SmallBuildingFire2.mdl
      • -------- preload --------
      • Set IX_Point1 = (Random point in (Playable map area))
      • Unit - Create 1 Impact Wave Dummy for Neutral Passive at IX_Point1 facing Default building facing degrees
      • Unit - Add IX_Ability to (Last created unit)
      • Unit - Remove IX_Ability from (Last created unit)
      • Unit - Add a 0.01 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation(udg_IX_Point1)



  • Impact Wave Cast
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to IX_Ability
    • Actions
      • -------- --------
      • -------- important values --------
      • -------- --------
      • Set IX_TempCaster = (Triggering unit)
      • Set IX_TempPlayer = (Triggering player)
      • Set IX_TempLevel = (Level of IX_Ability for IX_TempCaster)
      • -------- --------
      • -------- calculate damage --------
      • -------- --------
      • Set IX_TempStr = (((Real((Strength of IX_TempCaster (Include bonuses)))) x IX_Strength[IX_TempLevel]) x 0.01)
      • Set IX_TempAgi = (((Real((Agility of IX_TempCaster (Include bonuses)))) x IX_Agility[IX_TempLevel]) x 0.01)
      • Set IX_TempInt = (((Real((Intelligence of IX_TempCaster (Include bonuses)))) x IX_Intelligence[IX_TempLevel]) x 0.01)
      • Set IX_TempDamage = ((IX_TempStr + IX_TempAgi) + (IX_TempInt + IX_Absolute[IX_TempLevel]))
      • -------- --------
      • -------- speed and angle --------
      • -------- --------
      • Set IX_TempSpeed = (IX_MaxDistance[IX_TempLevel] / (IX_Delay[IX_TempLevel] / 0.03))
      • Set IX_StartAngle = (Facing of IX_TempCaster)
      • -------- --------
      • -------- determine where to place our projectile --------
      • -------- --------
      • Set IX_Point1 = (Position of IX_TempCaster)
      • Set IX_Point2 = (IX_Point1 offset by IX_Offset towards IX_StartAngle degrees)
      • -------- --------
      • Custom script: call RemoveLocation(udg_IX_Point1)
      • -------- --------
      • Special Effect - Create a special effect at IX_Point2 using IX_ImpactSfx
      • Special Effect - Destroy (Last created special effect)
      • -------- --------
      • -------- for this part i get the initial angle then divide the number of waves by 2 --------
      • -------- then subtract the gap to slightly change the start angle --------
      • -------- --------
      • For each (Integer IX_TempLooper) from 1 to (IX_WaveCount[IX_TempLevel] / 2), do (Actions)
        • Loop - Actions
          • Set IX_StartAngle = (IX_StartAngle - IX_Gap[IX_TempLevel])
      • -------- --------
      • For each (Integer IX_TempLooper) from 1 to IX_WaveCount[IX_TempLevel], do (Actions)
        • Loop - Actions
          • -------- --------
          • -------- standard indexing --------
          • -------- --------
          • Set IX_Index = (IX_Index + 1)
          • -------- --------
          • Set IX_Caster[IX_Index] = IX_TempCaster
          • Set IX_Player[IX_Index] = IX_TempPlayer
          • Set IX_Level[IX_Index] = IX_TempLevel
          • -------- --------
          • -------- projectile settings --------
          • -------- --------
          • Set IX_IsValid[IX_Index] = True
          • Set IX_CurrentDistance[IX_Index] = 0.00
          • Set IX_Damage[IX_Index] = IX_TempDamage
          • -------- --------
          • Set IX_Speed[IX_Index] = IX_TempSpeed
          • Set IX_Angle[IX_Index] = IX_StartAngle
          • -------- --------
          • -------- notice here that the gap is added again to produce a fan shaped output --------
          • -------- --------
          • Set IX_StartAngle = (IX_StartAngle + IX_Gap[IX_TempLevel])
          • -------- --------
          • Unit - Create 1 Impact Wave Dummy for IX_Player[IX_Index] at IX_Point2 facing IX_Angle[IX_Index] degrees
          • Set IX_Missle[IX_Index] = (Last created unit)
          • -------- --------
          • Custom script: call DestroyGroup(udg_IX_DamagedGroup[udg_IX_Index])
          • Custom script: set udg_IX_DamagedGroup[udg_IX_Index]=CreateGroup()
          • -------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • IX_Index Equal to 1
            • Then - Actions
              • Trigger - Turn on Impact Wave Effect <gen>
            • Else - Actions
      • -------- --------
      • Custom script: call RemoveLocation(udg_IX_Point2)



  • Impact Wave Effect
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer IX_Looper) from 1 to IX_Index, do (Actions)
        • Loop - Actions
          • -------- --------
          • -------- isvalid is a flag to determine when to deindex --------
          • -------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • IX_IsValid[IX_Looper] Equal to True
            • Then - Actions
              • -------- --------
              • -------- check distance --------
              • -------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • IX_CurrentDistance[IX_Looper] Less than IX_MaxDistance[IX_Level[IX_Looper]]
                • Then - Actions
                  • Set IX_CurrentDistance[IX_Looper] = (IX_CurrentDistance[IX_Looper] + IX_Speed[IX_Looper])
                • Else - Actions
                  • Set IX_IsValid[IX_Looper] = False
              • -------- --------
              • -------- effects and damage --------
              • -------- --------
              • Set IX_Point1 = (Position of IX_Missle[IX_Looper])
              • Special Effect - Create a special effect at IX_Point1 using IX_MissleSfx
              • Special Effect - Destroy (Last created special effect)
              • -------- --------
              • Set IX_TempGroup = (Units within IX_AoE[IX_Level[IX_Looper]] of IX_Point1)
              • Unit Group - Pick every unit in IX_TempGroup and do (Actions)
                • Loop - Actions
                  • Set IX_Picked = (Picked unit)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (IX_Picked is A structure) Equal to False
                      • (IX_Picked is Magic Immune) Equal to False
                      • (IX_Picked is Mechanical) Equal to False
                      • (IX_Picked is alive) Equal to True
                      • (IX_Picked belongs to an enemy of IX_Player[IX_Looper]) Equal to True
                      • (IX_Picked is in IX_DamagedGroup[IX_Looper]) Equal to False
                    • Then - Actions
                      • Unit - Cause IX_Caster[IX_Looper] to damage IX_Picked, dealing IX_Damage[IX_Looper] damage of attack type IX_AttackType and damage type IX_DamageType
                      • Special Effect - Create a special effect attached to the origin of IX_Picked using IX_Hit
                      • Special Effect - Destroy (Last created special effect)
                      • Unit Group - Add IX_Picked to IX_DamagedGroup[IX_Looper]
                    • Else - Actions
              • -------- --------
              • Set IX_Point2 = (IX_Point1 offset by IX_Speed[IX_Looper] towards IX_Angle[IX_Looper] degrees)
              • -------- --------
              • -------- terrain check --------
              • -------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Terrain pathing at IX_Point2 of type Walkability is off) Equal to False
                  • ((Playable map area) contains IX_Point2) Equal to True
                • Then - Actions
                  • Custom script: call SetUnitY(udg_IX_Missle[udg_IX_Looper], GetLocationY(udg_IX_Point2))
                  • Custom script: call SetUnitX(udg_IX_Missle[udg_IX_Looper], GetLocationX(udg_IX_Point2))
                • Else - Actions
                  • Set IX_IsValid[IX_Looper] = False
              • -------- --------
              • Custom script: call DestroyGroup(udg_IX_TempGroup)
              • Custom script: call RemoveLocation(udg_IX_Point1)
              • Custom script: call RemoveLocation(udg_IX_Point2)
              • -------- - --------
            • Else - Actions
              • -------- --------
              • -------- deindex --------
              • -------- --------
              • Set IX_DamagedGroup[IX_Looper] = IX_DamagedGroup[IX_Index]
              • Set IX_Angle[IX_Looper] = IX_Angle[IX_Index]
              • Set IX_Caster[IX_Looper] = IX_Caster[IX_Index]
              • Set IX_CurrentDistance[IX_Looper] = IX_CurrentDistance[IX_Index]
              • Set IX_Damage[IX_Looper] = IX_Damage[IX_Index]
              • Set IX_IsValid[IX_Looper] = IX_IsValid[IX_Index]
              • Set IX_Level[IX_Looper] = IX_Level[IX_Index]
              • Unit - Add a 0.01 second Generic expiration timer to IX_Missle[IX_Looper]
              • Set IX_Missle[IX_Looper] = IX_Missle[IX_Index]
              • Set IX_Player[IX_Looper] = IX_Player[IX_Index]
              • Set IX_Speed[IX_Looper] = IX_Speed[IX_Looper]
              • -------- - --------
              • Set IX_Looper = (IX_Looper - 1)
              • Set IX_Index = (IX_Index - 1)
              • -------- - --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • IX_Index Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions



v1.0 - release
v1.1 - removed the leak from init trigger + added comment
v1.2 - removed the line IX_Picked = No Unit + spell changed from no target to point target


Keywords:
impact, wave, by, empirean, flames, ooo, awesome, eyecandy, flameness, demon, blaze, orc, fel, omg, its, so, cool, and, it, burns, wahaha, shockwave,
Contents

Impact Wave (Map)

Reviews
21:27, 24th Apr 2016 Tank-Commander: V1.1 - A neat small spells, configuration is excellent reaching all the ability parameters though my note to remove "Set IX_Picked = No unit" still stands albeit very minor

Moderator

M

Moderator

21:27, 24th Apr 2016
Tank-Commander: V1.1 - A neat small spells, configuration is excellent reaching all the ability parameters though my note to remove "Set IX_Picked = No unit" still stands albeit very minor
 
Level 14
Joined
Nov 17, 2010
Messages
1,265
I like it. It's got nice effects without being overly complicated. A nice upgrade on the regular old shockwave.

My only suggestion would be to make it a point target so you can direct it where you want. Not really necessary, but personal preference.
 

Ardenian

A

Ardenian

  • Set IX_WaveCount[1] = 3
  • For each (Integer IX_TempLooper) from 1 to (IX_WaveCount[IX_TempLevel] / 2), do (Actions)
Does this work properly ?

A documentation would be nice, some small comments within the trigger telling what's going on.
Eases moderation job for moderators :)
 
Level 13
Joined
Jun 20, 2014
Messages
479
yes sir.

Edit: updated. added comments to that part but im not sure if i explained it correctly so im gonna clarify here. i just reduced the initial angle to shift it to the left by half the amount of the number of waves. then during indexing im adding the gap. it should create a fan shaped angles.
 
Just a few noted things, nothing major to note as being incorrect about the submission:
- Why the generic expiration timers of 0.01 rather than simply removing?
- "Set IX_Picked = No unit" is not needed, it serves no purpose
- Any particular reason why "Unit - A unit Finishes casting an ability" is used over "Unit - A unit Starts the effect of an ability"

Suggestions:
- It may be an idea to use co-ordinates for finding the new location (allowing you to calculate the x and y increase at the cast stage and using that (point = curX + Xvel, curY + Yvel) you then wouldn't need to use GetLocationX/Y or store any angles)
 
Level 13
Joined
Jun 20, 2014
Messages
479
Hey tank, ive used generic timer as suggested by chaosy. As for picked unit sure i can remove it. For the event finishes casting, i used it cause the animation is awesome. You know blademaster model. For the angle, can you please explain further im lost on how to calculate coordinates. Thanks you for your review
 
- I see, well I suppose it could be allowed - though I can see being stunned interrupting the ability when it's already consumed mana and gone on cooldown (would need to test that)


Well it would be along the lines of this (assuming IX_StartAngle is in degrees and not radians by default)
XVel = IX_Speed * Cos(bj_DEGTORAD * IX_StartAngle)
YVel = IX_Speed * Sin(bj_DEGTORAD * IX_StartAngle)
That would give you a constant increment for the x and y values instead of having to constantly recalulate polar offset (and remove the need to store IX_Angle[]
you may however then want to store IX_X[] and IX_Y[] for each unit (this would initially be the co-ordinates of IX_Point2
Then in the loop instead of setting Point2 to point1 with offset, you set
IX_X[] = IX_X[] + IX_Speed
IX_Y[] = IX_Y[] + IX_Speed
then set IX_Point2 to to loc(IX_X[], IX_Y[]), validate the location and if that's true SetUnitX(u, IX_X[]) & SetUnitY(u, IX_Y[])

It's a lot of work naturally which is why I left it as a suggestion and it may appear like "more" but in the long run would be much faster (polar offset 32 times per second is very slow in comparison to performing two additions 32 times per second) - working with co-ordinates saves a lot of processing and removes most of the need for locations at all (since most GUI functions which use locations have custom script equivalents that can take co-ordinates instead removing the need for the location and the removal line that it would need)
 
Level 13
Joined
Jun 20, 2014
Messages
479
Hi, thats exactly how i intended it to be. You may avoid the hit by interupting the caster or the caster interupting itself. Regarding the angle, if i get the concept correctly i should just calculate the coordinates on the plane with each calculation the result is the angle? Noted. Is it approvable in its current state?
 
Level 4
Joined
Mar 21, 2014
Messages
79
the spell works for itself fine, but it triggered always another spell of the hero. i changed the "Order String - Use/Turn On" in the object editor of the affected spells (gave each another stirng, or none), but still it was like that. is there something else i could do about it? or i will try with a different hero (who has different spells).
 
Last edited:
Top