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

Removing Special Effects

Status
Not open for further replies.
Level 11
Joined
Nov 12, 2006
Messages
765
Hello fellow map makers, i need help with removeing a special effect. Once a certain building is created (incom and KDY seen below), i create a special "space dock" ontop of it. Now when the host unit (incom and KDY) dies, the special effect is not removed. For this situation the "destroy last created special effect" feature will not work. Can anyone help me set up a trigger to destroy the special effect?

Events
Unit - A unit Finishes construction
Conditions
Or - Any (Conditions) are true
Conditions
(Unit-type of (Triggering unit)) Equal to Incom Shipbuilding
(Unit-type of (Triggering unit)) Equal to KDY Shipbuilding
Actions
Special Effect - Create a special effect attached to the overhead of (Triggering unit) using drydock_squished.mdx



I also had a non-trigger solution i have not tried yet. If i do somthing like..

event - a unit dies
condition - unit = incom/kdy
action - pick every unit within 5 of triggering unit
remove picked unit

Will this work to destroy the special effect around it? if i make the special effect into a unit first (right now its running straight out of the imported model file), and then when creating the effect i use "drydock unit" to create it - will this work for the above trigger?

This thread has helped 1 person!
Has this thread helped you? [self="http://www.hiveworkshop.com/forums/newreply.php?do=newreply&noquote=1&p=689606"]Leave a comment[/self]!
 
Last edited by a moderator:
Level 3
Joined
May 19, 2008
Messages
32
are you also using jass? because with jass you can simply use a handle as a pointer to the effect using e.g. http://forums.dota-allstars.com/index.php?showtopic=92616

with gui you can use a global variable (str-b in the trigger editor) of the type effect to do something like
----------------------------------------
Create Special effect
set variable youNameIt = LastCreatedSpecialEffect

and then whenever you desire use
DestroySpecialEffect ( Variable)
----------------------------------------

hope that helps
 
Level 28
Joined
Mar 25, 2008
Messages
2,955
Kay, if you do it this way, don't forget to set the array right according to the playernumber.
Like:
  • Actions
    • set drydock_effect[(Player Number of (Triggering Player))] = (Last created special effect)
It's getting a bit more difficult if more than one of this building can be built at a time..
 
Status
Not open for further replies.
Top