JASS Spell Causes Server Splits

illidan92

New Member
Reaction score
6
I've asked a few people and they have no idea and I don't know what to do with this trigger to stop it.
Code:
function Trig_Scope_Fade_Filter_Conditions takes nothing returns boolean
   return ( GetSpellAbilityId() == 'A01O' ) 
endfunction

function Trig_Scope_Fade_Filter_Actions takes nothing returns nothing
if GetLocalPlayer() == GetOwningPlayer(GetTriggerUnit()) then
    call CinematicFilterGenericBJ( 0.20, BLEND_MODE_BLEND, "ReplaceableTextures\\CameraMasks\\Scope_Mask.blp", 0.00, 0.00, 0.00, 100.00, 0, 0, 0, 0.00 )
    call TriggerSleepAction( 5.00 )
    call CinematicFilterGenericBJ( 0.20, BLEND_MODE_BLEND, "ReplaceableTextures\\CameraMasks\\Scope_Mask.blp", 0.00, 0.00, 0.00, 0.00, 0, 0, 0, 100.00 )
    endif
endfunction

//===========================================================================
function InitTrig_Scope_Fade_Filter takes nothing returns nothing
  local trigger t = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( t, Condition( function Trig_Scope_Fade_Filter_Conditions ) )
    call TriggerAddAction( t, function Trig_Scope_Fade_Filter_Actions )
set t = null
endfunction
 

Hero

─║╣ero─
Reaction score
250
Correct me if I am wrong but are you using the local trigger correctly?

Cause it looks wrong to me for some reason...


_______________________
Note: I only used it twice...
 

Jazradel

Helping people do more by doing less.
Reaction score
102
I'm guessing it's the wait. Do it like this:
Code:
if GetLocalPlayer() == GetOwningPlayer(GetTriggerUnit()) then
    call CinematicFilterGenericBJ( 0.20, BLEND_MODE_BLEND, "ReplaceableTextures\\CameraMasks\\Scope_Mask.blp", 0.00, 0.00, 0.00, 100.00, 0, 0, 0, 0.00 )
endif
    call TriggerSleepAction( 5.00 )
if GetLocalPlayer() == GetOwningPlayer(GetTriggerUnit()) then
    call CinematicFilterGenericBJ( 0.20, BLEND_MODE_BLEND, "ReplaceableTextures\\CameraMasks\\Scope_Mask.blp", 0.00, 0.00, 0.00, 0.00, 0, 0, 0, 100.00 )
endif
 

Xorifelse

I'd love to elaborate about discussions...........
Reaction score
87
Btw.. If there is a JASS Zone... Why don't you post there...?
If you are gonna use ^ function then.. besure to add an endif or the WE will crash..


It is the TriggerSleepAction()
use PolledWait() instead.
You can do it the same as your first posted trigger.
 

Xorifelse

I'd love to elaborate about discussions...........
Reaction score
87
Code:
    call CinematicFilterGenericBJ

NEVER use a traditionnal filter with GetLocalPlayer(). It is free of Desync and Game Splits, use instead an Advanced Filter.

How about this:
Never use BJ functions?
 

Chocobo

White-Flower
Reaction score
409
How about this:
Never use BJ functions?

:p

If you don't understand clearly what I mean, it is GetLocalPlayer() desyncs with a traditionnal filter.

That thing :

Code:
function CinematicFilterGenericBJ takes real duration,blendmode bmode,string tex,real red0,real green0,real blue0,real trans0,real red1,real green1,real blue1,real trans1 returns nothing
    call AbortCinematicFadeBJ()
    call SetCineFilterTexture(tex)
    call SetCineFilterBlendMode(bmode)
    call SetCineFilterTexMapFlags(TEXMAP_FLAG_NONE)
    call SetCineFilterStartUV(0, 0, 1, 1)
    call SetCineFilterEndUV(0, 0, 1, 1)
    call SetCineFilterStartColor(PercentTo255(red0), PercentTo255(green0), PercentTo255(blue0), PercentTo255(100-trans0))
    call SetCineFilterEndColor(PercentTo255(red1), PercentTo255(green1), PercentTo255(blue1), PercentTo255(100-trans1))
    call SetCineFilterDuration(duration)
    call DisplayCineFilter(true)
endfunction
 
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