Warcraft III resources & community, 2003–2006 · archived

Unit visibility

4 posts
#1

Unit visibility

How can you make a unit visible to all players after it starts construction and then turn off the visibility if the units is destroyed?
#2
here are the triggers, one for share vision one for deactivating:

>1st trigger:

Events
    Unit - A unit Begins construction

Conditions
    (Constructing structure) Equal to No unit

Actions
    Player Group - Pick every player in (All players) and do (Actions)
        Loop - Actions
            Unit - Grant shared vision of (Constructing structure) to (Picked player)


>2nd trigger:

Events
    Unit - A unit Dies

Conditions
    (Dying unit) Equal to No unit

Actions
    Player Group - Pick every player in (All players) and do (Actions)
        Loop - Actions
            Unit - Deny shared vision of (Dying unit) to (Picked player)




thats all. if you have more units than one that should share vision, just remove the condition and put an if-then-else action before the actions above. if somethin is still unclear, post again and i give you the trigger for that too. :wink:
#3
Dude thanks alot. It works fine. I'm not an experienced trigger maker so I need help on stuff like this that seems simple. Haven't ever used the PLayer Group commands before. :D :D :D
#4
no problem at all :D