• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Player Oriented Cinematic Filter

Status
Not open for further replies.
Level 5
Joined
Sep 22, 2012
Messages
90
peepz,

suppose that I have a triggered spell in which blinds the player's sight for a duration by using cinematics <telescope filter - orc campaign>

How to apply filters on different players?
could you also provide a simple example trigger?

p.s. I've read about the "getlocalplayer()" but i've lost the thread; does this also mean that i have to tuck in jass codes on triggers?

tnx
 
Level 13
Joined
Mar 24, 2013
Messages
1,105
You're going to need these functions. (http://www.hiveworkshop.com/forums/1676883-post6.html )
Click on your map's name in the Trigger Editor where you can place custom functions.

Paste the JASS functions there. Create all the globals in the post, be sure to initialize the timer arrays!

Then you're going to use the last function in order to call these "blindings"

EX:

  • Custom Script: call CinematicFadeForPlayer (Player(0), 2, 5.00, null, 100.00, 0.00, 0.00, 0.00)
Edit: That example crashed me, so ignore lol, I must have something invalid in there. Too tired to figure it out sorry :p But you will need these functions. Someone else is needed to tell you how to use them though. GL
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
p.s. I've read about the "getlocalplayer()" but i've lost the thread; does this also mean that i have to tuck in jass codes on triggers?

Positive.

You're going to need these functions.

Well, at least the GUI action Video - Fade Filter and what connects to it are not local-friendly. The functions you linked mimic Blizzard's way of applying the filter.

For simplicity for a GUI user, create additional variables:
playerVar (player)
fadeType (integer)
FADE_TYPE_IN (integer, value=0)
FADE_TYPE_OUT (integer, value=1)
FADE_TYPE_OUTIN (integer, value=2)
duration (real)
texture (string)
FILTER_TEXTURE_WHITE (string, value="ReplaceableTextures\CameraMasks\White_mask.blp")
FILTER_TEXTURE_BLACK (string, value="ReplaceableTextures\CameraMasks\Black_mask.blp")
FILTER_TEXTURE_HAZE (string, value="ReplaceableTextures\CameraMasks\HazeFilter_mask.blp")
FILTER_TEXTURE_GROUND_FOG (string, value="ReplaceableTextures\CameraMasks\GroundFog_mask.blp")
FILTER_TEXTURE_HAZE_AND_FOG (string, value="ReplaceableTextures\CameraMasks\HazeAndFogFilter_Mask.blp")
FILTER_TEXTURE_SLASH (string, value="ReplaceableTextures\CameraMasks\DiagonalSlash_mask.blp")
FILTER_TEXTURE_DREAM (string, value="ReplaceableTextures\CameraMasks\DreamFilter_Mask.blp")
FILTER_TEXTURE_SCOPE (string, value="ReplaceableTextures\CameraMasks\Scope_Mask.blp")
FILTER_TEXTURE_POW (string, value="ReplaceableTextures\CameraMasks\SpecialPowMask.blp")
FILTER_TEXTURE_SPLAT (string, value="ReplaceableTextures\CameraMasks\SpecialSplatMask.blp")
FILTER_TEXTURE_PANDA (string, value="ReplaceableTextures\CameraMasks\Panda-n-Cub.blp")
red (real)
green (real)
blue (real)
transparency (real)

Then write where you want to deploy the filter:

  • Custom Script: call CinematicFadeForPlayer (udg_playerVar, udg_fadeType, udg_duration, udg_texture, udg_red, udg_green, udg_blue, udg_transparency)
and before that line, you set all the variables with Set Variable-actions to your desired values.
 
Status
Not open for further replies.
Top