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

I need help with this spell

Status
Not open for further replies.
Level 11
Joined
Aug 6, 2009
Messages
697
Everything works until unit A uses chidori on Unit B and Unit B uses chidori on Unit A at the same time.

Any ideas?

  • Int
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Visibility - Disable fog of war
      • Visibility - Disable black mask
      • Hashtable - Create a hashtable
      • Set ChidoriHash = (Last created hashtable)
      • Hashtable - Create a hashtable
      • Set NagashiHash = (Last created hashtable)
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • Hero - Learn skill for (Picked unit): Chidori
          • Hero - Learn skill for (Picked unit): Nagashi
  • Chidori
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Chidori
    • Actions
      • Set ChidoriCaster = (Casting unit)
      • Set ChidoriVictim = (Target unit of ability being cast)
      • Set ChidoriAngle = (Angle from (Position of (Target unit of ability being cast)) to (Position of (Triggering unit)))
      • Set ChidoriDistance = ((Distance between (Position of (Triggering unit)) and (Target point of ability being cast)) - 1.00)
      • Set ChidoriTime = (Distance between (Position of (Triggering unit)) and (Position of (Target unit of ability being cast)))
      • Hashtable - Save ChidoriAngle as 0 of (Key (Triggering unit)) in ChidoriHash
      • Hashtable - Save Handle OfChidoriCaster as 1 of (Key (Triggering unit)) in ChidoriHash
      • Hashtable - Save ChidoriTime as 2 of (Key (Target unit of ability being cast)) in ChidoriHash
      • Hashtable - Save Handle OfChidoriVictim as 3 of (Key (Triggering unit)) in ChidoriHash
      • Unit Group - Add (Triggering unit) to ChidoriChargeGroup
  • ChidoriLoop
    • Events
      • Time - Every 0.04 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in ChidoriChargeGroup and do (Actions)
        • Loop - Actions
          • Set ChidoriAngle = (Load 0 of (Key (Picked unit)) from ChidoriHash)
          • Set ChidoriCaster = (Load 1 of (Key (Picked unit)) in ChidoriHash)
          • Set ChidoriTime = (Load 2 of (Key (Picked unit)) from ChidoriHash)
          • Set ChidoriVictim = (Load 3 of (Key (Picked unit)) in ChidoriHash)
          • Special Effect - Create a special effect attached to the left hand of (Picked unit) using Abilities\Spells\Human\StormBolt\StormBoltMissile.mdl
          • Special Effect - Destroy (Last created special effect)
          • Special Effect - Create a special effect attached to the left hand of (Picked unit) using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
          • Special Effect - Destroy (Last created special effect)
          • Special Effect - Create a special effect attached to the left hand of (Picked unit) using Abilities\Weapons\Bolt\BoltImpact.mdl
          • Special Effect - Destroy (Last created special effect)
          • Unit - Turn collision for (Picked unit) Off
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Distance between (Position of (Picked unit)) and (Position of ChidoriVictim)) Greater than 120.00
            • Then - Actions
              • Set TempPoint = (Position of ChidoriCaster)
              • Set TempPoint2 = (Position of ChidoriVictim)
              • Unit - Move ChidoriCaster instantly to (TempPoint offset by ChidoriTime towards (Angle from TempPoint2 to TempPoint) degrees)
              • Hashtable - Save (ChidoriTime - 1.00) as 2 of (Key (Picked unit)) in ChidoriHash
              • Unit - Create 1 ChidoriBackShockDummy for Neutral Passive at (Position of ChidoriCaster) facing Default building facing degrees
              • Set ChidoriDummy = (Last created unit)
              • Unit - Turn collision for ChidoriDummy Off
              • Unit - Add a 0.10 second Generic expiration timer to ChidoriDummy
              • Custom script: call RemoveLocation (udg_TempPoint)
              • Custom script: call RemoveLocation (udg_TempPoint2)
            • Else - Actions
              • Special Effect - Create a special effect attached to the chest of ChidoriVictim using Abilities\Weapons\Bolt\BoltImpact.mdl
              • Special Effect - Destroy (Last created special effect)
              • Special Effect - Create a special effect attached to the origin of ChidoriVictim using Abilities\Spells\Orc\LightningBolt\LightningBoltMissile.mdl
              • Special Effect - Destroy (Last created special effect)
              • Special Effect - Create a special effect attached to the origin of ChidoriVictim using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
              • Special Effect - Destroy (Last created special effect)
              • Unit - Cause (Picked unit) to damage ChidoriVictim, dealing ((Real((Level of Chidori for (Picked unit)))) x 400.00) damage of attack type Chaos and damage type Normal
              • Unit - Turn collision for (Picked unit) On
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in ChidoriHash
              • Unit Group - Remove (Picked unit) from ChidoriChargeGroup
 

Kusanagi Kuro

Hosted Project: SC
Level 10
Joined
Mar 11, 2012
Messages
708
Since ur trigger is long so I think u should use hidden tag when posting here.
There something I dont understand in ur trigger:
  • Set ChidoriDistance = ((Distance between (Position of (Triggering unit)) and (Target point of ability being cast)) - 1.00)
  • Set ChidoriTime = (Distance between (Position of (Triggering unit)) and (Position of (Target unit of ability being cast))
  • Unit - Move ChidoriCaster instantly to (TempPoint offset by ChidoriTime towards (Angle from TempPoint2 to TempPoint) degrees)
  • Hashtable - Save (ChidoriTime - 1.00) as 2 of (Key (Picked unit)) in ChidoriHash
Doing that will cause the caster nearly instant teleport to the target and then deal damage (which means the loop is just useless).

Also, ur trigger have so many location leaks. Try to replace these Point by the Variables and clear them after using:
+Position of Triggering Unit
+Position of Target unit of ability being casted
+Position of Picked Unit
+TempPoint offset by ChidoriTime towards (Angle from TempPoint2 to TempPoint) degrees
I'll try to figure out what ur problem is. And may I ask does ur spell is a Homing spell or not?
 
Status
Not open for further replies.
Top