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!
Hello everyone!
I need another little bit of help from you.
I'm making an ORPG map for 10 players, and here's the problem:
when I start cinematics for one player, the other players are able to view the whole map (even with black mask enabled since the beggining of the game).
Is there any solution to this problem?
I'd be very grateful and +rep anyone who could help.
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Quest_Welcome[(Player number of (Owner of (Triggering unit)))] is required) Equal to (==) False
Then - Actions
Unit - Make (Triggering unit) face Dummyunit1 <gen> over 0.00 seconds
Quest - Create a Required quest titled (Welcome ( + ((Name of (Owner of (Triggering unit))) + ))) with the description Dummuunit1 told me..., using icon path ReplaceableTextures\CommandButtons\BTNSpy.blp
Set Quest_Welcome[(Player number of (Owner of (Triggering unit)))] = (Last created quest)
Cinematic - Turn cinematic mode On for (Player group((Owner of (Triggering unit)))) over 0.20 seconds
Cinematic - Send transmission to (Player group((Owner of (Triggering unit)))) from Dummyunit1 <gen> named Dummunit1: Play GoodJob <gen> and display Who's there?!. Modify duration: Set to 1.50 seconds and Wait
Cinematic - Send transmission to (Player group((Owner of (Triggering unit)))) from (Triggering unit) named (Name of (Owner of (Triggering unit))): Play GoodJob <gen> and display Blahblah Modify duration: Set to 2.50 seconds and Wait
Cinematic - Send transmission to (Player group((Owner of (Triggering unit)))) from Dummyunit1 <gen> named Dummyunit1: Play GoodJob <gen> and display blahblah Modify duration: Set to 13.00 seconds and Wait
Cinematic - Turn cinematic mode Off for (Player group((Owner of (Triggering unit)))) over 0.20 seconds
Else - Actions
I'm putting actions before cinematics due to cinematics skip, that'll be implemented. Since the actions are all instant and mostly just quest creating or variable setting, I don't see any problem in this.
Hmmm, that's strange. I'm not sure what the cause is
Just a tip: use Triggering player instead of Owner of (Triggering unit). It is faster You could also store Triggering player in a temporary variable to prevent it being called each time.
Hmmm, that's strange. I'm not sure what the cause is
Just a tip: use Triggering player instead of Owner of (Triggering unit). It is faster You could also store Triggering player in a temporary variable to prevent it being called each time.
Well, at some certain events, I don't know why, but I have to use owner of triggering unit, or else the trigger gets bugged.
Well, if you don't know, I hope someone else will be able to answer.
I've tested it a little bit further, and I can say, that when there are 2 or more players, 1 sees a cinematics, the other player(s) can see the whole map for the duration of the cinematics for the players seeing it. After the cinematic ends, the black mask is on again normally working.
Well, it has to do with how Blizzard coded the GUI cinematic toggle action. Here is an excerpt from their Blizzard.j that explains what it does:
JASS:
//===========================================================================
// Makes many common UI settings changes at once, for use when beginning and
// ending cinematic sequences. Note that some affects apply to all players,
// such as game speed. This is unavoidable.
// - Clear the screen of text messages
// - Hide interface UI (letterbox mode)
// - Hide game messages (ally under attack, etc.)
// - Disable user control
// - Disable occlusion
// - Set game speed (for all players)
// - Lock game speed (for all players)
// - Disable black mask (for all players)
// - Disable fog of war (for all players)
// - Disable world boundary fog (for all players)
// - Dim non-speech sound channels
// - End any outstanding music themes
// - Fix the random seed to a set value
// - Reset the camera smoothing factor
//
function CinematicModeExBJ 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
//===========================================================================
function CinematicModeBJ takes boolean cineMode, force forForce returns nothing
call CinematicModeExBJ(cineMode, forForce, bj_CINEMODE_INTERFACEFADE)
endfunction
Which you can find by searching for the function CinematicModeExBJ in the Blizzard.j file.
The behavior you are experiencing is intended. I am not sure why they made some decisions. Disabling black mask / fog of war might simply be to prevent vision problems during the cinematic (and disabling/enabling black mask/fog of war desync if you do them only for the local player).
In any case, you will have to write your own cinematic transition function if you want to stop some behaviors enforced by the GUI action.
If you want to simply remove the black mask / fog of war bits from the Blizzard GUI cinematic action, just copy over the function I copied above and remove lines that have "FogMaskEnable" and "FogEnable". Then just call upon your custom function to enable/disable cinematics.
Well, hopefully you have some rudimentary knowledge of JASS to handle that. If not, just say so.
Also, no idea if problems may occur by removing the black mask / fog of war handling parts.
Well, it has to do with how Blizzard coded the GUI cinematic toggle action. Here is an excerpt from their Blizzard.j that explains what it does:
JASS:
//===========================================================================
// Makes many common UI settings changes at once, for use when beginning and
// ending cinematic sequences. Note that some affects apply to all players,
// such as game speed. This is unavoidable.
// - Clear the screen of text messages
// - Hide interface UI (letterbox mode)
// - Hide game messages (ally under attack, etc.)
// - Disable user control
// - Disable occlusion
// - Set game speed (for all players)
// - Lock game speed (for all players)
// - Disable black mask (for all players)
// - Disable fog of war (for all players)
// - Disable world boundary fog (for all players)
// - Dim non-speech sound channels
// - End any outstanding music themes
// - Fix the random seed to a set value
// - Reset the camera smoothing factor
//
function CinematicModeExBJ 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
//===========================================================================
function CinematicModeBJ takes boolean cineMode, force forForce returns nothing
call CinematicModeExBJ(cineMode, forForce, bj_CINEMODE_INTERFACEFADE)
endfunction
Which you can find by searching for the function CinematicModeExBJ in the Blizzard.j file.
The behavior you are experiencing is intended. I am not sure why they made some decisions. Disabling black mask / fog of war might simply be to prevent vision problems during the cinematic (and disabling/enabling black mask/fog of war desync if you do them only for the local player).
In any case, you will have to write your own cinematic transition function if you want to stop some behaviors enforced by the GUI action.
If you want to simply remove the black mask / fog of war bits from the Blizzard GUI cinematic action, just copy over the function I copied above and remove lines that have "FogMaskEnable" and "FogEnable". Then just call upon your custom function to enable/disable cinematics.
Well, hopefully you have some rudimentary knowledge of JASS to handle that. If not, just say so.
Also, no idea if problems may occur by removing the black mask / fog of war handling parts.
Thanks a lot. I'll try it and let you know if I was able to run it. (Although, I don't know JASS, I studied a bit of computer language, so I hope I'll be able to make it work.
When a cinematic starts the Vision for a Player is endless, so you only have to turn the shared vision off with guys it is possible like this. At the start of the map you you have set the shared vision in the Force-Options to OFF. If you want to turn on the vision for the allies you can do this with a Unit-Group Trigger - Picked unit share vision for blablabla. When a cinematic starts you turn it of if it is neccessary I think its enough when you trigger the shared vision.
When a cinematic starts the Vision for a Player is endless, so you only have to turn the shared vision off with guys it is possible like this. At the start of the map you you have set the shared vision in the Force-Options to OFF. If you want to turn on the vision for the allies you can do this with a Unit-Group Trigger - Picked unit share vision for blablabla. When a cinematic starts you turn it of if it is neccessary I think its enough when you trigger the shared vision.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.