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

Vertex coloring / hiding units for one player only

Status
Not open for further replies.
Level 2
Joined
Apr 29, 2008
Messages
8
I have created some Buildings, now i want the roof (single flying locust unit) to be vertex colored to 70% when some unit enters the area under it.

It works, but i wan't to vertex color/hide the unit for one person only.

So if red enters it, all see the roof but red.
If blue joins. all see the roof but red and blue.
How to achieve this?

I hope you get what i mean.
 
Level 2
Joined
Apr 29, 2008
Messages
8
well, i have a some sort similar trigger:

  • Enter House
    • Events
      • Unit - A unit enters House <gen>
    • Conditions
      • (Owner of (Entering unit)) equal LocalPlayer
    • Actions
      • Animation - Change Roof big 0013 <gen>'s vertex coloring to (100.00%, 100.00%, 100.00%) with 70.00% transparency
Causes a desync
 

Rui

Rui

Level 41
Joined
Jan 7, 2005
Messages
7,550
MeKC, it's obvious that it causes a desync. The GetLocalPlayer() returns the player in the computer.
Your function (and WAHH's) hide (or change) the unit for player Red, but not for any other player. Problem is, you're messing with an in-game object, and having a unit hidden for Red and not for other players causes those two players to literally not be in the same game anymore, thus the desync.

You could always use the camera instead, or create an indoor space in the map specifically for that house.
 
Level 9
Joined
Jul 3, 2008
Messages
495
Im 90% sure that that vertex color dosent cause desync:
If anyone are able to test please do it. Heres the script:

JASS:
    if GetLocalPlayer() == Player(0) then
        call SetUnitVertexColorBJ( udg_u, 100, 100, 100, 100.00 )
    endif
 
Level 2
Joined
Apr 29, 2008
Messages
8
I fixed it, with the help of some others, actually its really weird.

If you put it this way it doesn't cause a desync:

  • Enter House
    • Events
      • Unit - A unit enters House <gen>
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Conditions
          • (Owner of (Entering unit)) equal LocalPlayer
        • 'THEN'-Actions
          • Animation - Change Roof big 0013 <gen>'s vertex coloring to (100.00%, 100.00%, 100.00%) with 70.00% transparency
          • Animation - Change Roof big 0014 <gen>'s vertex coloring to (100.00%, 100.00%, 100.00%) with 70.00% transparency
          • Animation - Change Roof 0015 <gen>'s vertex coloring to (100.00%, 100.00%, 100.00%) with 70.00% transparency
          • Animation - Change Roof 0016 <gen>'s vertex coloring to (100.00%, 100.00%, 100.00%) with 70.00% transparency
          • Animation - Change Roof 0017 <gen>'s vertex coloring to (100.00%, 100.00%, 100.00%) with 70.00% transparency
          • Animation - Change Roof 0018 <gen>'s vertex coloring to (100.00%, 100.00%, 100.00%) with 70.00% transparency
          • Animation - Change Roof 0019 <gen>'s vertex coloring to (100.00%, 100.00%, 100.00%) with 70.00% transparency
          • Animation - Change Roof 0020 <gen>'s vertex coloring to (100.00%, 100.00%, 100.00%) with 70.00% transparency
        • 'ELSE'-Actions
          • Do nothing
 
Level 2
Joined
Apr 29, 2008
Messages
8
I tried a very similar trigger which caused a desync. I didn't test yours though, i had no clue how to use it.
 
Level 2
Joined
Aug 10, 2008
Messages
16
If your map doesn't include invisibility or the like you could use true sight. You could have all units have truesight and remove truesight when you enter the building. Have the roof have permanent invis and that should work without desync. (hopefully)

If the map has invisibility, I don't think theres an alternative that I know of, except changing a players camera angle to show inside the building, yet that limits the player.

I could make a map to explain this if your interested.
 
Level 3
Joined
Feb 16, 2007
Messages
31
Well, I got a weird idea, but you could make every player have their own roof unit there, and the roofs are invisible so only you can see it(unless you have sharevision with the others) and when you enter the structure it removes your roof unit/doodad and voila it disappears, and when you leave it creates it back there.
 
Status
Not open for further replies.
Top