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

[Trigger] White mask's for only one player.

Status
Not open for further replies.
Level 2
Joined
Apr 26, 2007
Messages
17
As the title suggests, I need to know how how to apply a white mask to only one player. I'm using WE, not WEU, and if I want to apply a white mask, it doesn't give me an option to only apply a white mask to only one player. The idea I have in mind is to make a flashbang grenade, which blinds people in an area around where the grenade lands, and it blinds you more if your unit is facing the grenade.

Thanks in advance :D
 
Level 18
Joined
May 27, 2007
Messages
1,689
weird i probably could help and test it if i could find the thing that turns on the white mask, but i can only find a black mask. but what i would do is use variables for the owner of the units in the region around and then add those players to a player group then apply white mask, but im not sure if that would work right
 
Level 13
Joined
Aug 31, 2005
Messages
823
The only way I could think to do it (without using JASS) would be to create a large doodad at the position of the explosion that has a bright particle emitter (like the Chain Lightning Missile model). Anyway, Im sure the JASS solution would look much better, but I wouldnt know how to do it.
 
Level 2
Joined
Apr 26, 2007
Messages
17
Is there any way I can do it with JASS? I can do a bit of JASS, but not enough for most of the things I do.
i probably could help and test it if i could find the thing that turns on the white mask, but i can only find a black mask

The thing to get a white mask is Cinematic - Advanced filter. So i'm gonna start with the white mask with no transparency, and then end up with with full transparency so they can't see it an more.
 
Level 18
Joined
May 27, 2007
Messages
1,689
ahh alright cus what i tried to do was just use a black mask and set the variable "Banged" to the owner of units in region, then i probably didnt need this but added the player "banged" to a player group and created a modifier region for all players in player group it seemed to work, but it didnt last for anytime at all what happened was the screen sort of flashed and the units dissapeared for a flash
 
The thing i found is from WEU (i think so bc i forgot it and dont have WEU )
But it works fine
JASS:
function CinematicFilterGenericForPlayer takes player whichPlayer, real duration, blendmode bmode, string tex, real red0, real green0, real blue0, real trans0, real red1, real green1, real blue1, real trans1 returns nothing
  if GetLocalPlayer() == whichPlayer then
    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)
  endif
endfunction
 
Status
Not open for further replies.
Top