• 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.

[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 16
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
 
Level 18
Joined
Jun 13, 2016
Messages
586
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