• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Chain Spell

Status
Not open for further replies.
Level 2
Joined
Oct 2, 2012
Messages
10
Can someone make chain spell like : (the spell type is instant (no target))
Caster bind random enemy near caster in 600 AOE with chain then move the caster to the target and deal 125-175 (25 x Level of ability) damage to target.

Sorry my if my english is bad.
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
Can someone make chain spell like : (the spell type is instant (no target))
Caster bind random enemy near caster in 600 AOE with chain then move the caster to the target

you will need a chain model for this ....

and deal 125-175 (25 x Level of ability) damage to target.

125 - 175 ?

25 x 1 = 25
25 x 2 = 50
25 x 3 = 75

is that it ?
 
Last edited:
Level 12
Joined
Sep 11, 2011
Messages
1,176
Defskull said:
It is meant to be 125 ~ 175, which means in range of or random damage between that range.

Thanks.

done. i used UnitIndexer

you can configure :
- Damages = chainspellDamages (i set it to ((25 x Level of Ability) + 100))
- AOE = chainspellAOE (i set it to 600.00)
- Lightning effects (i used aerial shackles for this)
- Special effects (after the hero reach the target, i used Thunder Clap)

triggers

  • Chain Spell
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Chain Spell
    • Actions
      • Set cv = (Custom value of (Triggering unit))
      • Set casterPoint[cv] = (Position of (Triggering unit))
      • Set chainspellAOE = 600.00
      • Set chainspellTargetGroup[cv] = (Random 1 units from (Units within chainspellAOE of casterPoint[cv] matching ((((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) and (((Matching unit) is dead) Equal to False))))
      • Unit Group - Pick every unit in chainspellTargetGroup[cv] and do (Actions)
        • Loop - Actions
          • Set chainspellTarget[cv] = (Picked unit)
          • Set targetPoint[cv] = (Position of chainspellTarget[cv])
          • Set chainspellAngle[cv] = (Angle from casterPoint[cv] to targetPoint[cv])
          • Set chainspellDamages[cv] = ((25.00 x (Real((Level of Chain Spell for (Triggering unit))))) + 100.00)
          • Set chainspellDistances[cv] = (Distance between casterPoint[cv] and targetPoint[cv])
          • Unit - Make (Triggering unit) face (Picked unit) over 0.00 seconds
          • Lightning - Create a Magic Leash lightning effect from source casterPoint[cv] to target targetPoint[cv]
          • Set chainspellLightning[cv] = (Last created lightning effect)
          • Unit Group - Add (Triggering unit) to chainspellGroup
          • Set chainspellCounts = (chainspellCounts + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Movement <gen> is on) Equal to False
            • Then - Actions
              • Trigger - Turn on Movement <gen>
            • Else - Actions
          • Custom script: call RemoveLocation(udg_casterPoint[udg_cv])
  • Movement
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in chainspellGroup and do (Actions)
        • Loop - Actions
          • Set cv = (Custom value of (Picked unit))
          • Set casterPoint[cv] = (Position of (Picked unit))
          • Set tempPoint = (casterPoint[cv] offset by 30.00 towards chainspellAngle[cv] degrees)
          • Set chainspellCurrentDistances[cv] = (chainspellCurrentDistances[cv] + 30.00)
          • Unit - Turn collision for (Picked unit) Off
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • chainspellCurrentDistances[cv] Greater than or equal to chainspellDistances[cv]
            • Then - Actions
              • Lightning - Destroy chainspellLightning[cv]
              • Unit - Cause (Picked unit) to damage chainspellTarget[cv], dealing chainspellDamages[cv] damage of attack type Spells and damage type Normal
              • Unit Group - Remove (Picked unit) from chainspellGroup
              • Unit - Turn collision for (Picked unit) On
              • Special Effect - Create a special effect at (Position of chainspellTarget[cv]) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
              • Special Effect - Destroy (Last created special effect)
              • Set chainspellCounts = (chainspellCounts - 1)
              • Set chainspellCurrentDistances[cv] = 0.00
              • Custom script: call RemoveLocation(udg_tempPoint)
              • Custom script: call RemoveLocation(udg_casterPoint[udg_cv])
              • Custom script: call RemoveLocation(udg_targetPoint[udg_cv])
              • Custom script: call DestroyGroup(udg_chainspellTargetGroup[udg_cv])
            • Else - Actions
              • Unit - Move (Picked unit) instantly to tempPoint
              • Lightning - Destroy chainspellLightning[cv]
              • Lightning - Create a Magic Leash lightning effect from source casterPoint[cv] to target targetPoint[cv]
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • chainspellCounts Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
here is a test map. please give me feedback about this spell, don't let my time go in waste.
 

Attachments

  • Chain Spell.w3x
    25.2 KB · Views: 64
Level 12
Joined
Sep 11, 2011
Messages
1,176
You're leaking points in the Else - Actions section.

could you point me which one leaks ?

EDIT : oh, i see where you're pointing.

i think you misunderstood the phase, it's like this

when the current distance of the hero is greater than or equal to the distance between hero and target, the location will be removed, else the hero will keep moving until the current distance gets greater than or equal to the distance between hero and target, therefore the location will be removed.
 
Last edited:
Status
Not open for further replies.
Top