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

[Spell] Disable vision for X players spell

Status
Not open for further replies.
Level 4
Joined
Feb 9, 2010
Messages
48
Greetings.

I'm trying to create a certain spell for a hero:

Upon casting the spell, the screen goes black (And keeps being black) for X seconds (X = Depending on the level of ability, not entirely sure with what numbers to go to balance it out) for ALL players except for the owner of casting unit.

I know how to make a blackscreen for all players, but making it for some players is beyond my skills.

From start I have to say that while I can understand any wc3 triggers you throw at me (so the classical event, condition, action), I have no knowledge of JASS and won't understand anything from it. Unless all it requires is me copying the trigger to my map and just changing units/spells/something.

Thanks in advance.
 
Level 19
Joined
Dec 12, 2010
Messages
2,074
JASS:
call SetCineFilterTexture("IDontKnowYouCanFindProperTextureInWC3mpq.blp")
    call SetCineFilterBlendMode(BLEND_MODE_BLEND)
    call SetCineFilterTexMapFlags(TEXMAP_FLAG_NONE)
    call SetCineFilterStartUV(0, 0, 1, 1)
    call SetCineFilterEndUV(0, 0, 1, 1)
    call SetCineFilterStartColor(128, 226, 255, 200)
    call SetCineFilterEndColor(128, 226, 255, 0)
    call SetCineFilterDuration(1.)
    call DisplayCineFilter(GetLocalPlayer()!=CasterPlayerHere)
just find proper texture in WC3 MPQ, they must be located in some folder with proper name. or you can import your own simply. put black dot 1x1 as blp and use that
 
Level 4
Joined
Feb 9, 2010
Messages
48
JASS:
call SetCineFilterTexture("IDontKnowYouCanFindProperTextureInWC3mpq.blp")
    call SetCineFilterBlendMode(BLEND_MODE_BLEND)
    call SetCineFilterTexMapFlags(TEXMAP_FLAG_NONE)
    call SetCineFilterStartUV(0, 0, 1, 1)
    call SetCineFilterEndUV(0, 0, 1, 1)
    call SetCineFilterStartColor(128, 226, 255, 200)
    call SetCineFilterEndColor(128, 226, 255, 0)
    call SetCineFilterDuration(1.)
    call DisplayCineFilter(GetLocalPlayer()!=CasterPlayerHere)
just find proper texture in WC3 MPQ, they must be located in some folder with proper name. or you can import your own simply. put black dot 1x1 as blp and use that

As I stated in the first post, I don't even know how to edit those code lines properly. My JASS knowledge is non-existant. If you could be so nice and create a dummy map with the mechanics implemented, just so I can copy-paste it, it would be great.
 
Level 45
Joined
Feb 27, 2007
Messages
5,578
Hackey workaround but you can put whatever you'd normally do to black the screen for all players inside of a GetLocalPlayer() block. This won't desync as it's purely visual. You'll need to do:
  • Set PLAYER_VARIABLE = Owning Player of (triggering unit) //or however you get the unit
  • Custom script: if GetLocalPlayer() != udg_PLAYER_VARIABLE then //note you must add "udg_" before whatever you named the variable
  • ------- Do your screen darkening AND ONLY THAT here -------
  • Custom script: endif
If you have a wait in the 'screen darkening' part, you could do this:
  • Set PLAYER_VARIABLE = Owning Player of (triggering unit) //or however you get the unit
  • Custom script: if GetLocalPlayer() != udg_PLAYER_VARIABLE then //note you must add "udg_" before whatever you named the variable
  • ------- DARKEN -------
  • Custom script: endif
  • Wait 2.00 game-time seconds
  • Custom script: if GetLocalPlayer() != udg_PLAYER_VARIABLE then //note you must add "udg_" before whatever you named the variable
  • ------- UNDARKEN -------
  • Custom script: endif
 
Last edited:
Level 4
Joined
Feb 9, 2010
Messages
48
Hackey workaround but you can put whatever you'd normally do to black the screen for all players inside of a GetLocalPlayer() block. This won't desync as it's purely visual. You'll need to do:
  • Set PLAYER_VARIABLE = Owning Player of (triggering unit) //or however you get the unit
  • Custom script: if GetLocalPlayer() != udg_PLAYER_VARIABLE then //note you must add "udg_" before whatever you named the variable
  • ------- Do your screen darkening AND ONLY THAT here -------
  • Custom script: endif
If you have a wait in the 'screen darkening' part, you could do this:
  • Set PLAYER_VARIABLE = Owning Player of (triggering unit) //or however you get the unit
  • Custom script: if GetLocalPlayer() != udg_PLAYER_VARIABLE then //note you must add "udg_" before whatever you named the variable
  • ------- DARKEN -------
  • Custom script: endif
  • Wait 2.00 game-time seconds
  • Custom script: if GetLocalPlayer() != udg_PLAYER_VARIABLE then //note you must add "udg_" before whatever you named the variable
  • ------- UNDARKEN -------
  • Custom script: endif

Works just perfect, thanks a lot.
 
Status
Not open for further replies.
Top