• 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.
  • It's time for the first HD Modeling Contest of 2025. Join the theme discussion for Hive's HD Modeling Contest #7! Click here to post your idea!

how to make unit visible ONLY for owning player?

Status
Not open for further replies.
  • Set Point1 = (Your Point)
  • Unit - Create 1 Unit for (Your Player) at (Point1) facing default building degrees
  • Animation - Change (Last created unit)'s vertex coloring to (100.00%,100.00%,100.00%) and 100% transparency
  • Set Owner = (Owner of (Last created unit))
  • Custom script: if GetLocalPlayer() == udg_Owner then
  • Animation - Change (Last created unit)'s vertex coloring to (100.00%,100.00%,100.00%) and 0% transparency
  • Custom script: endif
  • Custom script: call RemoveLocation (udg_Point1)
 
Level 8
Joined
Mar 12, 2008
Messages
437
If it does not work you can actually add Permanent Invisibility so the owner can only see it while the others cannot.

Supposing that the player has got allies, it will not work (unless shared vision is turned off).

Note that Pharaoh_'s trigger will still make the enemy units selectable, and you can see their shadows, etc. They will just be 100% transparent.
 
Level 14
Joined
Mar 4, 2009
Messages
1,156
Permanent Invisibility would be the way to go. Your trigger may work, but the worst chance is that it'll cause a split.
but that makes him visible for allies...

EDIT:

add nvisibility TO (Your Unit)
make all allies of owner of unit (Your Unit) to treat owner of unit (Your unit) as an (just) ally

-pick every unit that is not equal to (Your Unit)
--pick every player in (all allies of owner of unit Your Unit) and do actions
-grant shared vision of picked unit to picked player



grant shared vision of all units accept the one with invisibility to all his allies...
 
Last edited:
Status
Not open for further replies.
Top