HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Fade Filter

06-30-2005, 12:00 AM#1
Thunder_Eye
Can I specify the fade filter to only one player?

If not is there any "fade filter like" thing that can?
06-30-2005, 01:12 AM#2
Guest
This might get a similar answer as to: http://www.wc3campaigns.com/showthread.php?t=76320
Except with fade filters...I don't know, I'm no "custom script" or "JASS" person.
06-30-2005, 01:16 AM#3
Guest
Yes you can through Jass if you know it or for those who don't know jass you can Use Weu it has an advanced trigger that will do the job.
06-30-2005, 11:06 PM#4
Thunder_Eye
Well WEU dont work on my comp (somehow) and I dont write JASS -.-

I converted this to custom text and can someone tell me where to change "GetLocalPlayer" and what to change to get 1 trigger for each player

Quote:
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
call CinematicFadeBJ( bj_CINEFADETYPE_FADEOUT, 0.00, "ReplaceableTextures\\CameraMasks\\Black_mask.blp", 0, 0, 0, 30.00 )
endfunction

//===========================================================================
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
set gg_trg_Untitled_Trigger_001 = CreateTrigger( )
call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
endfunction
07-01-2005, 10:04 AM#5
Anitarf
You don't need to convert the whole thing to JASS, you can just use custom scripts:

Code:
Set tempInteger = ((Player number of (Owner of (Ordered unit))))
Custom script:   if GetLocalPlayer() == GetConvertedPlayerID( udg_tempInteger ) then
Cinematic - Apply a filter over 0.01 seconds using Normal blending on texture Scope, starting with color (0.00%, 0.00%, 0.00%) and 100.00% transparency and ending with color (0.00%, 0.00%, 0.00%) and 0.00% transparency
Custom script:   endif

This is an example from one of my maps, just replace the "(Owner of (Ordered unit))" with whatever player you want the action to affect.

The fade filter action is the "Cinematic - Advanced filter", I used this one because I read someplace that one of the normal filters causes desync when used in this manner. To remove the filter, just use the same action, but switch the start and end transparencies in the filter action.
07-01-2005, 11:06 AM#6
Thunder_Eye
Ok, ty

I will test it as soon as possible.

EDIT: Well I doesnt seem to work for me, the "Expected Name" Appears.

this is how my code looks like, see any difference?

Code:
Untitled Trigger 001 Copy
    Events
        Player - Player 1 (Red) types a chat message containing -2 as An exact match
    Conditions
    Actions
        Set tempInteger = Player 1 (Red)
        Custom script:   if GetLocalPlayer() == GetConvertedPlayerID( udg_tempInteger ) then
        Cinematic - Apply a filter over 0.00 seconds using Normal blending on texture Black Mask, starting with color (0.00%, 0.00%, 0.00%) and 70.00% transparency and ending with color (0.00%, 0.00%, 0.00%) and 70.00% transparency
        Custom script:   endif
07-01-2005, 11:18 AM#7
iNfraNe
showing the trigger you made might help.

besides, Keep in mind that normal fades will cause a desync. Only advanced filters work.

Edit: so you editted that in at the same time I posted.

set tempint = Player 1 (red), how the hell did you do that? there's your prob.

Edit again: I guess you have the integer variable set as PLAYER variable which ofcourse, makes no sence at all, but np, just rename it to tempPlayer or something which makes more sence, then update the if condition to this:

Custom script: if GetLocalPlayer() == udg_tempPlayer then
07-01-2005, 11:19 AM#8
Thunder_Eye
Well I just posted the trigger, cant see any difference.
Why doesnt it work!?:(

Even with the endif, WE expects an code statement.

Edit third time:With the Set tempInteger = Player 1 (Red)
I made tempinteger and player variable, what else to use?
Ok Ill try that :P
EDIT again:

WOW, now it works, really thx!! really needed this trigger.
Is the custom script that sensitive? so if I want to use a boolean in a trigger I have to use "tempBoolean"?
Giving Rep,

sry Anitarf, have to spread some reputation before giving some to you again :P I'll give some as soon as possible
07-01-2005, 01:39 PM#9
Anitarf
No, you don't need to name it tempBoolean, that wasn't the problem. You can name your variables whatever you want. The problem was that the trigger I wrote expected the variable to be an integer, not because of what it was named, but because I used it in a function that expected it to be an integer (the function GetConvertedPlayerID() ).

There is nothing wrong with using a player variable, I used an integer variable because I already had one made, but I didn't have a player variable yet. However, if you use a player variable, then you stick it directly in the player comparison, there's no need to convert it to a player first, because it already is a player.

So, to recap:

Code:
variable is an integer:
        Set variable = Player number of (Player 1 (Red))
        Custom script:   if GetLocalPlayer() == GetConvertedPlayerID( udg_variable ) then...

variable is a player:
        Set variable = Player 1 (Red)
        Custom script:   if GetLocalPlayer() == udg_variable then...
07-01-2005, 01:57 PM#10
Thunder_Eye
Ok so what If I give the player variable 10 arrays? how to write the custom script then?
07-01-2005, 04:06 PM#11
iNfraNe
replace udg_tempPlayer by udg_PlayerArray[INTEGER NUMBER]
07-01-2005, 05:23 PM#12
Thunder_Eye
But then I have to change the name of the variable to "PlayerArray" ?
07-01-2005, 05:26 PM#13
Anitarf
Well, obviously... unless you don't change the name of the variable. You can just as well keep using the name tempPlayer. It doesn't matter, as long as you use the same name for the variable everywhere.