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

[Trigger] Whats wrong here?

Status
Not open for further replies.
Level 8
Joined
Aug 4, 2008
Messages
279
  • Area Congelada
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Area Congelada
    • Actions
      • Set AC_IT[1] = (AC_IT[1] + 1)
      • Set AC_TP[AC_IT[1]] = (Target point of ability being cast)
      • For each (Integer AC_IT[1]) from 1 to 10, do (Actions)
        • Loop - Actions
          • Set AC_Point[AC_IT[1]] = (AC_TP[AC_IT[1]] offset by 100.00 towards AC_Angle[AC_IT[1]] degrees)
          • Special Effect - Create a special effect at AC_Point[AC_IT[1]] using Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation (udg_AC_Point[udg_AC_IT[1]])
          • Set AC_Point[AC_IT[1]] = (AC_TP[AC_IT[1]] offset by 200.00 towards AC_Angle[AC_IT[1]] degrees)
          • Special Effect - Create a special effect at AC_Point[AC_IT[1]] using Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation (udg_AC_Point[udg_AC_IT[1]])
          • Set AC_Point[AC_IT[1]] = (AC_TP[AC_IT[1]] offset by 300.00 towards AC_Angle[AC_IT[1]] degrees)
          • Special Effect - Create a special effect at AC_Point[AC_IT[1]] using Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation (udg_AC_Point[udg_AC_IT[1]])
          • Set AC_Angle[AC_IT[1]] = (AC_Angle[AC_IT[1]] + 36.00)
      • Custom script: call RemoveLocation (udg_AC_TP[udg_AC_IT[1]])
Seens to work, but it doesnt create all special effects at all, and the TP point is not reseted.
 
Level 16
Joined
Mar 3, 2006
Messages
1,564
  • Area Congelada
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Area Congelada
    • Actions
      • Set index = (index + 1)
      • Set AC_TP[index] = (Target point of ability being cast)
      • For each (Integer i) from 1 to index, do (Actions)
        • Loop - Actions
          • Set AC_Point[i] = (AC_TP[i] offset by 100.00 towards AC_Angle[i] degrees)
          • Special Effect - Create a special effect at AC_Point[i] using Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation (udg_AC_Point[udg_i])
          • Set AC_Point[i] = (AC_TP[i] offset by 200.00 towards AC_Angle[i] degrees)
          • Special Effect - Create a special effect at AC_Point[i] using Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation (udg_AC_Point[udg_i])
          • Set AC_Point[i] = (AC_TP[i] offset by 300.00 towards AC_Angle[i] degrees)
          • Special Effect - Create a special effect at AC_Point[i] using Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation (udg_AC_Point[udg_i])
          • Set AC_Angle[i] = (AC_Angle[i] + 36.00)
      • Custom script: call RemoveLocation (udg_AC_TP[udg_i])
Your variable AC_IT[1] is now index
 
Level 16
Joined
Mar 3, 2006
Messages
1,564
If you create a special effect and then immediately destroy it, then will the game still produce the special effect? I've been under the impression that it takes effect immediately, so I only destroy my special effects after some wait time.
No, special effects play first then destroyed after the animation has ended with one exception to FlameStrike SFX that needs a wait which will cause problems in MUI so most of the people avoid using it. This explanation was in the Thread Things That Leaks
 
Status
Not open for further replies.
Top