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

storing+removing an effect

Status
Not open for further replies.
Level 5
Joined
Apr 22, 2008
Messages
139
i am using a trigger to attach a special effect to a building as a work animation for researching.
how would i make it so that when the research finishes or is canceled, i can remove the effect?
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Effect_Hash = (Last created hashtable)
  • Untitled Trigger 064
    • Events
      • Unit - A unit Begins research
    • Conditions
    • Actions
      • Special Effect - Create a special effect attached to the overhead of (Triggering unit) using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
      • Hashtable - Save Handle Of(Last created special effect) as (Key effect) of (Key (Triggering unit)) in Effect_Hash
  • Untitled Trigger 064 Copy
    • Events
      • Unit - A unit Finishes research
    • Conditions
    • Actions
      • Special Effect - Destroy (Load (Key effect) of (Key (Triggering unit)) in Effect_Hash)
      • Hashtable - Clear all child hashtables of child (Key (Triggering unit)) in Effect_Hash
Or you can use a special effect array with some indexing system.
 
Status
Not open for further replies.
Top