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

Multiple Special effect

Status
Not open for further replies.
Level 4
Joined
Aug 22, 2008
Messages
100
How do I remove the this special effect?
  • Treant Ressurection
    • Events
      • Time - Every 90.00 seconds of game time
    • Conditions
      • (Boss1 is alive) Equal to True
    • Actions
      • Unit - Pause Boss1
      • Unit - Make Boss1 Invulnerable
      • Unit Group - Pick every unit in (Units within 2000.00 of (Position of Boss1) matching ((((Matching unit) is A Hero) Equal to True) and (((Matching unit) belongs to an enemy of Player 12 (Brown)) Equal to True))) and do (Actions)
        • Loop - Actions
          • Unit - Pause (Picked unit)
          • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\NightElf\EntanglingRoots\EntanglingRootsTarget.mdl
 
Level 4
Joined
Aug 22, 2008
Messages
100
If a new special effect is created in the wait time then that special effect will be removed or am I wrong?
(There should be a wait there too forgot to add it srry)
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Create a variable of type Special Effect, make it an array. Create another, integer. It doesn't need to be an array.

  • Set Temp_Integer_1 = 0
  • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
    • Loop - Actions
      • Special Effect - Create a special effect at (Center of (Playable map area)) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
      • Set Temp_Effect_Array[Temp_Integer_1] = (Last created special effect)
      • Set Temp_Integer_1 = (Temp_Integer_1 + 1)
And then destroy them:

  • For each (Integer A) from 0 to Temp_Integer_1, do (Actions)
    • Loop - Actions
      • Special Effect - Destroy Temp_Effect_Array[(Integer A)]
 
Level 4
Joined
Dec 30, 2008
Messages
41
maker is right.you need to destory every special effect. doing destroy last created special effect wont do the trick...you need to set them all to a variable...also it would help if u set you set the group within that region to a variable
 
Status
Not open for further replies.
Top