Why won't this Fade Filter for Specific Player in JASS work?

RadiuS.x

Active Member
I'm trying to run a Fade Filter for the owner of a unit who enters a specific region.

Events
Unit - A unit enters Region 000 <gen>
Conditions
Actions
Custom script: if ( GetLocalPlayer() == GetOwningPlayer(GetTriggerUnit()) ) then
Cinematic - Fade out and back in over 2.00 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
Custom script: endif

I have 2 user players setup in game. (Player 1 Red, and Player 2 Blue).
If I walk to the region with a unit owned by me (Player 1 Red), the other player drops (Player 2 Blue), but I don't. How do I fix?
 

ZakkWylde-

New Member
When the player drops, that is because that player desyncs--you are in one game-state and Player 2 is in another (or he is simply disconnected). That is one of the problems of GetLocalPlayer() if used improperly. The tutorial I linked earlier (which it seems you might have read) should mention how to use it properly. I'm not entirely sure what it is about Cinematic that cannot be done for one player only, but maybe someone else will know more.
 

RadiuS.x

Active Member
Yeah, I did read that tut. Thanks by the way. As far as I know, I'm using GetLocalPlayer() properly, and I don't understand why it is causing desync.

Any help appreciated.
 

ZakkWylde-

New Member
From what I can tell, the Cinematic operations are FULL of function calls. Looking at the function in JASS (fading in and out with black mask...), it is many lines of code, most of which are other function calls that themselves are multiple lines of code. ("Red" functions, if you get to see them in JASS. They are not "natives" [purple].)

This leads me to believe that any number of things could be going wrong, as far desyncing. Maybe an effect is created for one player but not the other--and this is done improperly (as mentioned in the tutorial). Without sitting down and looking through all the functions (and then rewriting them so that they properly work with GetLocalPlayer() ), it seems downright impossible to fix the desync issue.

I could be wrong, and maybe someone else has figured this out.

Heck, if I have some time, I may try to locate the issue...but as of now, hope that someone else knows what's wrong :p.
 

inevit4ble

Well-Known Member
Cant you set GetLocalPlayer to a variable if true? and utilize the variable? wouldn't that be safer?
 

emootootoo

Top Banana
i use this in my quest system to display "QuestBox.blp" as a filter for a specific player (it's a box that i display text on)

whenever i want to show a player the filter i set "disalogDisplay[player number]" to true and call this function straight after

to hide it from the player i set "disalogDisplay[player number]" to false and call the function afterwards again

JASS:
private function UpdateQuestDialog takes nothing returns nothing
    local real trans = 100
    local integer i = 0
    loop
        exitwhen i &gt;= MAXPLAYERS
        if Player(i) == GetLocalPlayer() then
            if dialogDisplay<i> then
                set trans = 0
            endif
        endif
        set i = i + 1
    endloop
    call CinematicFilterGenericBJ(0,BLEND_MODE_BLEND,&quot;QuestBox.blp&quot;,0,0,0,100,100,100,100,trans)
endfunction</i>


sounds somewhat like what you want

tl;dr do what inevit4ble said and set transparency locally for a single fade filter
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    I really do not want to move to California otherwise I might consider it.
  • The Helper The Helper:
    yeah California is not anywhere you really want to live
  • The Helper The Helper:
    That is why I did not take the job Blizzard offered me back in the day, there is no way I could have moved my family there on what they were offering, not even close and that was like 20 years ago
  • The Helper The Helper:
    yeah they wanted me on the tech support team when they did not get me they got one of the next MVPs in Dinobot
  • The Helper The Helper:
    Dinobot was one of the youngest of the MVPs tkron probably could have worked for Blizzard but he had a good job in Chicago doing business programming already
  • The Helper The Helper:
    Dinobot probably still works for Blizzard would love to reconnect with that guy
  • The Helper The Helper:
    I wonder what ever happened to Wargasm?
  • The Helper The Helper:
    This new version of Xenforo really is awesome
  • Ghan Ghan:
    Wargasm is still around. He works for the domain registrar where thehelper.net is kept.
  • Varine Varine:
    Is sqrage still around?
  • The Helper The Helper:
    I have not seen him on lately the forum says he was last on 2 years ago
  • The Helper The Helper:
    How are you doing Varine have not seen you around in a minute
  • thewrongvine thewrongvine:
    lol I live in CA
  • thewrongvine thewrongvine:
    I've got some friends in animation department who have been applying for Blizzard, doing interviews and such. They said the workplace seems nice, though now it'd be all remote work I suppose
  • The Helper The Helper:
    good for them I live close to Austin and am trying to get my kids interested in getting into Games but not having much luck. I would never let them move to Cali.
  • The Helper The Helper:
    unless it was huge money
  • The Helper The Helper:
    and even then with the taxes I really could never let them move there
  • thewrongvine thewrongvine:
    Haha fair enough, I have no interest in CA at all as a living place either. Really only here just for the work in LA, but hopefully once I get settled enough in my work, I can move out
    +1
  • Ghan Ghan:
    +1
  • jonas jonas:
    " a traditionally-sized California family of one person ":cool:
    +1

    Members online

    No members online now.

    Affiliates

    Hive Workshop
    Top