• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

How to remove a graphic effect on unit?

Status
Not open for further replies.
Level 2
Joined
Aug 24, 2006
Messages
8
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" :)
 
Level 22
Joined
Jan 10, 2005
Messages
3,426
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)
 
Level 2
Joined
Aug 24, 2006
Messages
8
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
 
Level 24
Joined
Jun 26, 2006
Messages
3,406
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.
 
Level 5
Joined
Nov 21, 2005
Messages
100
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.
Top