Homing Missile v1.0

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
I've been making my own spells ever since I started making maps, I made a lot of GUI spells and I use them in my map.
This is the latest spell that I made and the first spell that I uploaded here in THW :D hope you like it! Don't forget to give me credits :3

Homing Missile
-Creates 3/4/5/6 magic spirits that seeks enemies within 1000 AoE
dealing with 50/60/70/80 damage per spirit.

Cooldown: 5


  • HM Cast
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being Cast) Equal to Homing Missile
  • Actions
    • Set HM_Count[0] = (2 + (Level of (Ability being cast) for (triggering unit)))
    • Set HM_Count[1] = 0
    • Set HM_Unit_Type = HM Dummy
    • For each (Integer HM_Count[1]) from 1 to HM_Count[0], do (Actions)
      • Loop - Actions
        • If (All Conditions are Ture) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • HM_Mui[0] Less than or equal to 0
          • Then - Actions
            • Trigger - Turn on HM Loop <gen>
          • Else - Actions
        • Set HM_Mui[0] = (HM_Mui[0] + 1)
        • Set HM_Mui[1] = (HM_Mui[1] + 1)
        • -------- HM_Check_Homing = Set this to true if you want the spirits to come back to your hero. -------
        • Set HM_Check_Homing[HM_Mui[1]] = True
        • Set HM_Unit_Caster[HM_Mui[1]] = (Triggering unit)
        • Set HM_Point_Caster[HM_Mui[1]] = (Position of HM_Unit_Caster[HM_Mui[1]])
        • Set HM_Angle[HM_Mui[1]] = (Random angle)
        • Unit - Create 1 HM_Unit_Type for (Owner of HM_Unit_Caster[HM_Mui[1]]) at HM_Poit_Caster[HM_Mui[1]] facing HM_Angle[HM_Mui[1]] degrees
        • Set HM_Unit_Dummy[HM_Mui[1]] = (Last created unit)
        • -------- Variable Settings --------
        • Set HM_Damage[HM_Mui[1]] = (40.00 + (10.00 x (Real((Level of (Ability being cast) for HM_Unit_Caster[HM_Mui[1]])))))
        • Set HM_Distance[HM_Mui[1]] = 500.00
        • Set HM_Speed[HM_Mui[1]] = 25.00
        • Set HM_Speed_Add[HM_Mui[1]] = 0.00
        • If (All Conditions are Ture) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Random integer number between 1 and 2) Equal to 1
          • Then - Actions
            • Set HM_Angle_Add[HM_Mui[1]] = -5.00
          • Else - Actions
            • Set HM_Angle_Add[HM_Mui[1]] = 5.00
        • Custom script: call RemoveLocation (udg_HM_Point_Caster[udg_HM_Mui[1]])
  • HM Loop
  • Events
    • Time - Every 0.03 seconds of game time
  • Conditions
  • Actions
    • For each (Integer HM_Mui[2]) from 1 to HM_Mui[1], do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • HM_Distance[HM_Mui[2]] Greater than 0.00
          • Then - Actions
            • Set HM_Speed_Add[HM_Mui[2]] = (HM_Speed_Add[HM_Mui[2]] - 0.10)
            • Set HM_Speed[HM_Mui[2]] = (HM_Speed[HM_Mui[2]] + HM_Speed_Add[HM_Mui[2]])
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • HM_Speed[HM_Mui[2]] Less than or equal to 5.00
              • Then - Actions
                • HM_Speed[HM_Mui[2]] = 5.00
              • Else - Actions
            • Set HM_Distance[HM_Mui[2]] = HM_Distance[HM_Mui[2]] - HM_Speed[HM_Mui[2]])
            • Set HM_Angle[HM_Mui[2]] = (HM_Angle[HM_Mui[2]] + HM_Angle_Add[HM_Mui[2]])
            • If (All Conditions are Ture) then do (Then Actions) else do (Else Actions)
              • If Conditions
                • HM_Angle[HM_Mui[2]] Less than or equal to 0.00
              • Then Actions
                • Set HM_Angle[HM_Mui[2]] = 360.00
              • Else Actions
            • If (All Conditions are Ture) then do (Then Actions) else do (Else Actions)
              • If Conditions
                • HM_Angle[HM_Mui[2]] Greater than or equal to 360.00
              • Then Actions
                • Set HM_Angle[HM_Mui[2]] = 0.00
              • Else Actions
            • Set HM_Point_Dummy[HM_Mui[2]] = (Position of HM_Unit_Dummy[HM_Mui[2]])
            • Set HM_Point_Dummy_Offset[HM_Mui[2]] = (HM_Point_Dummy[HM_Mui[2]] offset by HM_Speed[HM_Mui[2]] towards HM_Angle[HM_Mui[2]] degrees)
            • Unit - Move HM_Unit_Dummy[HM_Mui[2]] instantly to HM_Point_Dummy_Offset[HM_Mui[2]], facing HM_Angle[HM_Mui[2]] degrees
            • If (All Conditions are Ture) then do (Then Actions) else do (Else Actions)
              • If Conditions
                • HM_Distance[HM_Mui[2]] Less than or equal to 0.00
              • Then Actions
                • -------- I will not put the matching trigger here because its too long, it matches if the unit is alive, belongs to enemy and visible to player -------
                • Set HM_Group[HM_Mui[2]] = (Random 1 units from (Units within 1000.00 of HM_Point_Dummy_Offset[HM_Mui[2]] matching (((Matching unit) is etc..)
                • If (All Conditions are True) Then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • (Number of units in HM_Group[HM_Mui[2]]) Not equal to 0
                  • Then - Actions
                    • Unit Group - Pick every unit in HM_Group[HM_Mui[2]] and do (Actions)
                      • Loop - Actions
                        • Set HM_Unit_Target[HM_Mui[2]] = (Picked unit)
                  • Else Actions
                    • If (All Conditions are True) then do (Then Actions) elso do (Else Actions)
                      • If - Conditions
                        • HM_Check_Homing[HM_Mui[2]] Equal to True
                      • Then - Actions
                        • Set HM_Unit_Target[HM_Mui[2]] = HM_Unit_Caster[HM_Mui[2]]
                      • Else - Actions
                        • Set HM_Unit_Target[HM_Mui[2]] = No unit
                • Special Effect - Create a special effect at HM_Point_Dummy[HM_Mui[2]] using Abilities\Spells\Undead\AbsorbManaBirthMissile.mdl
                • Special Effect - Destroy (Last created special effect)
                • Set HM_Point_Target[HM_Mui[2]] = Position of HM_Unit_Target[HM_Mui[2]]
                • Set HM_Distance2[HM_Mui[2]] = (Distance between HM_Point_Dummy[HM_Mui[2]] and HM_Point_Target[HM_Mui[2]]
                • Custom script: call RemoveLocation (udg_HM_Point_Target[udg_HM_Mui[2]])
                • Custom script: call DestroyGroup (udg_HM_Group[udg_HM_Mui[2]])
                • Set HM_Distance[HM_Mui[2]] = 0.00
                • Set HM_Speed_Add[HM_Mui[2]] = 0.00
              • Else Actions
            • Custom script: call RemoveLocation (udg_HM_Point_Dummy[udg_HM_Mui[2]])
            • Custom script: call RemoveLocation (udg_HM_Point_Dummy_Offset[udg_HM_Mui[2]])
          • Else - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • HM_Distance2[HM_Mui[2]] Greater than 0.00
            • Then - Actions
              • Set HM_Point_Target[HM_Mui[2]] = (Position of HM_Unit_Target[HM_Mui[2]])
              • Set HM_Point_Dummy[HM_Mui[2]] = (Position of HM_Unit_Dummy[HM_Mui[2]])
              • Set HM_Angle[HM_Mui[2]] = (Angle from HM_Point_Dummy[HM_Mui[2]] to HM_Point_Target[HM_Mui[2]])
              • Set HM_Point_Dummy_Offset[HM_Mui[2]] = (HM_Point_Dummy[HM_Mui[2]] offset by HM_Speed[HM_Mui[2]] towards HM_Angle[HM_Mui[2]] degrees
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (HM_Unit_Target[HM_Mui[2]] is dead) Equal to True
                • Then - Actions
                  • -------- I will not put the matching trigger here because its too long, it matches if the unit is alive, belongs to enemy and visible to player -------
                  • Set HM_Group[HM_Mui[2]] = (Random 1 units from (Units within 1000.00 of HM_Point_Dummy_Offset[HM_Mui[2]] matching (((Matching unit) is etc..)
                  • If (All Conditions are True) Then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Number of units in HM_Group[HM_Mui[2]]) Not equal to 0
                    • Then - Actions
                      • Unit Group - Pick every unit in HM_Group[HM_Mui[2]] and do (Actions)
                        • Loop - Actions
                          • Set HM_Unit_Target[HM_Mui[2]] = (Picked unit)
                    • Else Actions
                      • If (All Conditions are True) then do (Then Actions) elso do (Else Actions)
                        • If - Conditions
                          • HM_Check_Homing[HM_Mui[2]] Equal to True
                        • Then - Actions
                          • Set HM_Unit_Target[HM_Mui[2]] = HM_Unit_Caster[HM_Mui[2]]
                        • Else - Actions
                          • Set HM_Unit_Target[HM_Mui[2]] = No unit
                  • Custom script: call DestroyGroup (udg_HM_Group[udg_HM_Mui[2]])
                • Else - Acitons
              • Set HM_Speed_Add[HM_Mui[2]] = (HM_Speed_Add[HM_Mui[2]] + 0.15)
              • Set HM_Speed[HM_Mui[2]] = (HM_Speed[HM_Mui[2]] + HM_Speed_Add[HM_Mui[2]])
              • -------- --------
              • Set HM_Distance2[HM_Mui[2]] = (HM_Distance2[HM_Mui[2]] - HM_Speed[HM_Mui[2]])
              • Set HM_Distance2[HM_Mui[2]] = (Distance between HM_Point_Dummy[HM_Mui[2]] -and HM_Point_Target[HM_Mui[2]])
              • Unit - Move HM_Unit_Dummy[HM_Mui[2]] instantly to HM_Point_Dummy_Offset[HM_Mui[2]], facing HM_Angle[HM_Mui[2]] degrees
              • -------- --------
              • Custom script: call RemoveLocation (udg_HM_Point_Dummy[udg_HM_Mui[2]])
              • Custom script: call RemoveLocation (udg_HM_Point_Dummy_Offset[udg_HM_Mui[2]])
              • Custom script: call RemoveLocation (udg_HM_Point_Target[udg_HM_Mui[2]])
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • HM_Distance2[HM_Mui[2]] Less than or equal to 100.00
                      • HM_Unit_Target[HM_Mui[2]] Equal to No unit
                • Then - Actions
                  • If (All Conditions are Ture) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • HM_Unit_Target[HM_Mui[2]] Not equal to HM_Unit_Caster[HM_Mui[2]]
                    • Then - Actions
                      • Unit - Cause HM_Unit_Caster[HM_Mui[2]] to damage HM_Unit_Target[HM_Mui[2]], dealing HM_Damage[HM_Mui[2]] damage of attack type Spells
                    • Else - Actions
                  • Special Effect - Create a special effect attached to the chest of HM_Unit_Target[HM_Mui[2]] using Abilities\Spells\Undead\AbsorbManaBirthMissile.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Unit - Kill HM_Unit_Dummy[HM_Mui[2]]
                  • Set HM_Unit_Caster[HM_Mui[2]] = No unit
                  • Set HM_Unit_Dummy[HM_Mui[2]] = No unit
                  • Set HM_Unit_Target[HM_Mui[2]] = No unit
                  • Set HM_Distance2[HM_Mui[2]] = 0.00
                  • Set HM_Angle[HM_Mui[2]] = 0.00
                  • Set HM_Angle_Add[HM_Mui[2]] = 0.00
                  • Set HM_Speed[HM_Mui[2]] = 0.00
                  • Set HM_Speed_Angle[HM_Mui[2]] = 0.00
                  • Set HM_Damage[HM_Mui[2]] = 0.00
                  • Set HM_Mui[0] = (HM_Mui[0] -1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • HM_Mui[0] Less than or equal to 0
                    • Then - Actions
                      • Trigger - Turn off (This trigger)
                      • Set HM_Mui[0] = 0
                      • Set HM_Mui[1] = 0
                    • Else - Actions
                • Else - Actions
            • Else - Actions


Keywords:
Homing, Missile, Spell, Seeking, Magic
Contents

Homing Missile by Venger07 (Map)

Reviews
BPower: Review. There is a lot for you. 15:36, 20th Jul 2015 BPower:
Level 12
Joined
Mar 29, 2012
Messages
530

REVIEW|Homing Missile|v1.0

Rating: 2/5

PROS
  • The spell is MUI.
  • Fun to cast.
  • Unique.
  • Support levels.
CONS
  • Currently your indexing system is out of date.
SUGGESTIONS
  • Just work on the indexing system first
[/TD][/tr]
If you have any question about this review, PM or VM me
 
Level 12
Joined
Dec 21, 2010
Messages
476
Your spell requires a configuration trigger.

I recommend you to take a look into our "Dynamic Indexing" tutorial. You can find
the link in my signature.

configuration trigger?

Currently your indexing system is out of date.

Sorry, I don't know the latest update of the indexing system :v

Why are you using an array inside an array with the temporary locations when the locations do not need to be an array to begin with?

How is it different if I use a non-array points?

use Neutral Passive Player instead for those dummies ^^

I used owner of caster because I wanted to have a sight radius for each dummy.
 
Level 12
Joined
Mar 29, 2012
Messages
530
@venger07
configuration trigger?
It's a trigger where the user can configure the whole spell.
You can take a look on my approved spell for example.

How is it different if I use a non-array points?
Arrayed variables are meant to be used by more than one trigger or through the whole process of the spell since it can store different values.

I used owner of caster because I wanted to have a sight radius for each dummy.
It can affect the player score at the end game scoreboard.
 
Level 12
Joined
Dec 21, 2010
Messages
476
@venger07

It's a trigger where the user can configure the whole spell.
You can take a look on my approved spell for example.


Arrayed variables are meant to be used by more than one trigger or through the whole process of the spell since it can store different values.


It can affect the player score at the end game scoreboard.

-well ,he can configure the spell under the variable settings..

-I mean, what's the difference between array and non-array point anyway? is there a big deal or a big lag?




Manipulate sight radius through triggers instead,
-how ? @[email protected]
 
Level 19
Joined
Mar 18, 2012
Messages
1,717
Before updating the spell again, please be sure
the following changes are made.

1. Provide a configuration trigger.
Users should be able to easily configurate your spell in there.
This should cover abilityId, damage, distance, speed, aoe, .....

2. Use the data complexity which fits the situation
Use arrays wherever they are required. For example in
Point_Caster a non-array could and should be used ( clean coding, memory, speed ).
Another example would be when you do a group enumeration.

3. Remove all hardcoded stuff
All of this should be covered in the config trigger and stored into variables.

I think it will take time and updates until this spell can be approved.

For now: Set to Need Fix
 
Top