• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Does this make sense?

Status
Not open for further replies.
Level 8
Joined
Jul 10, 2018
Messages
383
So i was wondering if i could Destroy special effect like this.

  • SpecialEffect Destroyer
    • Events
      • Time - Every 60.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 25, do (Actions)
        • Loop - Actions
          • Special Effect - Destroy (Last created special effect)
to remove all Special effects from the Map coz my map use alot of Special effect and i can't seem to find a solution for that.
 
Level 15
Joined
Mar 25, 2016
Messages
1,327
no, everytime a new special effect is created (Last created special effect) gets overwritten.

Your trigger would try to destroy the same special effect 25 times.

You need to store your special effects in variables or hashtables and destroy them later. A lot of special effects can be destroyed instantly, if you only need their death animation.
 
Level 8
Joined
Jul 10, 2018
Messages
383
no, everytime a new special effect is created (Last created special effect) gets overwritten.

Your trigger would try to destroy the same special effect 25 times.

You need to store your special effects in variables or hashtables and destroy them later. A lot of special effects can be destroyed instantly, if you only need their death animation.
How do you want me to store them as Variables there's alot of SpecialEffects
 

~El

~El

Level 17
Joined
Jun 13, 2016
Messages
558
How do you want me to store them as Variables there's alot of SpecialEffects

Unfortunately, that's on you to figure it out. You can store them in an array. Arrays can handle 32768 elements in version 1.29+, and 8192 in prior versions.

Alternatively, like Jampion said, you can store them in hashtables. Unfortunately, there's not really a way around this if you want to destroy them.
 
Level 8
Joined
Jul 10, 2018
Messages
383
Unfortunately, that's on you to figure it out. You can store them in an array. Arrays can handle 32768 elements in version 1.29+, and 8192 in prior versions.

Alternatively, like Jampion said, you can store them in hashtables. Unfortunately, there's not really a way around this if you want to destroy them.
Thanks for telling me that noted for Future.
 
Status
Not open for further replies.
Top