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

Bomb Throw v1.01

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
Throws a 400 HP bomb. If the bomb survives for 7 seconds, it explodes dealing 400 damage and shortly after explodes again dealing another 600 damage and slowing nearby units by 50% for 3 seconds in a slightly larger AOE.
Each level improves range and cooldown




  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Throw Bomb
  • Actions
    • Set Caster_Point = (Position of (Triggering unit))
    • Set Bomb_Point = (Target point of ability being cast)
    • Unit - Create 1 BOMB for (Owner of (Triggering unit)) at Caster_Point facing (Facing of (Triggering unit)) degrees
    • Unit - Order (Last created unit) to Human Dragonhawk Rider - Cloud Bomb_Point
    • Unit Group - Add (Last created unit) to Bomb_Group
    • Trigger - Turn on Bomb Timer <gen>
    • Custom script: call RemoveLocation (udg_Caster_Point)
    • Custom script: call RemoveLocation (udg_Bomb_Point)
How to change settings:

Duration = 0.03*(MaxCustomUnitValue)
Color Change % = 100/(MaxCustomUnitValue)

  • Events
    • Time - Every 0.03 seconds of game time
  • Conditions
  • Actions
    • Unit Group - Pick every unit in Bomb_Group and do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Number of units in Bomb_Group) Greater than 0
          • Then - Actions
            • Unit - Set the custom value of (Picked unit) to ((Custom value of (Picked unit)) + 1)
            • Set Bomb_Size = (100.00 + (5.00 x (Sin((Real(((Custom value of (Picked unit)) x 4)))))))
            • Animation - Change (Picked unit)'s vertex coloring to (100.00%, (100.00 - ((Real((Custom value of (Picked unit)))) x 0.43))%, (100.00 - ((Real((Custom value of (Picked unit)))) x 0.43))%) with 0.00% transparency
            • Animation - Change (Picked unit)'s size to (Bomb_Size%, Bomb_Size%, Bomb_Size%) of its original size
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • ((Picked unit) is dead) Equal to True
              • Then - Actions
                • Unit Group - Remove (Picked unit) from Bomb_Group
              • Else - Actions
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • (Custom value of (Picked unit)) Greater than or equal to 233
                  • Then - Actions
                    • Set Bomb_Point = (Position of (Picked unit))
                    • Set Bomb_Region = (Region centered at Bomb_Point with size (515.00, 515.00))
                    • Unit - Kill (Picked unit)
                    • Special Effect - Create a special effect at Bomb_Point using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
                    • Special Effect - Destroy (Last created special effect)
                    • Special Effect - Create a special effect at Bomb_Point using Abilities\Weapons\SteamTank\SteamTankImpact.mdl
                    • Special Effect - Destroy (Last created special effect)
                    • Unit - Create 1 Bomb Dummy for (Owner of (Picked unit)) at Bomb_Point facing Default building facing degrees
                    • Custom script: set bj_wantDestroyGroup = true
                    • Unit Group - Pick every unit in (Units in Bomb_Region) and do (Actions)
                      • Loop - Actions
                        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          • If - Conditions
                            • ((Picked unit) belongs to an enemy of (Owner of (Last created unit))) Equal to True
                          • Then - Actions
                            • Unit - Cause (Last created unit) to damage (Picked unit), dealing 400.00 damage of attack type Spells and damage type Normal
                          • Else - Actions
                    • Destructible - Pick every destructible in Bomb_Region and do (Actions)
                      • Loop - Actions
                        • Custom script: if IsDestructableTree (GetEnumDestructable()) then
                        • Destructible - Kill (Picked destructible)
                        • Custom script: endif
                    • Unit - Order (Last created unit) to Human Mountain King - Thunder Clap
                    • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
                    • Unit Group - Remove (Picked unit) from Bomb_Group
                    • Custom script: call RemoveLocation (udg_Bomb_Point)
                    • Custom script: call RemoveRect(udg_Bomb_Region)
                  • Else - Actions
          • Else - Actions
            • Trigger - Turn off (This trigger)
Using another trigger, bomb moves using paladon's jump system.





CREDITS:

Bomb model from Splatt:
http://www.hiveworkshop.com/forums/models-530/bomb-47880/?prev=search%3Dbomb%26d%3Dlist%26r%3D20

Also used jump system from paladon





CHANGES:
V1.01 - Fixed the required change and most of the suggested chagnes except for -custom value of unit- and -region to units in range-
Also changed the special effect used for the second explosion


Keywords:
bomb, throw, explosion, coolyoshi
Contents

Bomb Spell 1.01 (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. Moderator: Pharaoh_ Date: 19:11, 22nd Apr 2012 • Maker's suggested changes are more than required. Picking units in region doesn't really reflect the way most spells work...

Moderator

M

Moderator

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

160036-albums4747-picture55861.png

Moderator: Pharaoh_
Date: 19:11, 22nd Apr 2012

Review
• Maker's suggested changes are more than required. Picking units in region doesn't really reflect the way most spells work (aoe-wise).
• Custom values should not be used, as they can collide with other indexing templates, such as Bribe's or Hanky's and many users started manipulating them lately.
• Use variables to store (Last created unit) and (Picked unit), to avoid repetition of function calls and reference those variables instead.
• Use Maker's link to check if the enum destructable is a tree; I don't fancy GUI submissions making use of vJass libraries. Why force a user to use JNGP just for that?
• The special effects' paths should be configurable variables in the Map Initialization, not everytime the spell is cast. You are not using variables for every special effect path the spell uses.
• Check if group is empty, when the instance is supposed to end, not every 0.03 seconds.
• Run the values required to trigger Paladon's Jump system in the main trigger, don't use another spell cast (Bomb Jump) to run them.
Reviewed by Maker, Bomb Throw v1, 8th Apr 2012

Required changes
  • Add importing instructions into the map file
Suggested changes
  • Calculate the dummy's new size into a variable and use the variable
    instead of calculating the value three times
  • Don't use custom values as it might collide with other systems
    like unit indexers
  • Instead of using a region, pick units in range when you damage units
  • Use proper tree detection
  • You don't need Remove Explosion Caster trigger
    Apply an expiration timer on the caster instead
  • The icon should be active verision, not passive
  • The dummy with locust does not have proper death type, it gives vision,
    has structures built, upgrades used...
Useful Links
 
Needs a /lot/ more configurables if you ask me, pretty much all of those constants could be variables.

Also you shouldn't be using custom values, use variables with either dynamic indexing or hashtables.

You can select the bomb dummy

You really /do not/ need to be using a jump system for this. It's not very difficult to create a parabola for your bombs without the help of a jump system
Use this to create parabolas:
((4*MaxHeight)/MaxDistance)*(MaxDistance-CurrentDistance*(CurrentDistance/MaxDistance) = Current Fly height

Bombs can destroy eachother - thus stopping the other from "detonating" (this would be fixed if you made the bomb a locust unit, and would also fix the selection unit

Also you should remove the effect of the caster firing that little fireball before the bomb is launched (imo)

Also you need to use a Tree detection system to destroy trees rather than two certain types in the map. Again to do this do not use a dedicated system, it's simple enough to do without one. Also Paladon's system /does not/ do it properly - you need to detect trees alone and not just any kind of destructible, otherwise it'll destroy things like bridges

You can find tutorials on how to do tree detection in the triggers & scripts section in the forums, use the search. Alternatively look at other spells/systems which /do/ have the detection and use a similar thing to those.
 
Top