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

Magic Missile 1.2

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
This is my second spell I upload here. So please be a little indulgent when it is not perfect.
And sry that I forgot to write the spell description so here is it: Summons 2 magic towers, which send a frost-missile to each other, which deals 25/50/75/100 damage to near targets. Jumps 12 times.
  • Magic Missile Cast
    • Events
      • Unit - A unit starts the effect of an ability
    • Conditions
      • (Ability being cast) equal to Magic Missile
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Conditions
          • MM_index[1] euqal to 0
        • 'THEN'-Actions
          • ATrigger - Turn on Magic Missile Move <gen>
        • 'ELSE'-Actions
      • Set MM_index[1] = (MM_index[1] + 1)
      • Set MM_index[2] = (MM_index[2] + 1)
      • Set MM_data_caster[MM_index[2]] = (Triggering unit)
      • Set MM_data_location_caster[MM_index[2]] = (Position of MM_data_caster[MM_index[2]])
      • Unit - Create 1 Dummy_Magic_Missile_Tower for (Triggering player) at MM_data_location_caster[MM_index[2]] facing Default building facing degrees
      • Set MM_data_dummy_tower[MM_index[2]] = (Last created unit)
      • Set MM_data_location_target[MM_index[2]] = (Target point of ability being cast)
      • Unit - Create 1 Dummy_Magic_Missile_Tower for (Triggering player) at MM_data_location_target[MM_index[2]] facing Default building facing degrees
      • Set MM_data_dummy_tower_2[MM_index[2]] = (Last created unit)
      • Unit - Create 1 Dummy_Magic_Missile for (Triggering player) at MM_data_location_caster[MM_index[2]] facing Default building facing degrees
      • Set MM_data_dummy[MM_index[2]] = (Last created unit)
      • Set MM_data_number_jumps[MM_index[2]] = 15
      • Set MM_data_distance[MM_index[2]] = 100.00
      • Unit - Turn collision for MM_data_dummy[MM_index[2]] Off
      • Unit - Turn collision for MM_data_dummy_tower[MM_index[2]] Off
      • Unit - Turn collision for MM_data_dummy_tower_2[MM_index[2]] Off
      • Unit - Move MM_data_dummy[MM_index[2]] instantly to MM_data_location_caster[MM_index[2]]
      • Unit - Move MM_data_dummy_tower[MM_index[2]] instantly to MM_data_location_caster[MM_index[2]]
      • Unit - Move MM_data_dummy_tower_2[MM_index[2]] instantly to MM_data_location_target[MM_index[2]]
      • Set MM_data_back[MM_index[2]] = False
      • Set MM_data_group_hitten[MM_index[2]] = (Units within 0.00 of MM_data_location_caster[MM_index[2]])
      • Set MM_data_boolean_2[MM_index[2]] = False
  • Magic Missile Move
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer MM_index[3]) from 1 to MM_index[2], do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • 'IF'-Conditions
              • MM_data_number_jumps[MM_index[3]] greater then 0
            • 'THEN'-Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • 'IF'-Conditions
                  • (MM_data_back[MM_index[3]] equal to False) and (MM_data_distance[MM_index[3]] greater then 15.00)
                • 'THEN'-Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • 'IF'-Conditions
                      • MM_data_boolean[MM_index[3]] equal to True
                    • 'THEN'-Actions
                      • Unitgroup - Remove all units from MM_data_group_hitten[MM_index[3]]
                      • Set MM_data_boolean[MM_index[3]] = False
                    • 'ELSE'-Actions
                  • Set MM_data_location_tower[MM_index[3]] = (Position of MM_data_dummy_tower[MM_index[3]])
                  • Set MM_data_location_tower_2[MM_index[3]] = (Position of MM_data_dummy_tower_2[MM_index[3]])
                  • Set MM_data_location_dummy[MM_index[3]] = (Position of MM_data_dummy[MM_index[3]])
                  • Set MM_data_location_move[MM_index[3]] = (MM_data_location_dummy[MM_index[3]] offset by 30.00 towards (Angle from MM_data_location_dummy[MM_index[3]] to MM_data_location_tower_2[MM_index[3]]) degrees)
                  • Unit - Move MM_data_dummy[MM_index[3]] instantly to MM_data_location_move[MM_index[3]]
                  • Set MM_data_distance[MM_index[3]] = (Distance between MM_data_location_dummy[MM_index[3]] and MM_data_location_tower_2[MM_index[3]])
                  • Set MM_data_group[MM_index[3]] = (Units within 200.00 of MM_data_location_dummy[MM_index[3]])
                  • Unitgroup - Pick every unit in MM_data_group[MM_index[3]] and do (Actions)
                    • Lopp - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • 'IF'-Conditions
                          • (((((Picked unit) is a building) equal False) and (((Picked unit) is mechanic) equal to False)) and ((((Picked unit) is an ancient) equal to False) and (((Picked unit) is immune against magic) equal to False))) and ((((Picked unit) is alive) equal to True) and ((((Picked unit) belongs to an enemy of (Owner of MM_data_caster[MM_index[3]])) equal to True) and (((Picked unit) is in MM_data_group_hitten[MM_index[3]]) equal to False)))
                        • 'THEN'-Actions
                          • Set MM_data_damage_target[MM_index[3]] = (Picked unit)
                          • Set MM_data_location_damage_target[MM_index[3]] = (Position of MM_data_damage_target[MM_index[3]])
                          • Unit - Cause MM_data_caster[MM_index[3]] to damage MM_data_damage_target[MM_index[3]], dealing (25.00 x (Real((Level of Magic Missile for MM_data_caster[MM_index[3]])))) damage of attack type Hero and damage type Normal
                          • Special effect - Create a special effect at MM_data_location_damage_target[MM_index[3]] using Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl
                          • Set MM_data_special_effect[MM_index[3]] = (Last created special effect)
                          • Special effect - Destroy MM_data_special_effect[MM_index[3]]
                          • Unitgroup - Add MM_data_damage_target[MM_index[3]] to MM_data_group_hitten[MM_index[3]]
                        • 'ELSE'-Actions
                • 'ELSE'-Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • 'IF'-Conditions
                      • MM_data_boolean[MM_index[3]] equal to False
                    • 'THEN'-Actions
                      • Set MM_data_number_jumps[MM_index[3]] = (MM_data_number_jumps[MM_index[3]] - 1)
                      • Unitgroup - Remove all units from MM_data_group_hitten[MM_index[3]]
                      • Set MM_data_boolean[MM_index[3]] = True
                    • 'ELSE'-Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • 'IF'-Conditions
                      • MM_data_distance[MM_index[3]] smaller then (Distance between MM_data_location_tower[MM_index[3]] and MM_data_location_tower_2[MM_index[3]])
                    • 'THEN'-Actions
                      • Set MM_data_back[MM_index[3]] = True
                      • Set MM_data_location_tower[MM_index[3]] = (Position of MM_data_dummy_tower[MM_index[3]])
                      • Set MM_data_location_tower_2[MM_index[3]] = (Position of MM_data_dummy_tower_2[MM_index[3]])
                      • Set MM_data_location_dummy[MM_index[3]] = (Position of MM_data_dummy[MM_index[3]])
                      • Set MM_data_location_move[MM_index[3]] = (MM_data_location_dummy[MM_index[3]] offset by 30.00 towards (Angle from MM_data_location_dummy[MM_index[3]] to MM_data_location_tower[MM_index[3]]) degrees)
                      • Unit - Move MM_data_dummy[MM_index[3]] instantly to MM_data_location_move[MM_index[3]]
                      • Set MM_data_distance[MM_index[3]] = (Distance between MM_data_location_dummy[MM_index[3]] and MM_data_location_tower_2[MM_index[3]])
                      • Set MM_data_group[MM_index[3]] = (Units within 200.00 of MM_data_location_dummy[MM_index[3]])
                      • Unirgroup - Pick every unit in MM_data_group[MM_index[3]] and do (Actions)
                        • Loop - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • 'IF'-Conditions
                              • (((((Picked unit) is a building) equal to False) and (((Picked unit) is mechanic) equal to False)) and ((((Picked unit) is an ancient) equal to False) and (((Picked unit) is immune against magic) equal to False))) and ((((Picked unit) is alive) equal to True) and ((((Picked unit) belongs to an enemy of (Owner of MM_data_caster[MM_index[3]])) equal to True) and (((Picked unit) is in MM_data_group_hitten[MM_index[3]]) equal to False)))
                            • 'THEN'-Actions
                              • Set MM_data_damage_target[MM_index[3]] = (Picked unit)
                              • Set MM_data_location_damage_target[MM_index[3]] = (Position of MM_data_damage_target[MM_index[3]])
                              • Unit - Cause MM_data_caster[MM_index[3]] to damage MM_data_damage_target[MM_index[3]], dealing (25.00 x (Real((Level of Magic Missile for MM_data_caster[MM_index[3]])))) damage of attack type Hero and damage type Normal
                              • Special effect - Create a special effect at MM_data_location_damage_target[MM_index[3]] using Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl
                              • Set MM_data_special_effect[MM_index[3]] = (Last created special effect)
                              • Special effect - Destroy MM_data_special_effect[MM_index[3]]
                              • Unit group - Add MM_data_damage_target[MM_index[3]] to MM_data_group_hitten[MM_index[3]]
                            • 'ELSE'-Actions
                    • 'ELSE'-Actions
                      • Set MM_data_back[MM_index[3]] = False
            • 'ELSE'-Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • 'IF'-Conditions
                  • MM_data_boolean_2[MM_index[3]] equal to False
                • 'THEN'-Actions
                  • Set MM_data_boolean_2[MM_index[3]] = True
                  • Unit - Remove MM_data_dummy[MM_index[3]] from the game
                  • Unit - Remove MM_data_dummy_tower[MM_index[3]] from the game
                  • Unit - Remove MM_data_dummy_tower_2[MM_index[3]] from the game
                    • Custom script: call RemoveLocation(udg_MM_data_location_caster[udg_MM_index[3]])
                    • Custom script: call RemoveLocation(udg_MM_data_location_dummy[udg_MM_index[3]])
                    • Custom script: call RemoveLocation(udg_MM_data_location_tower[udg_MM_index[3]])
                    • Custom script: call RemoveLocation(udg_MM_data_location_tower_2[udg_MM_index[3]])
                    • Custom script: call RemoveLocation(udg_MM_data_location_target[udg_MM_index[3]])
                    • Custom script: call RemoveLocation(udg_MM_data_location_damage_target[udg_MM_index[3]])
                    • Custom script: call RemoveLocation(udg_MM_data_location_move[udg_MM_index[3]])
                    • Custom script: call DestroyGroup(udg_MM_data_group[udg_MM_index[3]])
                    • Custom script: call DestroyGroup(udg_MM_data_group_hitten[udg_MM_index[3]])
                    • Set MM_index[1] = (MM_index[1] - 1)
                    • Set MM_index[3] = (MM_index[3] - 1)
                    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • 'IF'-Conditions
                        • MM_index[1] equal to 0
                      • 'THEN'-Actions
                        • Trigger - Turn off Magic Missile Move <gen>
                      • 'ELSE'-Actions
                • 'ELSE'-Actions
Puh... my World Editor is german so I need to write things like Unit from Einheit to Unit...

Keywords:
Magic, Missile, mgic missile, frost, tower
Contents

Magic Missile (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. 7 Aug 2011 Bribe You are leaking in at least one area, you don't destroy one of the unit groups from the looping trigger. Your indexing is also extremely bad and outdated. You might...

Moderator

M

Moderator

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

7 Aug 2011
Bribe

You are leaking in at least one area, you don't destroy one of the unit groups from the looping trigger.

Your indexing is also extremely bad and outdated. You might want to switch to Hanky's Dynamic Indexing, hashtables or Unit Indexer.

http://www.hiveworkshop.com/forums/spells-569/gui-dynamic-indexing-template-144325/?prev=d%3Dlist%26r%3D20%26u%3Dhanky

or
http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/complete-beginners-guide-hashtables-197381/

or
http://www.hiveworkshop.com/forums/spells-569/gui-unit-indexer-1-2-0-2-a-197329/
 
Level 9
Joined
Jan 12, 2010
Messages
454
Okay first off what is this spell suppose to do? Its a good idea to clue us all in to that somewhere in the description.

It looks like a storm bolt with an AOE effect of some kind, thats my guess anyhow. Tell us a little more about this spell and then we can help you with feedback.

Regards,

Jake
 
Top