• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

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?
 
  • 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.
Back
Top