Fade filter for one player only

216199

Member
Reaction score
11
In my game heroes can buy an ancient map from a merchant, and refer to it to pass a labyrinth-forest. I want each player to be able to watch the map (it takes up the whole screen) as long as he wants, while others can still play without seeing the map across their entire screens.
Here are my triggers:

Trigger:
  • Initialize LocalPlayer
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Custom script: set udg_LocalPlayer = GetLocalPlayer()


Trigger:
  • View Map
    • Events
      • Unit - A unit Uses an item
    • Conditions
      • (Item being manipulated) Equal to (Ancient map)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Triggering player) Equal to LocalPlayer
        • Then - Actions
          • Cinematic - Fade out over 1.00 seconds using texture Map and color (100.00%, 100.00%, 100.00%) with 0.00% transparency
        • Else - Actions


Trigger:
  • Hide Map
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
      • Player - Player 2 (Blue) skips a cinematic sequence
      • Player - Player 3 (Teal) skips a cinematic sequence
      • Player - Player 4 (Purple) skips a cinematic sequence
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Triggering player) Equal to LocalPlayer
        • Then - Actions
          • Cinematic - Fade in over 1.00 seconds using texture Map and color (100.00%, 100.00%, 100.00%) with 0.00% transparency
        • Else - Actions


The problem comes from the third trigger "Hide Map". When I press Escape the game server splits me from everyone else. However, when I click on the Map item (second trigger), the map is shown and I am not removed from the game. I don't understand, if hiding a fade filter alters the game state and server splits me, then why showing it does not?? lol

Also, if I remove the condition in the third trigger, the problem is gone, but I don't want pressing Escape to hide the map for everyone, only for the person pressing it.
 

wewso

New Member
Reaction score
11
maybe setting an integer for the players number and then checking the integer will solve your problem:cool:
 

darkbeer

Beer is Good!
Reaction score
84
dont set GetLocalPlayer() to a variable it will return different things for every player and desync.

just do:

Code:
Hide Map
    Events
        Player - Player 1 (Red) skips a cinematic sequence
        Player - Player 2 (Blue) skips a cinematic sequence
        Player - Player 3 (Teal) skips a cinematic sequence
        Player - Player 4 (Purple) skips a cinematic sequence
    Conditions
    Actions
        CustomScript: if GetLocalPlayer() == GetTriggerPlayer() then 
        Cinematic - Fade in over 1.00 seconds using texture Map and color (100.00%, 100.00%, 100.00%) with 0.00% transparency
        CustomScript: endif
 

216199

Member
Reaction score
11
I removed the
Custom script: set udg_LocalPlayer = GetLocalPlayer()
and tried your way but it still desyncs me.
 

Frosthowl

TH.net Regular
Reaction score
15
I saw a jass script that made the fade filter work for only one person on wc3.search...its gone now though. It is possible though =D
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top