• 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 'Ruins' Replays. Solution???

Status
Not open for further replies.
Level 21
Joined
Mar 16, 2008
Messages
964
When players get defeated on this map, they get put in cinematic mode. When you watch the replay, you get put in cinematic mode at the same time, even if you aren't watching the defeated player. Can anyone imagine a solution or workaround?
 
Level 21
Joined
Mar 16, 2008
Messages
964
it's confusing b/c i guess the usual cinematic command does not work for 1 single player in a multiplayer game. The usual cinematic trigger reveals the map for all players. So i used this custom code that i found on Hive, and i use the code with a trigger for a player group that only contains one player.

Maybe I can still just check player state before this? with an if then conditional?

  • Custom script: call CinematicModeWithoutChangingFog(true, udg_Solo_Group_Red, bj_CINEMODE_INTERFACEFADE)
JASS:
// Credit PurgeandFire
function CinematicModeWithoutChangingFog takes boolean cineMode, force forForce, real interfaceFadeTime returns nothing
    // If the game hasn't started yet, perform interface fades immediately
    if (not bj_gameStarted) then
        set interfaceFadeTime = 0
    endif

    if (cineMode) then
        // Save the UI state so that we can restore it later.
        if (not bj_cineModeAlreadyIn) then
            set bj_cineModeAlreadyIn = true
            set bj_cineModePriorSpeed = GetGameSpeed()
            // set bj_cineModePriorFogSetting = IsFogEnabled()
            // set bj_cineModePriorMaskSetting = IsFogMaskEnabled()
            set bj_cineModePriorDawnDusk = IsDawnDuskEnabled()
            set bj_cineModeSavedSeed = GetRandomInt(0, 1000000)
        endif

        // Perform local changes
        if (IsPlayerInForce(GetLocalPlayer(), forForce)) then
            // Use only local code (no net traffic) within this block to avoid desyncs.
            call ClearTextMessages()
            call ShowInterface(false, interfaceFadeTime)
            call EnableUserControl(false)
            call EnableOcclusion(false)
            call SetCineModeVolumeGroupsBJ()
        endif

        // Perform global changes
        call SetGameSpeed(bj_CINEMODE_GAMESPEED)
        call SetMapFlag(MAP_LOCK_SPEED, true)
        // call FogMaskEnable(false)
        // call FogEnable(false)
        // call EnableWorldFogBoundary(false)
        call EnableDawnDusk(false)

        // Use a fixed random seed, so that cinematics play consistently.
        call SetRandomSeed(0)
    else
        set bj_cineModeAlreadyIn = false

        // Perform local changes
        if (IsPlayerInForce(GetLocalPlayer(), forForce)) then
            // Use only local code (no net traffic) within this block to avoid desyncs.
            call ShowInterface(true, interfaceFadeTime)
            call EnableUserControl(true)
            call EnableOcclusion(true)
            call VolumeGroupReset()
            call EndThematicMusic()
            call CameraResetSmoothingFactorBJ()
        endif

        // Perform global changes
        call SetMapFlag(MAP_LOCK_SPEED, false)
        call SetGameSpeed(bj_cineModePriorSpeed)
        // call FogMaskEnable(bj_cineModePriorMaskSetting)
        // call FogEnable(bj_cineModePriorFogSetting)
        // call EnableWorldFogBoundary(true)
        call EnableDawnDusk(bj_cineModePriorDawnDusk)
        call SetRandomSeed(bj_cineModeSavedSeed)
    endif
endfunction

  • Set Solo Group Vars
    • Events
      • Time - Elapsed game time is 3.00 seconds
    • Conditions
    • Actions
      • Player Group - Add Player 1 (Red) to Solo_Group_Red
      • ...
      • ...
      • ...
 
Last edited:
Status
Not open for further replies.
Top