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

Missile [Blizzlike Spell]

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
Missile - [Q]

Launches a missile that travels in straight lines, if an enemy gets in the way the missile explodes and damages the unit.

Damage: 50+20% Distance
Range: 1000

Cooldown: 0 seconds




  • Missile Variables
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Missile_range = 1000.00
      • Set Missile_initialdamage = 50.00
      • Set Missile_velocity = 20.00
      • Set Missile_percentaje = 0.20
      • Visibility - Create an initially Enabled visibility modifier for Player 1 (Red) emitting Visibility across (Playable map area)


  • Missile Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Missile
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Missile_index[0] Equal to 0
        • Then - Actions
          • Trigger - Turn on Missile Loop <gen>
        • Else - Actions
      • Set Missile_index[0] = (Missile_index[0] + 1)
      • Set Missile_index[1] = (Missile_index[1] + 1)
      • Set Missile_caster[Missile_index[1]] = (Triggering unit)
      • Set Missile_angle[Missile_index[1]] = (Facing of Missile_caster[Missile_index[1]])
      • Set temppoint = ((Position of Missile_caster[Missile_index[1]]) offset by 50.00 towards Missile_angle[Missile_index[1]] degrees)
      • Set Missile_damage[Missile_index[1]] = 0.00
      • Set Missile_distance[Missile_index[1]] = 0.00
      • Unit - Create 1 Missile for (Owner of Missile_caster[Missile_index[1]]) at temppoint facing Missile_angle[Missile_index[1]] degrees
      • Set Missile_dummy[Missile_index[1]] = (Last created unit)
      • Custom script: call RemoveLocation(udg_temppoint)
      • Set Missile_boolean[Missile_index[1]] = True


  • Missile Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer Missile_index[2]) from 1 to Missile_index[1], do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Missile_boolean[Missile_index[2]] Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Missile_distance[Missile_index[2]] Less than Missile_range
                • Then - Actions
                  • Set temppoint = ((Position of Missile_dummy[Missile_index[2]]) offset by Missile_velocity towards Missile_angle[Missile_index[2]] degrees)
                  • Unit - Move Missile_dummy[Missile_index[2]] instantly to temppoint, facing Missile_angle[Missile_index[2]] degrees
                  • Custom script: call RemoveLocation(udg_temppoint)
                  • Set Missile_distance[Missile_index[2]] = (Missile_distance[Missile_index[2]] + Missile_velocity)
                  • Set Missile_damage[Missile_index[2]] = (Missile_initialdamage + (Missile_distance[Missile_index[2]] x Missile_percentaje))
                  • Unit Group - Pick every unit in (Units within 100.00 of (Position of Missile_dummy[Missile_index[2]]) matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is Magic Immune) Equal to False)) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) be and do (Actions)
                    • Loop - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • ((Region centered at (Position of (Picked unit)) with size (75.00, 75.00)) contains Missile_dummy[Missile_index[2]]) Equal to True
                        • Then - Actions
                          • Set Missile_picked = (Picked unit)
                          • Unit - Cause Missile_caster[Missile_index[2]] to damage Missile_picked, dealing Missile_damage[Missile_index[2]] damage of attack type Chaos and damage type Normal
                          • Floating Text - Create floating text that reads ((- + (String((Integer(Missile_damage[Missile_index[2]]))))) + !) at (Position of Missile_picked) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
                          • Set Missile_floatingtext = (Last created floating text)
                          • Floating Text - Change Missile_floatingtext: Disable permanence
                          • Floating Text - Set the velocity of Missile_floatingtext to 90.00 towards 90.00 degrees
                          • Floating Text - Change the fading age of Missile_floatingtext to 2.00 seconds
                          • Floating Text - Change the lifespan of Missile_floatingtext to 3.00 seconds
                          • Special Effect - Create a special effect at (Position of Missile_dummy[Missile_index[2]]) using abilities\weapons\catapult\catapultmissile.mdl
                          • Set Missile_specialeffect = (Last created special effect)
                          • Special Effect - Destroy Missile_specialeffect
                          • Unit - Explode Missile_dummy[Missile_index[2]]
                          • Set Missile_boolean[Missile_index[2]] = False
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • Missile_boolean[Missile_index[2]] Equal to False
                            • Then - Actions
                              • Set Missile_index[0] = (Missile_index[0] - 1)
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • Missile_index[0] Equal to 0
                                • Then - Actions
                                  • Set Missile_index[1] = 0
                                  • Trigger - Turn off (This trigger)
                                • Else - Actions
                            • Else - Actions
                        • Else - Actions
                • Else - Actions
                  • Special Effect - Create a special effect at (Position of Missile_dummy[Missile_index[2]]) using abilities\weapons\catapult\catapultmissile.mdl
                  • Set Missile_specialeffect = (Last created special effect)
                  • Special Effect - Destroy Missile_specialeffect
                  • Unit - Explode Missile_dummy[Missile_index[2]]
                  • Set Missile_boolean[Missile_index[2]] = False
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Missile_boolean[Missile_index[2]] Equal to False
                    • Then - Actions
                      • Set Missile_index[0] = (Missile_index[0] - 1)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Missile_index[0] Equal to 0
                        • Then - Actions
                          • Set Missile_index[1] = 0
                          • Trigger - Turn off (This trigger)
                        • Else - Actions
                    • Else - Actions
            • Else - Actions



Keywords:
missile, unit, very, nice, blizz, like, blizzlike, hive, work, hivework, hiveworkshop
Contents

Just another Warcraft III map (Map)

Reviews
12th Dec 2015 IcemanBo: For too long time as NeedsFix. Rejected. 03:05, 19th Jun 2011 Maker: Read post #3 of this thread.

Moderator

M

Moderator

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

03:05, 19th Jun 2011
Maker: Read post #3 of this thread.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
You have location leaks. Position if x offset by y uses two locations. You need to set position of x into a varaible and the offset point into another variable.

You also have a unit group leak and a region leak.

The visibility modifier action doesn't belong to the spell, remove it from the init trigger.
 
Holy **** >.<
No wonder GUI hurts Nestharus' eyes :p

Location Leaks:
  • (Position of Missile_dummy[Missile_index[2]])
  • (Position of Missile_picked)
Here, you can simply convert the real to a string instead of from a real to an integer to a string :p
  • String((Integer(Missile_damage[Missile_index[2]])))))
Also:
  • Unit Group - Pick every unit in (Units within 100.00 of (Position of Missile_dummy[Missile_index[2]]) matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is Magic Immune) Equal to False)) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) be and do (Actions)
This leaks.
Add a custom script set bj_wantDestroyGroup = true before it to destroy the group :)


One other thing:
  • Floating Text - Create floating text that reads ((- + (String((Integer(Missile_damage[Missile_index[2]]))))) + !) at (Position of Missile_picked) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
  • Set Missile_floatingtext = (Last created floating text)
  • Floating Text - Change Missile_floatingtext: Disable permanence
  • Floating Text - Set the velocity of Missile_floatingtext to 90.00 towards 90.00 degrees
  • Floating Text - Change the fading age of Missile_floatingtext to 2.00 seconds
  • Floating Text - Change the lifespan of Missile_floatingtext to 3.00 seconds
These settings should be configurable :)

I hope this helps, as I don't like to review GUI spells/systems anymore, so you're lucky I'm even here xD


edit

LOL Maker, you beat me xD


edit

One other thing:


  • Set Missile_index[0] = (Missile_index[0] - 1)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • Missile_index[0] Equal to 0
    • Then - Actions
    • Set Missile_index[1] = 0
    • Trigger - Turn off (This trigger)
This entire block should be removed from the if/then/else. It will ALWAYS return true anyway :p


edit
Maker: Read post #3 of this thread.

Post #4's good too :(
 
Top