• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

How to remove a graphic effect on unit?

Status
Not open for further replies.

Nite

N

Nite

Hi all, i'd like to create a graphic effect on a unit when it enters into a specific area. I made it with "create graphic effect attacked to the overhead of the unit etc.." but here is the problem, how can i remove this effect when the unit leaves the area? I made antother trigger with event "unit leave area" but what for actions? There is only a trigger with "Remove last created special effect" but if another unit is entered in the same area before the first unit has left it then the last created effect is the one on the second unit..

help me pls

bye thx

Another little questions, what are the other point of a unit where i can attach a graphic effect? In the editor there is by default "overhead" :)
 
unit enters rect

set 'integer variable' is 'integer variable number+1'
create effect
set 'effect variable, array 'integer variable'' is last created special effect

(and other trigger that removes that effect)

u have these attachments:
head
overhead
chest, left, right
hand, left, right
foot
weapon (for heroes)
 
thanks all for help!

chest, left, right
hand, left, right

how i have to use those? i have to write "chest, left" for example?

thx
 
yes, you literally have to type in
hand
left
each as different strings. didn't know that you could use l/r for chest tho.
 
But in answer to the question which you asked, instead of the one that has been answered:
Use Ramza's method of putting all the effects into an array, then set the custom value of the unit to that array index. You then remove the effect in the array corresponding to the leaving unit's custom value.
 
Status
Not open for further replies.
Back
Top