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

Cinematic fade for triggering player?

Status
Not open for further replies.
Level 15
Joined
Jan 27, 2007
Messages
948
is that possible? i mean something like:

  • Enter Enchanted Forest
    • Events
      • Unit - A unit enters REGION <gen>
    • Conditions
    • Actions
      • Cinematic - Fade out over 1.50 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
      • Wait 1.51 seconds
      • Unit - Move (Entering unit) instantly to (Center of ENTEREnchantedForest <gen>), facing 315.00 degrees
      • Camera - Pan camera for (Owner of (Entering unit)) to (Position of (Entering unit)) over 0.00 seconds
      • Cinematic - Fade in over 1.50 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
i mean to make the
Cinematic - Fade in over 1.50 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency

ONLY for the ENTERING UNIT OWNER?
Cuz with that trigger, as only 1 player enters in the region, actually EVERY player(which he might not even have touched that region, will see the black mask.
+rep awarded
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
  • Set TriggeringPlayerVariable = (Triggering Player)
  • Custom script: if GetLocalPlayer == udg_TriggeringPlayerVariable then
  • Cinematic - Fade ...
  • Custom script: endif
or replace the second line with this:
  • Custom script: if GetLocalPlayer() == GetTriggerPlayer()
then you wont need the variable
 
Level 11
Joined
Apr 29, 2007
Messages
826
Well, to describe it simply:
JASS:
if GetLocalPlayer() == WHATEVER_PLAYER then
    //Do anything you want
endif

To deliver you an example from the trigger you wanted:

  • Events
    • Unit - A unit enters REGION
    • Conditions
    • Actions
      • Custom script: local unit u = GetTriggerUnit()
      • Custom script: local rect r = gg_rct_REGION
      • -------- Because we use a wait, the variables will not last until the functions afterwards. So we have to save them somehow --------
      • Cinematic - Fade out over 1.50 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
      • Custom script: if GetLocalPlayer() != GetOwningPlayer(u) then
      • Cinematic - Hide filter
      • -------- GetLocalPlayer() is a function that filters out the local player. (wow) --------
      • -------- It allows you to execute things locally, but creating handles locally will desync other players. --------
      • -------- Showing/Hiding them however does not cause any desyncs --------
      • Custom script: endif
      • Wait 1.51 seconds
      • Custom script: call SetUnitX(u, GetRectCenterX(r))
      • Custom script: call SetUnitY(u, GetRectCenterY(r))
      • -------- We're setting the units X and Y to the center of the defined rect. --------
      • Custom script: if GetLocalPlayer() == GetOwningPlayer(u) then
      • Custom script: call PanCameraTo(GetUnitX(u), GetUnitY(u))
      • -------- Because I'm using locals, I use JASS for this. --------
      • Custom script: endif
      • Cinematic - Fade in over 1.50 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
      • Custom script: if GetLocalPlayer() != GetOwningPlayer(u) then
      • Cinematic - Hide filter
      • Custom script: endif
      • Custom script: set u = null
      • Custom script: set r = null
      • -------- Nulling units is important! --------
Mix between GUI and Jass, you might not understand much of it at all.

GUI's inefficiency is killing me..
 
Level 15
Joined
Jan 27, 2007
Messages
948
damn ):

13 compile errors

JASS:
    local unit u = GetTriggerUnit()
    local rect r = gg_rct_Enchanted Forest
    call CinematicFadeBJ( bj_CINEFADETYPE_FADEOUT, 1.50, "ReplaceableTextures\\CameraMasks\\Black_mask.blp", 0, 0, 0, 0 )
    if GetLocalPlayer() != GetOwningPlayer(u) then
    call DisplayCineFilterBJ( false )
    endif
    call TriggerSleepAction( 1.51 )
    call SetUnitX(u, GetRectCenterX(r))
    call SetUnitY(u, GetRectCenterY(r))
    if GetLocalPlayer() == GetOwningPlayer(u) then
    call PanCameraTo(GetUnitX(u), GetUnitY(u))
    endif
    call DisplayTimedTextToForce( GetPlayersAll(), 6.00, "TRIGSTR_1462" )
    call CinematicFadeBJ( bj_CINEFADETYPE_FADEIN, 1.50, "ReplaceableTextures\\CameraMasks\\Black_mask.blp", 0, 0, 0, 0 )
    if GetLocalPlayer() != GetOwningPlayer(u) then
    call DisplayCineFilterBJ( false )
    endif
    set u = null
    set r = null
 
Last edited:
Status
Not open for further replies.
Top