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

RadiuS.x

Active Member
Reaction score
2
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?
 
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.
 
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.
 
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.
 
Cant you set GetLocalPlayer to a variable if true? and utilize the variable? wouldn't that be safer?
 
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.
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good
  • The Helper The Helper:
    I would like to see it again like Ghan had it the first time with pagination though - without the pagination that view will not work but with pagination it just might...
  • The Helper The Helper:
    This drink recipe I have had more than a few times back in the day! Mind Eraser https://www.thehelper.net/threads/cocktail-mind-eraser.194720/

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top