Spell Needler

Weep

Godspeed to the sound of the pounding
Reaction score
400
Needler
by Weep
Version 1.1.1​

-- General Information --
If you've played any game in the Halo series, this should be familiar. It's a bit more in the style of WC3 abilities: the shots have perfect tracking and can't be evaded by movement like they can in Halo, like most of WC3's native abilities such as Storm Bolt.

Linked lists = variable-size multidimensional arrays. This was a good learning exercise.

Made in GUI and leakless (as far as GUI can be). All spells are MUI. Requires a unit autoindexer (eg. AIDS) and GDD.

-- Description --
Repeatedly fires explosive crystal shards at an enemy. Shards will stick into the target, dealing a small amount of damage, then wait a short time before exploding. If a group of shards is stuck in the target when one explodes, they will chain react in a large explosion dealing damage in an area.

-- Screenshot --
20qxowl.jpg

hswfh4.jpg
-- Readme --
Code:
Needler -- v1.1.1 -- by Weep

   Requires:
   1. An instant unit autoindexer, such as AIDS by Jesus4Lyf, AutoIndex by grim001, or
      UnitIndexingUtils by Rising_Dusk.  (GUI-AIDS is included in the demo map.)
   2. GDD by Weep (included in the demo map or available from
      http://www.thehelper.net/forums/showthread.php?t=137957)
   3. The base ability "Needler".
   4. The dummy-caster ability "Needle (Dummy Ability)".
   5. The buff "Needler".
   6. The unit-types "Dummy (Ground)" and "Dummy (Flying)".
   7. This trigger category and the triggers it contains.

-- What? --
   This spell is like the Needler weapon from the Halo series of games.  It fires projectiles
   at an enemy that home in on it and stick into it when they hit, dealing a small amount of
   damage.  After a delay, the stuck projectiles will explode, dealing more damage.  If
   enough projectiles are stuck, they will chain-react together and produce a more damaging
   explosion in an AOE.

   It is MPI/MUI/SUI up to 8191 simultaneous needles and 8191 simultaneous casters.

-- How To Implement --
   1. Be sure "Automatically create unknown variables while pasting trigger data" is
      enabled in the World Editor general preferences.
   2. Add the required resources listed above, if not already present in your map.
   3. The rawcodes for the imported units and abilities have probably changed; set the
      "Needle (Dummy Ability)" ability to apply the buff "Needler" at all levels.  If
      desired, change the duration, cooldown, range, targets allowed, levels, and mana cost
      of the "Needler" ability to suit your map.
      
      In the "Needler Globals" trigger, set ND__DummyTypes[0] to "Dummy (Ground)", and set
      ND__DummyTypes[1] to "Dummy (Flying)".  Set ND__Ability to the "Needler" ability, set
      ND__AbilityNeedle to the "Needle (Dummy Ability)" ability, and ND__Buff to the
      "Needler" buff.  Edit any of the other parameters to suit your map.
      
-- Notes --
   When using a unit autoindexer, you will not be able to have any other triggers in your map
   that set a unit's custom value, since this is what autoindexers do.  Any such triggers can
   be remade using an integer array using the unit's custom value as the index.

-- Credits --
   Credit in your map is not needed but appreciated.  Please include this README.  Do not
   claim this spell as your own work.

-- Version History --
   1.1.1: Added checks for target visibility and death.
   1.1.0: Added maximum range and swiveling.
   1.0.0: First release.
-- Configuration and Globals --
Trigger:
  • Needler Globals
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- The dummy unit-types used by Needler. 0 is Dummy (Ground), 1 is Dummy (Flying). --------
      • Set ND__DummyTypes[0] = Dummy (Ground)
      • Set ND__DummyTypes[1] = Dummy (Flying)
      • -------- The ability used for Needler. --------
      • Set ND__Ability = Needler
      • -------- The order string for Needler. --------
      • Set ND__Order = (Order(shadowstrike))
      • -------- The ability used by the dummy caster for a single needle. --------
      • Set ND__AbilityNeedle = Needle (Dummy Ability)
      • -------- The scale to be applied to the needle projectile (scales the dummy caster). --------
      • Set ND__NeedleScale = 50.00
      • -------- The buff applied by the needle dummy ability. --------
      • Set ND__Buff = Needler
      • -------- The maximum range of the spell. If the target moves out of range, the casting will stop. --------
      • Set ND__MaxRange = 1200.00
      • -------- If true, the spell will stop firing if the target moves out of sight. --------
      • Set ND__RequireSight = True
      • -------- The effect to be added to a unit to represent a needle stuck in it. --------
      • Set ND__FXNeedle = Abilities\Weapons\VoidWalkerMissile\VoidWalkerMissile.mdl
      • -------- The attachment points which will be randomly used for stuck needles. --------
      • Set ND__Attachments[1] = head
      • Set ND__Attachments[2] = chest
      • Set ND__Attachments[3] = hand left
      • Set ND__Attachments[4] = hand right
      • Set ND__Attachments[5] = foot left
      • Set ND__Attachments[6] = foot right
      • -------- The number of specified attachment points. --------
      • Set ND__AttachmentCount = 6
      • -------- The effect to be used when a needle detonates. --------
      • Set ND__FXDetonate = Abilities\Weapons\BlackKeeperMissile\BlackKeeperMissile.mdl
      • -------- The effect to be used when a grouping of needles explodes in a cluster. --------
      • Set ND__FXCluster = Abilities\Spells\Undead\OrbOfDeath\OrbOfDeathMissile.mdl
      • -------- The damage to be dealt when a needle first impacts. --------
      • Set ND__DamageInitial = 3.00
      • -------- The damage type caused by a needle's initial impact. --------
      • Set ND__DamageInitialType = Pierce
      • -------- The damage to be dealt by a single needle when it detonates. --------
      • Set ND__DamageDetonate = 15.00
      • -------- The damage type caused by a needle's detonation. --------
      • Set ND__DamageDetonateType = Normal
      • -------- The delay after being hit by a needle before the needles will detonate, if not enough for a cluster. --------
      • Set ND__DetonationDelay = 2.50
      • -------- The damage to be dealt by a cluster of needles when they chain-react. --------
      • Set ND__DamageCluster = 200.00
      • -------- The number of needles that need to be stuck in an enemy to chain-react. --------
      • Set ND__ClusterCount = 10
      • -------- If true, all stuck needles will go off at once if there are enough. --------
      • -------- If false, only the number of needles that constitute a cluster will go off together at a time. --------
      • Set ND__ClusterSimultaneity = False
      • -------- The splash damage area for a needle cluster explosion. --------
      • Set ND__ClusterAOE = 250.00
      • -------- If true, the damage will fall off linearly with distance, dealing full damage at the center and 0 at the edge. --------
      • -------- If false, all units in the AOE will take full damage. --------
      • Set ND__FalloffAOE = True
      • -------- If true, the explosion will damage allied units, too. --------
      • Set ND__FriendlyAOE = False
      • -------- The damage type caused by a cluster explosion. --------
      • Set ND__DamageClusterType = Siege
      • -------- The delay after being hit by a needle before the needles will detonate, if there are enough for a cluster. --------
      • Set ND__ClusterDelay = 0.75
      • -------- The period used to calculate timing. --------
      • Set ND__Period = 0.02
      • -------- The period to fire needles immediately after casting the spell. --------
      • Set ND__RateStart = 0.20
      • -------- How much the firing period decreases each time a needle is fired. (Basically, acceleration of the rate of fire.) --------
      • Set ND__RateSpeedup = 0.02
      • -------- The fastest rate at which needles can be fired. --------
      • Set ND__RateMax = 0.10
      • -------- Precomputation. Don't edit below this line! --------
      • Countdown Timer - Start ND__Timer as a Repeating timer that will expire in ND__Period seconds
      • Set ND__DamageCluster = (ND__DamageCluster / (Real(ND__ClusterCount)))
-- Triggers --
Trigger:
  • Needler Fire Needle
    • Events
    • Conditions
    • Actions
      • Custom script: if IsUnitInRange(udg_ND_TempUnit[0], udg_ND_CasterTarget[udg_ND_TempInteger[0]], udg_ND__MaxRange) and (IsUnitType(udg_ND_CasterTarget[udg_ND_TempInteger[0]], UNIT_TYPE_DEAD) or GetUnitTypeId(udg_ND_CasterTarget[udg_ND_TempInteger[0]]) == 0) == false then
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (ND_CasterTarget[ND_TempInteger[0]] is dead) Equal to True
          • ND__RequireSight Equal to True
          • Or - Any (Conditions) are true
            • Conditions
              • (ND_CasterTarget[ND_TempInteger[0]] is fogged to (Owner of ND_Dummies[ND_TempInteger[0]])) Equal to True
              • (ND_CasterTarget[ND_TempInteger[0]] is masked to (Owner of ND_Dummies[ND_TempInteger[0]])) Equal to True
        • Then - Actions
          • Unit - Order ND_TempUnit[0] to Stop
        • Else - Actions
          • Custom script: call SetUnitFacing(udg_ND_TempUnit[0], bj_RADTODEG * Atan2(GetUnitY(udg_ND_CasterTarget[udg_ND_TempInteger[0]]) - GetUnitY(udg_ND_TempUnit[0]), GetUnitX(udg_ND_CasterTarget[udg_ND_TempInteger[0]]) - GetUnitX(udg_ND_TempUnit[0])))
          • Set ND_TempReal[0] = (20.00 x (Random real number between -1.00 and 1.00))
          • Custom script: call SetUnitX(udg_ND_Dummies[udg_ND_TempInteger[0]], GetUnitX(udg_ND_TempUnit[0])+udg_ND_TempReal[0]*Cos(90+GetUnitFacing(udg_ND_TempUnit[0])*bj_DEGTORAD))
          • Custom script: call SetUnitY(udg_ND_Dummies[udg_ND_TempInteger[0]], GetUnitY(udg_ND_TempUnit[0])+udg_ND_TempReal[0]*Sin(90+GetUnitFacing(udg_ND_TempUnit[0])*bj_DEGTORAD))
          • Animation - Change ND_Dummies[ND_TempInteger[0]] flying height to (Current flying height of ND_TempUnit[0]) at 0.00
          • Unit - Grant shared vision of ND_CasterTarget[ND_TempInteger[0]] to (Owner of ND_Dummies[ND_TempInteger[0]])
          • Unit - Order ND_Dummies[ND_TempInteger[0]] to Night Elf Warden - Shadow Strike ND_CasterTarget[ND_TempInteger[0]]
          • Unit - Deny shared vision of ND_CasterTarget[ND_TempInteger[0]] to (Owner of ND_Dummies[ND_TempInteger[0]])
      • Custom script: else
      • Unit - Order ND_TempUnit[0] to Stop
      • Custom script: endif

Trigger:
  • Needler Explode
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ND_NeedleCount[ND_TempInteger[1]] Greater than or equal to ND__ClusterCount
        • Then - Actions
          • Set ND_TempPoint[1] = (Position of ND_TempUnit[1])
          • Set ND_TempGroup = (Units within ND__ClusterAOE of ND_TempPoint[1] matching (((Matching unit) is dead) Equal to False))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ND__ClusterSimultaneity Equal to True
            • Then - Actions
              • Set ND_TempInteger[99] = ND_NeedleCount[ND_TempInteger[1]]
              • Set ND_NeedleCount[ND_TempInteger[1]] = 0
            • Else - Actions
              • Set ND_TempInteger[99] = ND__ClusterCount
              • Set ND_NeedleCount[ND_TempInteger[1]] = (ND_NeedleCount[ND_TempInteger[1]] - ND__ClusterCount)
          • Unit Group - Pick every unit in ND_TempGroup and do (Actions)
            • Loop - Actions
              • Set ND_TempUnit[3] = (Picked unit)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • (ND_TempUnit[3] is A flying unit) Not equal to (ND_TempUnit[1] is A flying unit)
                      • (ND_TempUnit[3] is A structure) Equal to True
                • Then - Actions
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ND__FalloffAOE Equal to True
                    • Then - Actions
                      • Set ND_TempPoint[3] = (Position of ND_TempUnit[3])
                      • Set ND_TempReal[3] = (1.00 - ((Distance between ND_TempPoint[1] and ND_TempPoint[3]) / ND__ClusterAOE))
                      • Custom script: call RemoveLocation(udg_ND_TempPoint[3])
                    • Else - Actions
                      • Set ND_TempReal[3] = 1.00
                  • Set ND_TempInteger[11] = ND_NeedleFirst[ND_TempInteger[1]]
                  • For each (Integer ND_TempInteger[100]) from 1 to ND_TempInteger[99], do (Actions)
                    • Loop - Actions
                      • Special Effect - Destroy ND_NeedleEffects[ND_TempInteger[11]]
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Or - Any (Conditions) are true
                            • Conditions
                              • ND__FriendlyAOE Equal to True
                              • (ND_TempUnit[3] belongs to an ally of (Owner of ND_NeedleOwner[ND_TempInteger[11]])) Not equal to True
                        • Then - Actions
                          • Set ND_TempInteger[2] = (Custom value of ND_NeedleOwner[ND_TempInteger[11]])
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Unit-type of ND_Casters[ND_TempInteger[2]]) Not equal to No unit-type
                            • Then - Actions
                              • Unit - Cause ND_Casters[ND_TempInteger[2]] to damage ND_TempUnit[3], dealing (ND_TempReal[3] x ND__DamageCluster) damage of attack type ND__DamageClusterType and damage type Normal
                            • Else - Actions
                              • Unit - Cause ND_NeedleOwner[ND_TempInteger[11]] to damage ND_TempUnit[3], dealing (ND_TempReal[3] x ND__DamageCluster) damage of attack type ND__DamageClusterType and damage type Normal
                        • Else - Actions
                      • Set ND_TempInteger[11] = ND_NeedleNext[ND_TempInteger[11]]
          • For each (Integer ND_TempInteger[100]) from 1 to ND_TempInteger[99], do (Actions)
            • Loop - Actions
              • Special Effect - Destroy ND_NeedleEffects[ND_NeedleFirst[ND_TempInteger[1]]]
              • Set ND_NeedlePrev[ND_NeedleNext[ND_NeedleFirst[ND_TempInteger[1]]]] = 0
              • Set ND_NeedleFreedIndices[ND_NeedleFirst[ND_TempInteger[1]]] = ND_NeedleLastFree
              • Set ND_NeedleLastFree = ND_NeedleFirst[ND_TempInteger[1]]
              • Set ND_NeedleFirst[ND_TempInteger[1]] = ND_NeedleNext[ND_NeedleFirst[ND_TempInteger[1]]]
          • Custom script: call DestroyGroup(udg_ND_TempGroup)
          • Custom script: call RemoveLocation(udg_ND_TempPoint[1])
          • Special Effect - Create a special effect attached to the chest of ND_TempUnit[1] using ND__FXCluster
          • Special Effect - Destroy (Last created special effect)
        • Else - Actions
          • For each (Integer ND_TempInteger[100]) from 1 to ND_NeedleCount[ND_TempInteger[1]], do (Actions)
            • Loop - Actions
              • Unit - Cause No unit to damage ND_TempUnit[1], dealing ND__DamageDetonate damage of attack type ND__DamageDetonateType and damage type Normal
              • Special Effect - Destroy ND_NeedleEffects[ND_NeedleFirst[ND_TempInteger[1]]]
              • Special Effect - Create a special effect attached to the ND_NeedleAttachments[ND_NeedleFirst[ND_TempInteger[1]]] of ND_TempUnit[1] using ND__FXDetonate
              • Special Effect - Destroy (Last created special effect)
              • Set ND_TempInteger[2] = (Custom value of ND_NeedleOwner[ND_NeedleFirst[ND_TempInteger[1]]])
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Unit-type of ND_Casters[ND_TempInteger[2]]) Not equal to No unit-type
                • Then - Actions
                  • Unit - Cause ND_Casters[ND_TempInteger[2]] to damage ND_TempUnit[1], dealing ND__DamageDetonate damage of attack type ND__DamageDetonateType and damage type Normal
                • Else - Actions
                  • Unit - Cause ND_NeedleOwner[ND_NeedleFirst[ND_TempInteger[1]]] to damage ND_TempUnit[1], dealing ND__DamageDetonate damage of attack type ND__DamageDetonateType and damage type Normal
              • Set ND_NeedlePrev[ND_NeedleNext[ND_NeedleFirst[ND_TempInteger[1]]]] = 0
              • Set ND_NeedleFreedIndices[ND_NeedleFirst[ND_TempInteger[1]]] = ND_NeedleLastFree
              • Set ND_NeedleLastFree = ND_NeedleFirst[ND_TempInteger[1]]
              • Set ND_NeedleFirst[ND_TempInteger[1]] = ND_NeedleNext[ND_NeedleFirst[ND_TempInteger[1]]]
          • Set ND_NeedleCount[ND_TempInteger[1]] = 0

Trigger:
  • Needler Damage Detect
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
      • (GDD_DamagedUnit has buff ND__Buff) Equal to True
    • Actions
      • Unit - Remove ND__Buff buff from GDD_DamagedUnit
      • Set ND_TempInteger[1] = (Custom value of GDD_DamagedUnit)
      • Set ND_TempInteger[2] = (Custom value of GDD_DamageSource)
      • -------- If the indexed unit is not the same as this unit, clear everything and index it. --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • GDD_DamagedUnit Not equal to ND_NeedleUnits[ND_TempInteger[1]]
        • Then - Actions
          • For each (Integer ND_TempInteger[100]) from 1 to ND_NeedleCount[ND_TempInteger[1]], do (Actions)
            • Loop - Actions
              • Special Effect - Destroy ND_NeedleEffects[ND_NeedleFirst[ND_TempInteger[1]]]
              • Set ND_NeedleFreedIndices[ND_NeedleFirst[ND_TempInteger[1]]] = ND_NeedleLastFree
              • Set ND_NeedleLastFree = ND_NeedleFirst[ND_TempInteger[1]]
              • Set ND_NeedleFirst[ND_TempInteger[1]] = ND_NeedleNext[ND_NeedleFirst[ND_TempInteger[1]]]
          • Set ND_NeedleCount[ND_TempInteger[1]] = 0
          • Set ND_NeedleUnits[ND_TempInteger[1]] = GDD_DamagedUnit
          • Set ND_NeedledUnitCount = (ND_NeedledUnitCount + 1)
          • Set ND_NeedledUnitIndex[ND_NeedledUnitCount] = ND_TempInteger[1]
        • Else - Actions
      • -------- Initial impact damage --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of ND_Casters[ND_TempInteger[2]]) Not equal to No unit-type
        • Then - Actions
          • Unit - Cause ND_Casters[ND_TempInteger[2]] to damage GDD_DamagedUnit, dealing ND__DamageInitial damage of attack type ND__DamageInitialType and damage type Normal
        • Else - Actions
          • Unit - Cause GDD_DamageSource to damage GDD_DamagedUnit, dealing ND__DamageInitial damage of attack type ND__DamageInitialType and damage type Normal
      • -------- Add a needle --------
      • Set ND_NeedleCount[ND_TempInteger[1]] = (ND_NeedleCount[ND_TempInteger[1]] + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ND_NeedleLastFree Equal to 0
        • Then - Actions
          • Set ND_NeedleIndexCount = (ND_NeedleIndexCount + 1)
          • Set ND_TempInteger[11] = ND_NeedleIndexCount
        • Else - Actions
          • Set ND_TempInteger[11] = ND_NeedleLastFree
          • Set ND_NeedleLastFree = ND_NeedleFreedIndices[ND_NeedleLastFree]
      • Set ND_TempInteger[22] = (Random integer number between 1 and ND__AttachmentCount)
      • Special Effect - Create a special effect attached to the ND__Attachments[ND_TempInteger[22]] of GDD_DamagedUnit using ND__FXNeedle
      • Set ND_NeedleEffects[ND_TempInteger[11]] = (Last created special effect)
      • Set ND_NeedleAttachments[ND_TempInteger[11]] = ND__Attachments[ND_TempInteger[22]]
      • Set ND_NeedleOwner[ND_TempInteger[11]] = GDD_DamageSource
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ND_NeedleCount[ND_TempInteger[1]] Greater than 1
        • Then - Actions
          • Set ND_NeedleNext[ND_NeedleLast[ND_TempInteger[1]]] = ND_TempInteger[11]
          • Set ND_NeedlePrev[ND_TempInteger[11]] = ND_NeedleLast[ND_TempInteger[1]]
          • Set ND_NeedleLast[ND_TempInteger[1]] = ND_TempInteger[11]
        • Else - Actions
          • Set ND_NeedleFirst[ND_TempInteger[1]] = ND_TempInteger[11]
          • Set ND_NeedleLast[ND_TempInteger[1]] = ND_TempInteger[11]
          • Set ND_NeedlePrev[ND_TempInteger[11]] = 0
      • Set ND_NeedleNext[ND_TempInteger[11]] = 0
      • -------- Set the timeout --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ND_NeedleCount[ND_TempInteger[1]] Greater than or equal to ND__ClusterCount
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ND_NeedleTime[ND_TempInteger[1]] Greater than ND__ClusterDelay
            • Then - Actions
              • Set ND_NeedleTime[ND_TempInteger[1]] = ND__ClusterDelay
            • Else - Actions
        • Else - Actions
          • Set ND_NeedleTime[ND_TempInteger[1]] = ND__DetonationDelay

Trigger:
  • Needler Periodic
    • Events
      • Time - ND__Timer expires
    • Conditions
    • Actions
      • For each (Integer ND_TempInteger[200]) from 1 to ND_NeedledUnitCount, do (Actions)
        • Loop - Actions
          • Set ND_TempUnit[1] = ND_NeedleUnits[ND_NeedledUnitIndex[ND_TempInteger[200]]]
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of ND_TempUnit[1]) Not equal to No unit-type
            • Then - Actions
              • Set ND_TempInteger[1] = (Custom value of ND_TempUnit[1])
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ND_NeedleTime[ND_TempInteger[1]] Less than or equal to 0.00
                • Then - Actions
                  • Trigger - Run Needler Explode <gen> (ignoring conditions)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ND_NeedleCount[ND_TempInteger[1]] Greater than 0
                    • Then - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • ND_NeedleCount[ND_TempInteger[1]] Greater than or equal to ND__ClusterCount
                        • Then - Actions
                          • Set ND_NeedleTime[ND_TempInteger[1]] = ND__ClusterDelay
                        • Else - Actions
                          • Set ND_NeedleTime[ND_TempInteger[1]] = ND__DetonationDelay
                    • Else - Actions
                      • Set ND_NeedleUnits[ND_TempInteger[1]] = No unit
                      • Set ND_NeedledUnitIndex[ND_TempInteger[200]] = ND_NeedledUnitIndex[ND_NeedledUnitCount]
                      • Set ND_TempInteger[200] = (ND_TempInteger[200] - 1)
                      • Set ND_NeedledUnitCount = (ND_NeedledUnitCount - 1)
                • Else - Actions
                  • Set ND_NeedleTime[ND_TempInteger[1]] = (ND_NeedleTime[ND_TempInteger[1]] - ND__Period)
            • Else - Actions
              • Set ND_TempInteger[1] = ND_NeedledUnitIndex[ND_TempInteger[200]]
              • For each (Integer ND_TempInteger[100]) from 1 to ND_NeedleCount[ND_TempInteger[1]], do (Actions)
                • Loop - Actions
                  • Special Effect - Destroy ND_NeedleEffects[ND_NeedleFirst[ND_TempInteger[1]]]
                  • Set ND_NeedleFreedIndices[ND_NeedleFirst[ND_TempInteger[1]]] = ND_NeedleLastFree
                  • Set ND_NeedleLastFree = ND_NeedleFirst[ND_TempInteger[1]]
                  • Set ND_NeedleFirst[ND_TempInteger[1]] = ND_NeedleNext[ND_NeedleFirst[ND_TempInteger[1]]]
              • Set ND_NeedleCount[ND_TempInteger[1]] = 0
              • Set ND_NeedleUnits[ND_TempInteger[1]] = No unit
              • Set ND_NeedledUnitIndex[ND_TempInteger[200]] = ND_NeedledUnitIndex[ND_NeedledUnitCount]
              • Set ND_TempInteger[200] = (ND_TempInteger[200] - 1)
              • Set ND_NeedledUnitCount = (ND_NeedledUnitCount - 1)
      • Unit Group - Pick every unit in ND_CasterGroup and do (Actions)
        • Loop - Actions
          • Set ND_TempUnit[0] = (Picked unit)
          • Set ND_TempInteger[0] = (Custom value of ND_TempUnit[0])
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Current order of ND_TempUnit[0]) Equal to ND__Order
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ND_CasterTime[ND_TempInteger[0]] Less than or equal to 0.00
                • Then - Actions
                  • Trigger - Run Needler Fire Needle <gen> (ignoring conditions)
                  • If (ND_CasterRate[ND_TempInteger[0]] Greater than ND__RateMax) then do (Set ND_CasterRate[ND_TempInteger[0]] = (Max((ND_CasterRate[ND_TempInteger[0]] - ND__RateSpeedup), ND__RateMax))) else do (-------- Do Nothing --------)
                  • Set ND_CasterTime[ND_TempInteger[0]] = ND_CasterRate[ND_TempInteger[0]]
                • Else - Actions
                  • Set ND_CasterTime[ND_TempInteger[0]] = (ND_CasterTime[ND_TempInteger[0]] - ND__Period)
            • Else - Actions
              • Unit Group - Remove ND_TempUnit[0] from ND_CasterGroup
              • Unit - Add a 30.00 second Generic expiration timer to ND_Dummies[ND_TempInteger[0]]
              • Set ND_Dummies[ND_TempInteger[0]] = No unit

Trigger:
  • Needler Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to ND__Ability
    • Actions
      • Set ND_TempUnit[0] = (Triggering unit)
      • Set ND_TempInteger[0] = (Custom value of ND_TempUnit[0])
      • Unit Group - Add ND_TempUnit[0] to ND_CasterGroup
      • Set ND_CasterTarget[ND_TempInteger[0]] = (Target unit of ability being cast)
      • Set ND_CasterRate[ND_TempInteger[0]] = ND__RateStart
      • Set ND_CasterTime[ND_TempInteger[0]] = ND__RateStart
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of ND_Dummies[ND_TempInteger[0]]) Equal to No unit-type
        • Then - Actions
          • Set ND_TempPoint[0] = (Position of ND_TempUnit[0])
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (ND_TempUnit[0] is A flying unit) Equal to True
            • Then - Actions
              • Unit - Create 1 ND__DummyTypes[1] for (Owner of ND_TempUnit[0]) at ND_TempPoint[0] facing 0.00 degrees
            • Else - Actions
              • Unit - Create 1 ND__DummyTypes[0] for (Owner of ND_TempUnit[0]) at ND_TempPoint[0] facing 0.00 degrees
              • Unit - Add Storm Crow Form to (Last created unit)
              • Unit - Remove Storm Crow Form from (Last created unit)
          • Set ND_Dummies[ND_TempInteger[0]] = (Last created unit)
          • Unit - Add ND__AbilityNeedle to ND_Dummies[ND_TempInteger[0]]
          • Custom script: call RemoveLocation(udg_ND_TempPoint[0])
          • Animation - Change ND_Dummies[ND_TempInteger[0]]'s size to (ND__NeedleScale%, 100.00%, 100.00%) of its original size
        • Else - Actions
          • Unit - Change ownership of ND_Dummies[ND_TempInteger[0]] to (Owner of ND_Casters[ND_TempInteger[0]]) and Retain color
      • Set ND_Casters[(Custom value of ND_Dummies[ND_TempInteger[0]])] = ND_TempUnit[0]
      • Trigger - Run Needler Fire Needle <gen> (ignoring conditions)

-- Credits --
Credit in your map is not needed but appreciated. Please include the READMEs. Do not claim these spells as your own work.

-- Version History --
1.1.1: Added checks for target visibility and death.
1.1.0: Added maximum range and swiveling.
1.0.0: First release.

--------------------------------------​

All comments welcome.
 

Attachments

  • Needler 1.1.1.w3x
    41.8 KB · Views: 275

avalya

New Member
Reaction score
37
Haven't tried it out but it looks cool, +rep!

Edit: Tried it, looks awesome!
 

Lyerae

I keep popping up on this site from time to time.
Reaction score
105
Hawt. Better if it was JASS, but still cool.
+rep
 

Dinowc

don't expect anything, prepare for everything
Reaction score
223
well +rep for a good screenshot and for making this in GUI xd

too lazy to test it out
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
Updated with a maximum range. If the target moves out of range, the spell casting will stop. Also, the caster will now swivel to face the target while firing.

Hawt. Better if it was JASS, but still cool.
+rep
Thanks. :) I might do a JASS version later...this would really lend itself to a proper timer system.

too lazy to test it out
:(
 

avalya

New Member
Reaction score
37
I actually liked that it continues to shoot even if it moves "out of range" so to speak.
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
I actually liked that it continues to shoot even if it moves "out of range" so to speak.
Well, then you can just set the maximum range to a really large value. ;)

Updated with optional check for target visibility, and stops firing if the target dies.
 

_whelp

New Member
Reaction score
54
Why don't you make it so there's more targets, like forked lightning, like if it collides with a unit it didn't target, its sticks on and the spell will still affect it?
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
Why don't you make it so there's more targets, like forked lightning, like if it collides with a unit it didn't target, its sticks on and the spell will still affect it?
Well, the needles are unit-targeted Shadow Strikes, not sliding dummies, so they can't hit other units on the way. I'm thinking about making a point-targeted version of the spell as a whole, though, automatically picking targets in front of the caster.

A screenshot of missles chasing a unit would be nice.
Added.
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
Any reason for the (presumed) old-thread GY'ding, as opposed to a review?
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
What's necessary to get a resource out of the GY if it was simply auto-moved without specific reason?
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top