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

[Tutorial] Projectile-Based Triggered Spell System

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
v1.3 Build 7

Projectile-Based Triggered Spell System Template:



- Flare Gun
- Ice Blast
- Mystic Dagger (GUI/MUI)
- Graviton Hammer (GUI/MUI)


The point of this tutorial, is to introduce a new system; PTS or Projectile-Based Triggered Spell System. It is a type of system, in which it accounts the buff applied that requires a spell to use the WC3 auto-generated projectile entity to properly time and trigger a set of commands.

I made this, because i was always having hard time (easily bored) creating dummy units and making them move towards a target, when the impact is misaligned as well. Imagine making a MUI with manual projectiles, that would be ages before it gets finished.

Newbies can also use this easily, as it is easy to create and calibrate as it doesn't need special movements. It's good as a Novice - Intermediate triggering level spells.

The first two abilities; Flare Gun and Ice Blast are not MUI. To show how the system works, as simple as possible, and that is being "NON-MUI"




  • Flare Gun Initiate
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Flare Gun
    • Actions
      • Set FGCaster = (Triggering unit)
      • Set FGTarget = (Target unit of ability being cast)
      • Set FGDamage = (50.00 + (50.00 x (Real((Level of Flare Gun for FGCaster)))))
      • Set FGMainDamage = (-25.00 + (125.00 x (Real((Level of Flare Gun for FGCaster)))))
      • Set FGMotionBuffer = 50
      • Trigger - Turn on Flare Gun Validating Trigger <gen>
  • Flare Gun Validating Trigger
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set FGMotionBuffer = (FGMotionBuffer - 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • FGMotionBuffer Greater than 0
              • (FGTarget has buff Flaregun ) Equal to True
        • Then - Actions
          • Unit - Remove Flaregun buff from FGTarget
          • Set TempLoc00 = (Position of FGTarget)
          • Set TempGroup00 = (Units within 150.00 of TempLoc00 matching ((((Matching unit) belongs to an enemy of (Owner of FGCaster)) Equal to True) and (((Matching unit) is alive) Equal to True)))
          • Unit Group - Pick every unit in TempGroup00 and do (Actions)
            • Loop - Actions
              • Unit - Cause FGCaster to damage (Picked unit), dealing FGDamage damage of attack type Magic and damage type Fire
              • Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Items\AIfb\AIfbSpecialArt.mdl
              • Special Effect - Destroy (Last created special effect)
          • Special Effect - Create a special effect at TempLoc00 using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
          • Special Effect - Destroy (Last created special effect)
          • Unit - Cause FGCaster to damage FGTarget, dealing FGMainDamage damage of attack type Magic and damage type Fire
          • Trigger - Turn off (This trigger)
          • Set FGCaster = No unit
          • Set FGTarget = No unit
          • Set FGDamage = 0.00
          • Set FGMainDamage = 0.00
          • Custom script: call DestroyGroup (udg_TempGroup00)
          • Custom script: call RemoveLocation (udg_TempLoc00)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • FGMotionBuffer Less than or equal to 0
              • FGTarget Equal to No unit
              • (FGTarget is dead) Equal to True
        • Then - Actions
          • Unit - Remove Flaregun buff from FGTarget
          • Trigger - Turn off (This trigger)
          • Set FGCaster = No unit
          • Set FGTarget = No unit
          • Set FGDamage = 0.00
          • Set FGMainDamage = 0.00
        • Else - Actions


  • Ice Blast Initiate
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Ice Blast
    • Actions
      • Set IBCaster = (Triggering unit)
      • Set IBTarget = (Target unit of ability being cast)
      • Set IBLevel = (Level of Ice Blast for IBCaster)
      • Set IBMainDamage = (-25.00 + (125.00 x (Real((Level of Flare Gun for FGCaster)))))
      • Set IBMotionBuffer = 50
      • Trigger - Turn on Ice Blast Validating Trigger <gen>
  • Ice Blast Validating Trigger
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set IBMotionBuffer = (IBMotionBuffer - 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • IBMotionBuffer Greater than 0
              • (IBTarget has buff Ice Blast Validating ) Equal to True
        • Then - Actions
          • Set TempLoc00 = (Position of IBTarget)
          • Special Effect - Create a special effect at TempLoc00 using Abilities\Spells\Undead\FreezingBreath\FreezingBreathMissile.mdl
          • Special Effect - Destroy (Last created special effect)
          • Special Effect - Create a special effect at TempLoc00 using Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • Unit - Create 1 ICEBLAST for (Owner of IBCaster) at TempLoc00 facing Default building facing degrees
          • Unit - Set level of Ice-Blast Slow for (Last created unit) to IBLevel
          • Unit - Order (Last created unit) to Human Mountain King - Thunder Clap
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Unit - Cause IBCaster to damage IBTarget, dealing IBMainDamage damage of attack type Magic and damage type Cold
          • Unit - Remove Ice Blast Validating buff from IBTarget
          • Trigger - Turn off (This trigger)
          • Set IBCaster = No unit
          • Set IBTarget = No unit
          • Set IBLevel = 0
          • Set IBMainDamage = 0.00
          • Custom script: call RemoveLocation (udg_TempLoc00)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • IBMotionBuffer Less than or equal to 0
              • IBTarget Equal to No unit
              • (IBTarget is dead) Equal to True
        • Then - Actions
          • Unit - Remove Ice Blast Validating buff from IBTarget
          • Trigger - Turn off (This trigger)
          • Set IBCaster = No unit
          • Set IBTarget = No unit
          • Set IBLevel = 0
          • Set IBMainDamage = 0.00
        • Else - Actions


  • Mystic Dagger Initiate
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Mystic Dagger
          • (Ability being cast) Equal to Mystic Dagger MUI (Neutral Hostile)
    • Actions
      • Set MD_MUI_INDEX = (MD_MUI_INDEX + 1)
      • Set MDCaster[MD_MUI_INDEX] = (Triggering unit)
      • Set MDTarget[MD_MUI_INDEX] = (Target unit of ability being cast)
      • Set MDDamage[MD_MUI_INDEX] = (60.00 + (60.00 x (Real((Level of Mystic Dagger for MDCaster[MD_MUI_INDEX])))))
      • Set MDCastPoint[MD_MUI_INDEX] = (Position of MDCaster[MD_MUI_INDEX])
      • Set MDMotionBuffer[MD_MUI_INDEX] = 50
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Mystic Dagger MUI (Neutral Hostile)
        • Then - Actions
          • Set MDMotionBuffer[MD_MUI_INDEX] = 500
        • Else - Actions
      • Trigger - Turn on Mystic Dagger Validating Trigger <gen>
  • Mystic Dagger Validating Trigger
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer Temp_Integer_A) from 1 to MD_MUI_INDEX, do (Actions)
        • Loop - Actions
          • Set MDMotionBuffer[Temp_Integer_A] = (MDMotionBuffer[Temp_Integer_A] - 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • MDMotionBuffer[Temp_Integer_A] Less than or equal to 0
                  • (MDTarget[Temp_Integer_A] is dead) Equal to True
                  • (MDTarget[Temp_Integer_A] has buff Mystic Dagger Validation (Pause)) Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • And - All (Conditions) are true
                    • Conditions
                      • MDMotionBuffer[Temp_Integer_A] Greater than 0
                      • (MDCaster[Temp_Integer_A] is alive) Equal to True
                      • (MDTarget[Temp_Integer_A] is alive) Equal to True
                • Then - Actions
                  • Unit - Remove Mystic Dagger Validation (Pause) buff from MDTarget[Temp_Integer_A]
                  • Set TempLoc00 = (Position of MDTarget[Temp_Integer_A])
                  • Set TempLoc01 = (TempLoc00 offset by 90.00 towards (Angle from TempLoc00 to MDCastPoint[Temp_Integer_A]) degrees)
                  • Special Effect - Create a special effect at TempLoc01 using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Special Effect - Create a special effect attached to the chest of MDTarget[Temp_Integer_A] using Abilities\Weapons\HydraliskImpact\HydraliskImpact.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Unit - Cause MDCaster[Temp_Integer_A] to damage MDTarget[Temp_Integer_A], dealing MDDamage[Temp_Integer_A] damage of attack type Magic and damage type Normal
                  • Unit - Move MDCaster[Temp_Integer_A] instantly to TempLoc01, facing TempLoc00
                  • Unit - Order MDCaster[(Integer A)] to Attack MDTarget[Temp_Integer_A]
                  • Animation - Play MDCaster[(Integer A)]'s attack animation
                  • Custom script: call RemoveLocation (udg_TempLoc01)
                  • Custom script: call RemoveLocation (udg_TempLoc00)
                • Else - Actions
              • -------- These lines confirms that the ability is finished, and removes the listed target from the list. --------
              • Set MDCaster[Temp_Integer_A] = MDCaster[MD_MUI_INDEX]
              • Set MDTarget[Temp_Integer_A] = MDTarget[MD_MUI_INDEX]
              • Set MDDamage[Temp_Integer_A] = MDDamage[MD_MUI_INDEX]
              • Set MDMotionBuffer[Temp_Integer_A] = MDMotionBuffer[MD_MUI_INDEX]
              • Set MDCastPoint[Temp_Integer_A] = MDCastPoint[MD_MUI_INDEX]
              • Set MDCaster[MD_MUI_INDEX] = No unit
              • Set MDTarget[MD_MUI_INDEX] = No unit
              • Set MDDamage[MD_MUI_INDEX] = 0.00
              • Set MDMotionBuffer[MD_MUI_INDEX] = 0
              • Custom script: call RemoveLocation (udg_MDCastPoint[udg_MD_MUI_INDEX])
              • Set MD_MUI_INDEX = (MD_MUI_INDEX - 1)
              • Set Temp_Integer_A = (Temp_Integer_A - 1)
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MD_MUI_INDEX Less than or equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions




  • Graviton Hammer Initiate
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Graviton Hammer
    • Actions
      • -------- ------- --------
      • Set GH_MUI_INDEX = (GH_MUI_INDEX + 1)
      • Set GH_Caster[GH_MUI_INDEX] = (Triggering unit)
      • Set GH_Target[GH_MUI_INDEX] = (Target unit of ability being cast)
      • Set GH_Motion_Buffer[GH_MUI_INDEX] = 100
      • Set GH_Level[GH_MUI_INDEX] = (Level of Graviton Hammer for GH_Caster[GH_MUI_INDEX])
      • Set GH_Curr_Lv[GH_MUI_INDEX] = ((GH_Level[GH_MUI_INDEX] x 5) - 4)
      • -------- You can just remove it, and the Graviton Hammer Impact <gen>. --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Target unit of ability being cast) is in GD_Registered) Equal to False
        • Then - Actions
          • Trigger - Add to Graviton Hammer Impact <gen> the event (Unit - (Target unit of ability being cast) Takes damage)
          • Unit Group - Add (Target unit of ability being cast) to GD_Registered
        • Else - Actions
      • -------- ------- --------
      • -------- Trigger checking purposes, to monitor if the level increase through time is working. You can just Remove these. --------
      • Floating Text - Create floating text that reads (String(GH_Level[GH_MUI_INDEX])) above GH_Caster[GH_MUI_INDEX] with Z offset 64.00, using font size 15.00, color (0.00%, 0.00%, 100.00%), and 0.00% transparency
      • Floating Text - Set the velocity of (Last created floating text) to 128.00 towards 90.00 degrees
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
      • Floating Text - Change the fading age of (Last created floating text) to 1.50 seconds
      • -------- ------- --------
      • Trigger - Turn on Graviton Hammer Loop <gen>
      • -------- The lines below are the result of failed attempt to put the trigger in the "Unit - Takes Damage" Event. --------
  • Graviton Hammer Validation
    • Events
      • Time - Every 0.04 seconds of game time
    • Conditions
    • Actions
      • For each (Integer Temp_Integer_A) from 1 to GH_MUI_INDEX, do (Actions)
        • Loop - Actions
          • -------- ------- --------
          • -------- MUI CHECKING PURPOSES --------
          • -------- You can just remove these if you try to implement it in your map. --------
          • Special Effect - Create a special effect attached to the chest of GH_Target[Temp_Integer_A] using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
          • Special Effect - Destroy (Last created special effect)
          • -------- ------- --------
          • Set GH_Motion_Buffer[Temp_Integer_A] = (GH_Motion_Buffer[Temp_Integer_A] - 1)
          • For each (Integer Temp_Integer_B) from 1 to 4, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • GH_Motion_Buffer[Temp_Integer_A] Equal to (100 - (Temp_Integer_B x 10))
                • Then - Actions
                  • Set GH_Curr_Lv[Temp_Integer_A] = ((GH_Level[Temp_Integer_A] x 5) + (Temp_Integer_B - 4))
                  • -------- ------- --------
                  • -------- Trigger checking purposes, to monitor if the level increase through time is working. You can just Remove these. --------
                  • Floating Text - Create floating text that reads (String(GH_Curr_Lv[Temp_Integer_A])) above GH_Target[Temp_Integer_A] with Z offset 64.00, using font size 15.00, color (0.00%, 0.00%, 100.00%), and 0.00% transparency
                  • Floating Text - Set the velocity of (Last created floating text) to 128.00 towards 90.00 degrees
                  • Floating Text - Change (Last created floating text): Disable permanence
                  • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
                  • Floating Text - Change the fading age of (Last created floating text) to 1.50 seconds
                  • -------- ------- --------
                • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (GH_Target[Temp_Integer_A] is dead) Equal to True
                  • GH_Motion_Buffer[Temp_Integer_A] Less than or equal to 0
            • Then - Actions
              • Unit - Remove Graviton Hammer Validation (Pause) buff from GH_Target[Temp_Integer_A]
              • Set GH_Caster[Temp_Integer_A] = GH_Caster[GH_MUI_INDEX]
              • Set GH_Target[Temp_Integer_A] = GH_Target[GH_MUI_INDEX]
              • Set GH_Level[Temp_Integer_A] = GH_Level[MD_MUI_INDEX]
              • Set GH_Curr_Lv[Temp_Integer_A] = GH_Curr_Lv[GH_MUI_INDEX]
              • Set GH_Motion_Buffer[Temp_Integer_A] = GH_Motion_Buffer[GH_MUI_INDEX]
              • Set GH_Caster[GH_MUI_INDEX] = No unit
              • Set GH_Target[GH_MUI_INDEX] = No unit
              • Set GH_Curr_Lv[GH_MUI_INDEX] = 0
              • Set GH_MUI_INDEX = (GH_MUI_INDEX - 1)
              • Set Temp_Integer_A = (Temp_Integer_A - 1)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • GH_ImpactMode Equal to False
                  • GH_Motion_Buffer[Temp_Integer_A] Greater than 0
                  • (GH_Target[Temp_Integer_A] has buff Graviton Hammer Validation (Pause)) Equal to True
            • Then - Actions
              • Set TempLoc00 = (Position of GH_Target[Temp_Integer_A])
              • Unit - Remove Graviton Hammer Validation (Pause) buff from GH_Target[Temp_Integer_A]
              • Unit - Create 1 GRAVITONHAMMER for (Owner of GH_Caster[Temp_Integer_A]) at TempLoc00 facing Default building facing degrees
              • Unit - Set level of Graviton Hammer Stun for (Last created unit) to GH_Curr_Lv[Temp_Integer_A]
              • Unit - Order (Last created unit) to Orc Tauren Chieftain - War Stomp
              • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
              • Special Effect - Create a special effect attached to the chest of GH_Target[Temp_Integer_A] using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
              • Special Effect - Destroy (Last created special effect)
              • Custom script: call RemoveLocation (udg_TempLoc00)
              • Set GH_Caster[Temp_Integer_A] = GH_Caster[GH_MUI_INDEX]
              • Set GH_Target[Temp_Integer_A] = GH_Target[GH_MUI_INDEX]
              • Set GH_Level[Temp_Integer_A] = GH_Level[GH_MUI_INDEX]
              • Set GH_Curr_Lv[Temp_Integer_A] = GH_Curr_Lv[GH_MUI_INDEX]
              • Set GH_Motion_Buffer[Temp_Integer_A] = GH_Motion_Buffer[GH_MUI_INDEX]
              • Set GH_Caster[GH_MUI_INDEX] = No unit
              • Set GH_Target[GH_MUI_INDEX] = No unit
              • Set GH_Curr_Lv[GH_MUI_INDEX] = 0
              • Set GH_MUI_INDEX = (GH_MUI_INDEX - 1)
              • Set Temp_Integer_A = (Temp_Integer_A - 1)
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • GH_MUI_INDEX Less than or equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
The cleanup is necessary, as the damage originates from an object rather than trigger to save some lines.

  • Graviton Hammer Cleanup
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to GRAVITONHAMMER
    • Actions
      • -------- While making the Dummy Units at Neutral Extra will not modify the scoreboards. --------
      • -------- If you do that, then the credit will not be on the actual player since the damage is done by objects, not by trigger. --------
      • Unit - Remove (Triggering unit) from the game
Unfortunately, i failed miserably in implementing the "Unit - Takes Damage" event as Maker suggested for a more accurate timing. I don't know if it was me or it's just never going to happen. But my findings are accessible. Just press the "Esc" key to change between impact types. You may just remove the unnecessary lines, as they are just for demonstration.

  • Graviton Hammer Impact
    • Events
    • Conditions
    • Actions
      • -------- This is Unused. It's a failed attempt of putting "Unit Takes Damage" Event. --------
      • For each (Integer Temp_Integer_A) from 1 to GH_MUI_INDEX, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • (GH_Target[Temp_Integer_A] is alive) Equal to True
                  • GH_ImpactMode Equal to True
                  • GH_Motion_Buffer[Temp_Integer_A] Greater than 0
                  • (GH_Target[Temp_Integer_A] has buff Graviton Hammer Validation (Pause)) Equal to True
            • Then - Actions
              • Set TempLoc00 = (Position of GH_Target[Temp_Integer_A])
              • Unit - Remove Graviton Hammer Validation (Pause) buff from GH_Target[Temp_Integer_A]
              • Unit - Create 1 GRAVITONHAMMER for (Owner of GH_Caster[Temp_Integer_A]) at TempLoc00 facing Default building facing degrees
              • Unit - Set level of Graviton Hammer Stun for (Last created unit) to GH_Curr_Lv[Temp_Integer_A]
              • Unit - Order (Last created unit) to Orc Tauren Chieftain - War Stomp
              • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
              • Special Effect - Create a special effect attached to the chest of GH_Target[Temp_Integer_A] using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
              • Special Effect - Destroy (Last created special effect)
              • Custom script: call RemoveLocation (udg_TempLoc00)
              • Set GH_Caster[Temp_Integer_A] = GH_Caster[GH_MUI_INDEX]
              • Set GH_Target[Temp_Integer_A] = GH_Target[GH_MUI_INDEX]
              • Set GH_Level[Temp_Integer_A] = GH_Level[GH_MUI_INDEX]
              • Set GH_Curr_Lv[Temp_Integer_A] = GH_Curr_Lv[GH_MUI_INDEX]
              • Set GH_Motion_Buffer[Temp_Integer_A] = GH_Motion_Buffer[GH_MUI_INDEX]
              • Set GH_Caster[GH_MUI_INDEX] = No unit
              • Set GH_Target[GH_MUI_INDEX] = No unit
              • Set GH_Curr_Lv[GH_MUI_INDEX] = 0
              • Set GH_MUI_INDEX = (GH_MUI_INDEX - 1)
              • Set Temp_Integer_A = (Temp_Integer_A - 1)
            • Else - Actions
  • GH Initiation
    • Events
      • Time - Elapsed game time is 0.05 seconds
    • Conditions
    • Actions
      • Trigger - Turn off (This trigger)
      • For each (Integer Temp_Integer_A) from 1 to 16, do (Actions)
        • Loop - Actions
          • Trigger - Add to Graviton Hammer Change Mode <gen> the event (Player - (Player(Temp_Integer_A)) skips a cinematic sequence)
  • Graviton Hammer Change Mode
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • GH_ImpactMode Equal to True
        • Then - Actions
          • Set GH_ImpactMode = False
          • Game - Display to (All players) the text: Impact Mode: Loopin...
        • Else - Actions
          • Set GH_ImpactMode = True
          • Game - Display to (All players) the text: Impact Mode: Unit -...




STEPS:


1.) Create an initiatory spell; in which it has your desired Validating Buff, as well as the projectile model and projectile speed.

2.) Create an Initiatory trigger; in which it registers the target and some variables. If you are intending it to be a spam-able ability, you should consider making it MUI. For it to me MUI, you have to count all the shots made, and account all the targets. Look for the Mystic Dagger above to see how does the MUI in this system works.

This is where you will also put the values of the damage, or anything else to to be used as the trigger is applied.

3.) Create a Validating Trigger; it is a type of trigger that executes so many times within a second to ensure properly-timed execution. While normally i use 0.01 Interval or 100 Actions Per Second, but a lot of people don't like that so for tutorial purposes it would be at 0.03.

You can also annex triggers like Knockback function. This will open up so much possibilities in making a projectile-triggered spell. Some may create dummy units that will create an aerial damage and effects like stun or slow.

Things to look out for:

a.) Be sure to remove the buff once it has been used, else it may affect the preceding spells. If you casted another one, yet the target already has the buff, the effect will have been triggered right before the projectile has hit. If you want to apply a stun or another set of buff-placing effects, you have to create a dummy unit.

b.) There is a possibility that the target will be dead before the projectile hits and the buff is applied. You have to take that account, and create a separate line of triggers that will safely dispose of unused projectile. Else the trigger will be left running for a very long time and can cause errors.

c.) Be sure to NEVER put damage with the initiating spell, as if it kills the target. It will not apply the buff, thus the impact is wasted. The unit needs to survive the initial spell.

d.) Be sure to apply Motion Buffer System; it's simply a timer that counts down, that nullifies the effect of the projectile if it flies too long. This accounts for the possibility when the buff is applied but not validated because a spell has removed the buff before validation. It acts as a last resort should such happen. It is advisable to give the projectile a 1.5s of life in flight time as commonly the projectiles of spells impacts within that window time. But if necessary, increase the window time to fit the needs of your spells.

Suggested: ((((Max Cast Range) x 3) / 2) / Projectile Speed) / (Loop Interval)) e.g.

- ((((2000) x 3 )/ 2) / 1000) / (0.03))
-- (((6000) / 2) /1000) / (0.03))
--- ((3000)/ 1000) / (0.03))
---- (3.0s x (0.03)) = 100

Motion Buffer = 100

While credit is NOT necessary, it is appreciated. However you may not claim this system as your own.

Keywords:
spell, system, firebolt, frostbolt, ice, fire, blink, dagger, invention, science, tutorial, projectiles
Contents

Projectile-Based Triggered Template (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. Projectile-Based Triggered Spell System | Reviewed by Maker | 31st Aug 2013 NEEDS FIX Get rid of the A unit dies trigger, make the dummy not decay instead Get rid of the...

Moderator

M

Moderator

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


Projectile-Based Triggered Spell System | Reviewed by Maker | 31st Aug 2013
NEEDS FIX


126248-albums6177-picture66522.png


  • Get rid of the A unit dies trigger, make the dummy not decay instead
  • Get rid of the non MUI examples
  • You leak events, adding one for every unit and not clearing them
  • There is no way to tell which instance made the hit
==========================================
Periodically checking for a buff is not a good method for this kind
of a system.
==========================================
126248-albums6177-picture66523.png


  • I recommend using a configuration trigger where you set values for damage,
    the ability, dummy unit type and so on
  • Check GH_MUI_INDEX only when you deindex
[tr]
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
never use integer A/B they are less efficient and slower than making ur own variable.

this is bad. For each (Integer B) from (Integer A) to MD_MUI_INDEX, do (Actions)
integer A may not be 1.

u never de-index so this spell is not MUI.

The top 2 spells are not MUI because they have a time period b4 they are used were the variables can be changed. u never index or de-index.

anything u use twice or more should be stored into a variable. example: last created unit / picked unit / level of ability

using skip remaining actions in a loop trigger is a very bad idea.

check out my tutorial things a guier should know. the chapter how to index will show u how to properly index / de-index spells to make them fully MUI
 
Level 5
Joined
Jul 13, 2009
Messages
55
never use integer A/B they are less efficient and slower than making ur own variable.

this is bad. For each (Integer B) from (Integer A) to MD_MUI_INDEX, do (Actions)
integer A may not be 1.

u never de-index so this spell is not MUI.

The top 2 spells are not MUI because they have a time period b4 they are used were the variables can be changed. u never index or de-index.

anything u use twice or more should be stored into a variable. example: last created unit / picked unit / level of ability

check out my tutorial things a guier should know. the chapter how to index will show u how to properly index / de-index spells to make them fully MUI

I used it so many times, with 250 Unit projectile speed, and they all worked out perfectly. I had five out of the times, and they all worked perfectly, so i declared it MUI.

Yeah, i'll just fix that Integer A, give me a few mins.

I never said that the top two was MUI, that is why they do not have that "(MUI)"

Yeah, it's more of a concept. But otherwise, the execution still varies; so people may or may not do what i did, and may or may not do what i did.

But just to appease you, i'll try and fix all of these flaws you're pointing out.
 
Level 20
Joined
Jun 27, 2011
Messages
1,864
I used it so many times, with 250 Unit projectile speed, and they all worked out perfectly. I had five out of the times, and they all worked perfectly, so i declared it MUI.

MUI means Multi-unit Instanceable. Try putting 2 same heroes then order the first hero to cast the ability to a target, then immedietly order the second hero to cast the same ability to the same target, you'll find the bug.

Also a documentation to the 3 triggers won't hurt :)
 
Level 5
Joined
Jul 13, 2009
Messages
55
after another quick look yes ur last spell is MUI but it is very inefficient. u should use the new method which is found in my tutorial. this will not be approved with this de-indexing method.

the first 2 triggers r not MUI.

integer A/ B should be removed they are both bad to use.

I told you, i'm still fixing it.

this is bad. For each (Integer B) from (Integer A) to MD_MUI_INDEX, do (Actions)
integer A may not be 1.

Yeah, i meant it that way.

Because the Integer B starts at where is the current loop of A to bring down all the other existing indexed values above, to make room on the top.

Yes, i am aware that Indexing IS inefficient, but that is all i got for the moment. I'm currently trying Hashtables, and i'm just familiarizing myself, that is why i'm not using it on submitted spells yet.

Also, i have fixed that Integer A-B loops, it should be fine right now.

the third one is MUI but it does so by reducing every instance of the spell by reducing its index one by one which is very inefficient.

the other 2 arent MUI like u and i stated

I didn't said that they were MUI. That is why they do not have that "(MUI)" on the codes.
 
Level 5
Joined
Jul 13, 2009
Messages
55
i cant see the spell so can u update the triggers on the page.

also look at my tutorial u dont need hashtables. hashtables are slower than indexed arrays which is the method i show u how to use in my tutorial things a guier should know. its in the chapter how to index.

http://www.hiveworkshop.com/forums/...9/things-gui-user-should-know-233242/#Section 2 Ch 12

Are you sure about that tutorial? because i remember doing the very same thing you did; just with different variable names, and i also took account the possibility of a trigger ending in between indexes;

Say Index-1 is not finished, and index-3 is not finished, but index-2 is already finished. So what i did, is to push down the Index-3 to the position of index-2, once Index-2 is completed and the units above index are not. It's kind of like pulling a book in a middle of a stack of books, what i did is made the book on top of Index-2 to take it's place, and so on and so forth on the preceding indexes.
 
Level 5
Joined
Jul 13, 2009
Messages
55
That is my tutorial. It is up to date and the indexing is exactly what I use for all my spells. If somethig doesn't work when u try it ask questions. It's easy to mess something up when learning something new.

I get it now, what you are doing is registering the last index to the voided index to avoid using the for-integer-loop action. That's kinda ingenious.

Yeah, give me a few minutes to apply the changes.
 
Level 4
Joined
Nov 13, 2012
Messages
28
I don't understand why you're using these lines:

  • Or - Any (Conditions) are true
    • Conditions
      • (MDTarget[Temp_Integer_A] is dead) Egal to* TRUE
      • (MDTarget[Temp_Integer_A] has buff Mystic Dagger Validation (Pause)) Egal to TRUE
Just check with an And if the target is alive and has the buff.

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (MDTarget[Temp_Integer_A] is dead) Egal to* FALSE
      • (MDTarget[Temp_Integer_A] has buff Mystic Dagger Validation (Pause)) Egal to* TRUE
    • Then - Actions
    • Else - Actions
You call it as a tutorial, so why you don't submit it in the tutorials section ?

And btw you're missing a configuration triggers for the following things:
-Special effects models
-Damages
-Ability
-Buff
-Damage type
-"Attack type"
-Position of the effect attached to the target

Oh and one more thing: You don't need to order the caster doing his attack animation because he'll do it when he will attacks.
 
Level 5
Joined
Jul 13, 2009
Messages
55
I don't understand why you're using these lines:

  • Or - Any (Conditions) are true
    • Conditions
      • (MDTarget[Temp_Integer_A] is dead) Egal to* TRUE
      • (MDTarget[Temp_Integer_A] has buff Mystic Dagger Validation (Pause)) Egal to TRUE
Just check with an And if the target is alive and has the buff.

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (MDTarget[Temp_Integer_A] is dead) Egal to* FALSE
      • (MDTarget[Temp_Integer_A] has buff Mystic Dagger Validation (Pause)) Egal to* TRUE
    • Then - Actions
    • Else - Actions
You call it as a tutorial, so why you don't submit it in the tutorials section ?

And btw you're missing a configuration triggers for the following things:
-Special effects models
-Damages
-Ability
-Buff
-Damage type
-"Attack type"
-Position of the effect attached to the target

Oh and one more thing: You don't need to order the caster doing his attack animation because he'll do it when he will attacks.

- Special Effect Models: Handled at the Object Editor
- Damages: It is specified in the initiatory trigger to configure damage.
- Buff: Validating buff is handled at the Object Editor
- Damage Type: As always, it is by your choice. As a triggerer, it's basic to be aware of how the Unit - Damage Target functions. If you intend to make your own without knowledge of how to configure the Unit - Damage Target function, then you will certainly fail. As a prerequisite with this tutorial is to actually know your way around the triggers.
- Attack Type: Ditto
- Position of the effect attached to the target: Can be handled by Object Editor or the trigger editor. But this case, i specified that Special effect for the target unit (Hydralisk Impact) and the position of the trigger-unit (Blink <Special>)

Yes, i have to order the unit to attack, because it is a modified "Blink Strike", as well as you may never know if there are other units the target may decide to attack even if she was assigned on another unit. It is ordered to attack, not to appease the animation, but to actually order the unit to attack the target than running rampant after.

Really, have you taken account that a unit may not receive the buff when they die while still the projectile is in flight? It checks whether the unit is dead or has the buff to trigger the ability. If it was triggered, and the target is dead then it does nothing, if it is still alive but triggered, it will do what it is supposed to do. If you leave a trigger running like that, it will eventually slow the game.

With your current suggestion, it will automatically trigger the moment you sent the projectile flying instead of when it hits because the target is already alive, thus it finishes the condition.

I know how little you look at the new guys, but i'm telling you i know what i'am doing.

And i placed it here, because even if it is a tutorial, it is still a spell-pack/template/system. Thus it has a place in this section. I also want to see if it has gained much attention than just being commented at.
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
Config should not be in the cast triggers.

If this is a tutorial it should be in the tutorial section not spell section.

Also I don't look down on new ppl lol. Everyone had to start off somewere. Technically I'm new as I haven't been doing this for over a yr yet. Also I only did GUI for about 2 months.

New has nothing to do with anything when I look at triggers. I simply look at then to help others improve.
 
Level 5
Joined
Jul 13, 2009
Messages
55
  • Don't post any non MUI examples
  • Subtract 1 from Temp_Integer_A when deindexing
  • Don't check if the group is empty 33 times per second
  • Units can lose the buff in that 0.03 second interval. There is a possibility that some instances never get deindexed

- Shouldn't they know at least, how the system works in basic?
- Why? it is zeroed every time the for-int-loop is used. I think you mean MD_MUI_INDEX, and i already did that.
- Actually, i took account that if they died right before the projectile impacts. But of course, i guess i have to update my spell if they happen to be Magic Immune...
- I only did that 0.03 because a lot of people are telling me that you should never use 0.01. But that is my concern as well, but a lot of people believe that it will cause lag, even if it doesn't have anything to manipulate within the observable map. I have the reason to believe that 0.01 actions/s is safe if it is just for calculation.

Config should not be in the cast triggers.

If this is a tutorial it should be in the tutorial section not spell section.

Also I don't look down on new ppl lol. Everyone had to start off somewere. Technically I'm new as I haven't been doing this for over a yr yet. Also I only did GUI for about 2 months.

New has nothing to do with anything when I look at triggers. I simply look at then to help others improve.

Yeah, even if this is a tutorial. It is still a spell pack, system, and a template. So it should be judged as one.

Wasn't referring to you that time.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
- Shouldn't they know at least, how the system works in basic?
- Why? it is zeroed every time the for-int-loop is used. I think you mean MD_MUI_INDEX, and i already did that.
- Actually, i took account that if they died right before the projectile impacts. But of course, i guess i have to update my spell if they happen to be Magic Immune...
- I only did that 0.03 because a lot of people are telling me that you should never use 0.01. But that is my concern as well, but a lot of people believe that it will cause lag, even if it doesn't have anything to manipulate within the observable map. I have the reason to believe that 0.01 actions/s is safe if it is just for calculation.

-Might as well make it MUI. This is the spell database, not a tutorial forum.
-The instance that is moved from last position to current doesn't get looped
-It is not about dying. Spells can remove the buff, but the unit is alive. The unit remains to be looped.
-Only do the check when you deindex
 
Level 5
Joined
Jul 13, 2009
Messages
55
-Might as well make it MUI. This is the spell database, not a tutorial forum.
-The instance that is moved from last position to current doesn't get looped
-It is not about dying. Spells can remove the buff, but the unit is alive. The unit remains to be looped.
-Only do the check when you deindex

You people really crave MUI don't you? I just don't have the patience for another MUI. Besides, the resource is the System, not the spells because they are just for demonstration. The full examination should be focused entirely at the Mystic Dagger.

Fine, i'll get that -1 Temp_Int_A for you.

Yes, i am aware of having the buffs removed by something like Purge, but with a 0.03 Window, it's highly unlikely. And of course, you can just add a Motion Buffer; meaning there is a definite time the projectile is valid. And if they exceeded a definite amount of flight-time or distance, then the impact will be already invalid.

Just give me a few mins, i'll add that -Temp_Int_A and that motion-buffer system.

Update:

Just did, and fixed the Multi-Unit Instance-ability, i actually forgot to create indexes for the caster. V1.2 Build 2 Is live.
 
Last edited:
Level 5
Joined
Jul 13, 2009
Messages
55
I would rather use a damage detection system, when a unit takes damage, check if it has the buff. That should work and it is accurate.

I don't know, i heard that the damage comes first before the buff... And if the buff doesn't apply, it could go on forever without a loop.

Let me check that.

UPDATE:

I tried that "Unit - Takes Damage" event, and it doesn't work every time. I tried a lot. Maybe you can branch out.
 
Last edited:
Level 5
Joined
Jul 13, 2009
Messages
55
What Maker is suggesting is the usage of a Damage Detection system like this one for the damage event.

Damage detection is the kind of thing that requires a whole system :/

The entire problem is that, you need something unique for the system to find, that they can validate.

With the damage detection, it is just bad because it doesn't distinguish between normal attacks and ability attacks. That is why the system uses specialized buff to work with.
 
Top