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

Dropping Bombing [GUI] v0.2

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
Description:

Moves in a jagged line from side to side, causing damage every interval to nearby enemies that pass through.

Customizable Things:
  1. Damage
  2. Damage Interval
  3. Damage Area
  4. Damage Type
  5. Attack Type
  6. Area Special Effect
  7. Target Special Effect
  8. Animation
  9. Animation Interval
  10. Movement Speed
  11. Arches Count
  12. Arches Initial Side
  13. Destroy Trees
  14. Tree Special Effect
  15. Destroy Trees Area
  16. Magic Imunne

Changelog

  1. v0.1 Released
  2. v0.2 Fix
204181-albums4594-picture66186.gif



  • DB Trigger
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Dropping Bombing
    • Actions
      • -------- ------------------------------------------------------------------------------------------- --------
      • -------- Indexing. Don't touch without knowing what it does. --------
      • -------- ------------------------------------------------------------------------------------------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DB_Index_Size Equal to 0
        • Then - Actions
          • Trigger - Turn on DB Loop <gen>
        • Else - Actions
      • Set DB_Index_Size = (DB_Index_Size + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DB_Index_Size Greater than DB_Index_maxSize
        • Then - Actions
          • Set DB_Index[DB_Index_Size] = DB_Index_Size
          • Set DB_Index_maxSize = DB_Index_Size
        • Else - Actions
      • Set DB_TempInt = DB_Index[DB_Index_Size]
      • -------- ---------------------------------------------- --------
      • -------- Getting the caster of the spell. --------
      • -------- ---------------------------------------------- --------
      • Set DB_Caster[DB_TempInt] = (Triggering unit)
      • -------- ---------------------------------------------------------------------------------------------------------------------- --------
      • -------- Getting the angle between the position of the caster and the target position. --------
      • -------- ---------------------------------------------------------------------------------------------------------------------- --------
      • Set DB_TempLoc1 = (Position of DB_Caster[DB_TempInt])
      • Set DB_TempLoc2 = (Target point of ability being cast)
      • Set DB_Facing[DB_TempInt] = (Angle from DB_TempLoc1 to DB_TempLoc2)
      • -------- --------------------------------------------------------------------------------------------------------------------------- --------
      • -------- Getting the distance between the position of the caster and the target position. --------
      • -------- --------------------------------------------------------------------------------------------------------------------------- --------
      • Set DB_Distance_Loc1[DB_TempInt] = (Position of DB_Caster[DB_TempInt])
      • Set DB_Distance[DB_TempInt] = (Distance between DB_TempLoc1 and DB_TempLoc2)
      • Set DB_Distance_Reached[DB_TempInt] = 0.00
      • -------- --------------------------------- --------
      • -------- Adjusting animations. --------
      • -------- --------------------------------- --------
      • Unit - Order DB_Caster[DB_TempInt] to Stop
      • Animation - Change DB_Caster[DB_TempInt]'s animation speed to 300.00% of its original speed
      • -------- ------------------------------------------------------------------------- --------
      • -------- Makes ground units able to fly, if they can't fly. --------
      • -------- ------------------------------------------------------------------------- --------
      • Custom script: if UnitAddAbility(udg_DB_Caster[udg_DB_TempInt],'Amrf') then
      • Custom script: call UnitRemoveAbility(udg_DB_Caster[udg_DB_TempInt],'Amrf')
      • Custom script: endif
      • -------- ------------------------------------------ --------
      • -------- Adjusting damage quantity. --------
      • -------- ------------------------------------------ --------
      • Set DB_Damage[DB_TempInt] = (15.00 x (Real((Level of Dropping Bombing for DB_Caster[DB_TempInt]))))
      • -------- ------------------------------------------------ --------
      • -------- Adjusting attack/damage type. --------
      • -------- ------------------------------------------------ --------
      • Set DB_Attack_Type[DB_TempInt] = Spells
      • Set DB_Damage_Type[DB_TempInt] = Magic
      • -------- -------------------------------------------------------------------------------------------------------------------- --------
      • -------- Adjusting the interval that the amount of damage (SP_Damage) will occur. --------
      • -------- -------------------------------------------------------------------------------------------------------------------- --------
      • Set DB_Damage_Interval[DB_TempInt] = 0.25
      • Set DB_Damage_Interval_Reached[DB_TempInt] = 0.00
      • -------- ---------------------------------------------------------------------------------------------------------------------- --------
      • -------- Adjusting the area of effect that will receive damage around the SP_Caster. --------
      • -------- ---------------------------------------------------------------------------------------------------------------------- --------
      • Set DB_AoE[DB_TempInt] = 220.00
      • -------- -------------------------------------------------------------------------------------------------------------------- --------
      • -------- The swing angle of the arches. Don't touch without knowing what it does. --------
      • -------- -------------------------------------------------------------------------------------------------------------------- --------
      • Set DB_Angle[DB_TempInt] = 180.00
      • Set DB_Angle_Increment[DB_TempInt] = 5.00
      • Set DB_Angle_Reached[DB_TempInt] = 0.00
      • Set DB_Arc[DB_TempInt] = 0.00
      • -------- ------------------------------------------------- --------
      • -------- Adjusting the amount of arches. --------
      • -------- ------------------------------------------------- --------
      • Set DB_Count[DB_TempInt] = 4
      • Set DB_Count_Reached[DB_TempInt] = 0
      • -------- ----------------------------------------------------------------------------------------- --------
      • -------- If "True", the first arc begins movement from left to right. --------
      • -------- If "False", the first arc begins movement from right to left. --------
      • -------- ----------------------------------------------------------------------------------------- --------
      • Set DB_Boolean1[DB_TempInt] = True
      • -------- ---------------------------------------------------------- --------
      • -------- If "True", will destroy nearby trees. --- --------
      • -------- If "True", won't destroy nearby trees. --------
      • -------- ---------------------------------------------------------- --------
      • Set DB_Boolean2[DB_TempInt] = True
      • -------- ------------------------------------------------------------------------------ --------
      • -------- If "True", the DB_caster will be magic immune. ---- --------
      • -------- If "False", the DB_caster won't be magic immune. --------
      • -------- ------------------------------------------------------------------------------ --------
      • Set DB_Boolean3[DB_TempInt] = True
      • -------- ----------------------------------------------------------------------------------------------------------------- --------
      • -------- Adjusting the area of effect that will destroy trees around the SP_Caster. --------
      • -------- ----------------------------------------------------------------------------------------------------------------- --------
      • Set DB_AoE_Trees[DB_TempInt] = 120.00
      • -------- --------------------------------------------------------------------------------------------------- --------
      • -------- Adjusting the movement speed. Choose a value greater than 0. --------
      • -------- --------------------------------------------------------------------------------------------------- --------
      • Set DB_Speed[DB_TempInt] = 15.00
      • -------- -------------------------------------------------------- --------
      • -------- Adjusting the animation ID number. --------
      • -------- -------------------------------------------------------- --------
      • Set DB_Anim_Integer[DB_TempInt] = 3
      • -------- --------------------------------------------------------------------------------- --------
      • -------- Adjusting the interval that the animations will occur. --------
      • -------- --------------------------------------------------------------------------------- --------
      • Set DB_Anim[DB_TempInt] = 0.30
      • Set DB_Anim_Reached[DB_TempInt] = 0.00
      • -------- -------------------------------------------------------------------- --------
      • -------- The special effects created on the ground. --------
      • -------- -------------------------------------------------------------------- --------
      • Set DB_Sfx2[DB_TempInt] = abilities\weapons\DemolisherMissile\DemolisherMissile.mdl
      • -------- ------------------------------------------------------------ --------
      • -------- The special effects created on targets. --------
      • -------- ------------------------------------------------------------ --------
      • Set DB_Sfx1[DB_TempInt] = abilities\weapons\DemolisherMissile\DemolisherMissile.mdl
      • -------- --------------------------------------------------------------------- --------
      • -------- The special effects created destroyed trees. --------
      • -------- --------------------------------------------------------------------- --------
      • Set DB_Sfx3[DB_TempInt] = Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl
      • -------- ----------------------------------------------------------------------- --------
      • -------- The special effect created on the SP_Caster. --------
      • -------- ----------------------------------------------------------------------- --------
      • Special Effect - Create a special effect attached to the origin of DB_Caster[DB_TempInt] using Abilities\Spells\Other\Volcano\VolcanoMissile.mdl
      • Set DB_Effect[DB_TempInt] = (Last created special effect)
      • -------- -------------------------------- --------
      • -------- Checking conditions --------
      • -------- -------------------------------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DB_Boolean3[DB_TempInt] Equal to True
        • Then - Actions
          • Unit - Add classification of Magic Immune to DB_Caster[DB_TempInt]
        • Else - Actions
      • -------- ---------------------------------- --------
      • -------- Just destroying leaks. --------
      • -------- ---------------------------------- --------
      • Custom script: call RemoveLocation(udg_DB_TempLoc1)
      • Custom script: call RemoveLocation(udg_DB_TempLoc2)
  • DB Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer DB_Loop) from 1 to DB_Index_Size, do (Actions)
        • Loop - Actions
          • Set DB_TempInt = DB_Index[DB_Loop]
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • DB_Distance_Reached[DB_TempInt] Greater than or equal to 0.00
            • Then - Actions
              • Set DB_Distance_Loc2 = (Position of DB_Caster[DB_TempInt])
              • Set DB_Distance_Reached[DB_TempInt] = (DB_Distance[DB_TempInt] - (Distance between DB_Distance_Loc1[DB_TempInt] and DB_Distance_Loc2))
              • Custom script: call RemoveLocation(udg_DB_Distance_Loc2)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • DB_Count_Reached[DB_TempInt] Less than DB_Count[DB_TempInt]
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • DB_Angle_Reached[DB_TempInt] Less than DB_Angle[DB_TempInt]
                    • Then - Actions
                      • Set DB_Angle_Reached[DB_TempInt] = (DB_Angle_Reached[DB_TempInt] + DB_Angle_Increment[DB_TempInt])
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • DB_Boolean1[DB_TempInt] Equal to True
                        • Then - Actions
                          • Set DB_Arc[DB_TempInt] = (DB_Arc[DB_TempInt] - DB_Angle_Increment[DB_TempInt])
                          • Set DB_Facing_Angle = ((DB_Facing[DB_TempInt] + DB_Arc[DB_TempInt]) + 90.00)
                          • Set DB_Location1 = (Position of DB_Caster[DB_TempInt])
                          • Set DB_Location2 = (DB_Location1 offset by DB_Speed[DB_TempInt] towards DB_Facing_Angle degrees)
                        • Else - Actions
                          • Set DB_Arc[DB_TempInt] = (DB_Arc[DB_TempInt] + DB_Angle_Increment[DB_TempInt])
                          • Set DB_Facing_Angle = ((DB_Facing[DB_TempInt] + DB_Arc[DB_TempInt]) - 90.00)
                          • Set DB_Location1 = (Position of DB_Caster[DB_TempInt])
                          • Set DB_Location2 = (DB_Location1 offset by DB_Speed[DB_TempInt] towards DB_Facing_Angle degrees)
                      • Special Effect - Create a special effect at DB_Location2 using DB_Sfx2[DB_TempInt]
                      • Special Effect - Destroy (Last created special effect)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • DB_Boolean2[DB_TempInt] Equal to True
                        • Then - Actions
                          • Destructible - Pick every destructible within DB_AoE_Trees[DB_TempInt] of DB_Location2 and do (Actions)
                            • Loop - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • ((Picked destructible) is alive) Equal to True
                                  • ((Picked destructible) is invulnerable) Not equal to True
                                • Then - Actions
                                  • Unit - Order DB_TreeDetection_Dummy to Harvest (Picked destructible)
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • (Current order of DB_TreeDetection_Dummy) Equal to (Order(harvest))
                                    • Then - Actions
                                      • Destructible - Kill (Picked destructible)
                                      • Set DB_TempLoc3 = (Position of (Picked destructible))
                                      • Special Effect - Create a special effect at DB_TempLoc3 using DB_Sfx3[DB_TempInt]
                                      • Special Effect - Destroy (Last created special effect)
                                      • Custom script: call RemoveLocation(udg_DB_TempLoc3)
                                      • Unit - Order DB_TreeDetection_Dummy to Stop
                                    • Else - Actions
                                      • Unit - Order DB_TreeDetection_Dummy to Stop
                                • Else - Actions
                        • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Terrain pathing at DB_Location2 of type Walkability is off) Not equal to True
                        • Then - Actions
                          • Custom script: call SetUnitX(udg_DB_Caster[udg_DB_TempInt], GetLocationX(udg_DB_Location2))
                          • Custom script: call SetUnitY(udg_DB_Caster[udg_DB_TempInt], GetLocationY(udg_DB_Location2))
                          • Unit - Make DB_Caster[DB_TempInt] face DB_Facing_Angle over 0.00 seconds
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • DB_Anim_Reached[DB_TempInt] Less than DB_Anim[DB_TempInt]
                            • Then - Actions
                              • Set DB_Anim_Reached[DB_TempInt] = (DB_Anim_Reached[DB_TempInt] + 0.03)
                            • Else - Actions
                              • Set DB_Anim_Reached[DB_TempInt] = 0.00
                              • Custom script: call SetUnitAnimationByIndex(udg_DB_Caster[udg_DB_TempInt], udg_DB_Anim_Integer[udg_DB_TempInt])
                        • Else - Actions
                          • Set DB_Distance_Reached[DB_TempInt] = -1.00
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • DB_Damage_Interval_Reached[DB_TempInt] Less than DB_Damage_Interval[DB_TempInt]
                        • Then - Actions
                          • Set DB_Damage_Interval_Reached[DB_TempInt] = (DB_Damage_Interval_Reached[DB_TempInt] + 0.03)
                        • Else - Actions
                          • Set DB_Damage_Interval_Reached[DB_TempInt] = 0.00
                          • Set DB_Group[DB_TempInt] = (Units within DB_AoE[DB_TempInt] of DB_Location2)
                          • Unit Group - Pick every unit in DB_Group[DB_TempInt] and do (Actions)
                            • Loop - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • ((Picked unit) is A structure) Not equal to True
                                  • ((Picked unit) is Magic Immune) Not equal to True
                                  • ((Picked unit) is alive) Equal to True
                                  • ((Picked unit) belongs to an enemy of (Owner of DB_Caster[DB_TempInt])) Equal to True
                                • Then - Actions
                                  • Unit - Cause DB_Caster[DB_TempInt] to damage (Picked unit), dealing DB_Damage[DB_TempInt] damage of attack type DB_Attack_Type[DB_TempInt] and damage type DB_Damage_Type[DB_TempInt]
                                  • Set DB_TempLoc4 = (Position of (Picked unit))
                                  • Special Effect - Create a special effect at DB_TempLoc4 using DB_Sfx1[DB_TempInt]
                                  • Special Effect - Destroy (Last created special effect)
                                  • Custom script: call RemoveLocation(udg_DB_TempLoc4)
                                • Else - Actions
                          • Custom script: call DestroyGroup(udg_DB_Group[udg_DB_TempInt])
                      • Custom script: call RemoveLocation(udg_DB_Location1)
                      • Custom script: call RemoveLocation(udg_DB_Location2)
                    • Else - Actions
                      • Set DB_Count_Reached[DB_TempInt] = (DB_Count_Reached[DB_TempInt] + 1)
                      • Set DB_Angle_Reached[DB_TempInt] = 0.00
                      • Set DB_Arc[DB_TempInt] = 0.00
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • DB_Boolean1[DB_TempInt] Not equal to True
                        • Then - Actions
                          • Set DB_Boolean1[DB_TempInt] = True
                        • Else - Actions
                          • Set DB_Boolean1[DB_TempInt] = False
                • Else - Actions
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • DB_Boolean3[DB_TempInt] Equal to True
                • Then - Actions
                  • Unit - Remove classification of Magic Immune from DB_Caster[DB_TempInt]
                • Else - Actions
              • Animation - Reset DB_Caster[DB_TempInt]'s animation
              • Animation - Change DB_Caster[DB_TempInt]'s animation speed to 100.00% of its original speed
              • Special Effect - Destroy DB_Effect[DB_TempInt]
              • Custom script: call RemoveLocation(udg_DB_Distance_Loc1[udg_DB_TempInt])
              • Set DB_Index[DB_Loop] = DB_Index[DB_Index_Size]
              • Set DB_Index[DB_Index_Size] = DB_TempInt
              • Set DB_Index_Size = (DB_Index_Size - 1)
              • Set DB_Loop = (DB_Loop - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • DB_Index_Size Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                  • Skip remaining actions
                • Else - Actions


Keywords:
Bombard, Steam, Tank, Hard, Shot, Fusion, War, Attack, Run, Walk, Drop, Missile, Rush, Explosive.
Contents

Dropping Bombing [GUI] (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. Dropping Bombing [GUI] v0.2 | Reviewed by Maker | 28th Feb 2013 Needs Fix Required changes You can get stuck due to pathing being ignored The unit goes through buildings and pathing...

Moderator

M

Moderator

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


Dropping Bombing [GUI] v0.2 | Reviewed by Maker | 28th Feb 2013
Needs Fix

Required changes
  • You can get stuck due to pathing being ignored
    The unit goes through buildings and pathing blockers
Suggested changes
  • The spell obviously isn't v0.2 so why use that kind of version number
  • Adding Magic Immune classification does not work, add an ability instead
  • You should add Locust to the tree dummy, not invulnerability
  • You set loc1 and loc2 in bot THEN and ELSE in the looping trigger,
    take them out of the if/then/else
  • The spell creates upto 122 special effects per cast, which is too many
[td]
[/td]



Dropping Bombing [GUI] v0.1 | Reviewed by Maker | 24th Feb 2013
Needs Fix

Required changes
  • Do not upload v0.1 work, only "finished" work
  • Don't use Pause unit. It pauses buffs
  • Add importing instructions into the map
  • Leak
    • Set DB_Location = ((Position of DB_Caster[DB_TempInt]) offset by DB_Speed...
  • 288 special effects per cast is too much
  • You can get stuck everywhere due to pathing being ignored
    The unit goes through trees, buildings, pathing blockers...
Suggested changes
  • Filter out dead units from being damaged
  • The target point of ability being cast could determine how
    far the unit goes
[td]
[/TD]
 
like spell look cool, damage work well, only problem like with most of the similiar system is the pathing, i can go trought the cliffs/ trees and stuck at end

I could refine the code to finish running when collides with something insurmountable.

But there is a way that you can change if you want, changing just one line.
Not the best way, but it serves.

  • (Terrain pathing at DB_Location of type Flyability is off) Not equal to True
To
  • (Terrain pathing at DB_Location of type Walkability is off) Not equal to True
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
I could refine the code to finish running when collides with something insurmountable.

But there is a way that you can change if you want, changing just one line.
Not the best way, but it serves.

  • (Terrain pathing at DB_Location of type Flyability is off) Not equal to True
To
  • (Terrain pathing at DB_Location of type Walkability is off) Not equal to True

that dont do nothing with obstacles like trees/ pathblockers etc......

best way is useing a GetTerrainWalkable library but since it isnt vjass u can use something gui version similiar like this

header
JASS:
function HideBothersomeItem takes nothing returns nothing
  if IsItemVisible(GetEnumItem()) then
      set udg_TW_HI[udg_TW_Max]=GetEnumItem()
      call SetItemVisible(udg_TW_HI[udg_TW_Max],false)
      set udg_TW_Max=udg_TW_Max+1
  endif
endfunction
 
function IsTerrainWalkable takes real x, real y returns boolean
        call MoveRectTo(udg_TW_R,x,y)
        call EnumItemsInRect(udg_TW_R,null,function HideBothersomeItem)
        call SetItemPosition(udg_TW_IC,x,y)//this unhides the item...
        set udg_TW_X=GetItemX(udg_TW_IC)-x
        set udg_TW_Y=GetItemY(udg_TW_IC)-y
        call SetItemVisible(udg_TW_IC,false)//...so we must hide it again
      loop
         exitwhen udg_TW_Max<=0
         set udg_TW_Max=udg_TW_Max-1
         call SetItemVisible(udg_TW_HI[udg_TW_Max],true)
         set udg_TW_HI[udg_TW_Max]=null
      endloop
    if IsTerrainPathable(x, y, PATHING_TYPE_WALKABILITY) then
       return false
    else
       return udg_TW_X*udg_TW_X+udg_TW_Y*udg_TW_Y<udg_TW_MaxR  
    endif
endfunction

settings
  • Map initilize
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- X and Y coordinates --------
      • Set TW_X = 0.00
      • Set TW_Y = 0.00
      • -------- Max Range --------
      • Set TW_MaxR = 1.00
      • -------- Hidden item for check --------
      • Custom script: set udg_TW_IC=CreateItem('ciri',0,0)
      • Item - Hide TW_IC
      • -------- Array index for hidden item array --------
      • Set TW_Max = 0
      • -------- Region for system --------
      • Custom script: set udg_TW_R = Rect(0.0,0.0,128.0,128.0)
demo
  • Example
    • Events
      • Time - Every 0.30 seconds of game time
    • Conditions
    • Actions
      • -------- Point variable is used for this demo, not part of the system --------
      • Set Point = (Position of Gryphon Rider 0001 <gen>)
      • Custom script: if IsTerrainWalkable (GetLocationX(udg_Point), GetLocationY(udg_Point)) then
      • Game - Display to (All players) the text: Point is walkable
      • Custom script: else
      • Game - Display to (All players) the text: Point isnt walkable...
      • Custom script: endif
      • Custom script: call RemoveLocation(udg_Point)
 

Attachments

  • 1_TerrainWalkable.w3x
    19.1 KB · Views: 43
Top