It's actually started from a thread in US BN forum that asked how to use a documented new feature in 1.5
'Support has been added to allow mod makers to control the UI for observers, and to control the behavior of individual dialog items when observing.' http://us.battle.net/sc2/en/forum/topic/6246876828
I made a sample map and explained some things in the new action "Set Dialog Observed Type" and "Set Dialog Item Observed Type".
I just arranged them and put it here.
How to use it
The new actions: "Set Dialog Observed Type" and "Set Dialog Item Observed Type" can be used to control the behavior of individual dialog/dialog items when observing. You can see 4 presets in their 'Observed Type' parameter:'Observed Player Id', 'Default Observed Player Id', 'Selected Or Observed Player Id', 'Observed Or Selected Player Id'. Here is how they works:
Quote:
When you are a observer, you could to choose which player you are observering (or simply choose everyone ). At the same time, you can select a player's unit to see this unit's current information.
So Selected means the owner of the unit be selected. While the Observered means the player you are observering.
Set a dialog/item to Observed Player Id, means when you chose to observer Player 1, you see what the P1 sees (of this dialog/item). Choose Player 2 then see what Player 2 sees.
Observed Or Selected Player Id means if you had choose to OB a player, you will see what this player sees (of this dialog/item). If you choose to OB everyone, then it will use the owner player of the unit you selected.
Selected Or Observed Player Id means if you select a unit, you will see what this units's owner sees (of this dialog/item). If you didn't choose any unit, then it will use the observered player.
Then, you may want to ask, all presets above seems only allow us to make the OB see a player's dialog, can we create a dialog which can only be seem by OB?
There some ways to do that, and here is the easiest one: In map->Player Properties dialog, there is a dropdown box which allows you to select the 'Default Observed Player' of the game. for example, if you select it to 14, then when you are observing'Everyone' on OB mode, you will see what Player 14 see(and his dialog!)
So we can just set the default OB target player to a un-active player(It must be non-user, non-computer. It can be None, Netural, Hostile), so that no player can use this slot, while at the same time, you can use trigger to modify/display dialogs for this player slot(just no one can see them expect the OB).
After we set the 'Default Observed Player' to an non-active player, we can just create a dialog, then hide it to all active players, so that only OB can see it.
TestEventsGame-MapinitializationLocalVariablesConditionsActions-------CanOnlysBeSeenByOBDialog-CreateaNon-modaldialogofsize(500,400)at(0,0)relativetoCenterofscreenVariable-SetDialog=(Lastcreateddialog)Dialog-ShowDialogfor(Allplayers)Dialog-HidethebackgroundimageofDialogDialog-CreateaButtonfordialogDialogVariable-SetButtonOB=(Lastcreateddialogitem)Dialog-SetButtonOBsizeto(500,100)for(Allplayers)Dialog-SetButtonOBtextto"Can Onlys Be Seen By OB"for(Allplayers)Dialog-HideDialogfor(ActivePlayers)
Sample map
I made a sample map which include a dialog can only be seen by OB, and a dialog can only be seen by P1 AND OB.
In this map, there is a button which can only be been when you are an OB. It would display like this when you are Observering Everyone:
And another button could only be seen by Player 1 AND the OB. When you are P1, or when you chose to OB P1, then you can see it:
And if you are P2, or or when you chose to OB P2, you see nothing:
It's actually started from a thread in US BN forum that asked how to use a documented new feature in 1.5
'Support has been added to allow mod makers to control the UI for observers, and to control the behavior of individual dialog items when observing.'
http://us.battle.net/sc2/en/forum/topic/6246876828
I made a sample map and explained some things in the new action "Set Dialog Observed Type" and "Set Dialog Item Observed Type".
I just arranged them and put it here.
How to use it
The new actions: "Set Dialog Observed Type" and "Set Dialog Item Observed Type" can be used to control the behavior of individual dialog/dialog items when observing. You can see 4 presets in their 'Observed Type' parameter:'Observed Player Id', 'Default Observed Player Id', 'Selected Or Observed Player Id', 'Observed Or Selected Player Id'. Here is how they works:
Then, you may want to ask, all presets above seems only allow us to make the OB see a player's dialog, can we create a dialog which can only be seem by OB?
There some ways to do that, and here is the easiest one: In map->Player Properties dialog, there is a dropdown box which allows you to select the 'Default Observed Player' of the game. for example, if you select it to 14, then when you are observing'Everyone' on OB mode, you will see what Player 14 see(and his dialog!)
So we can just set the default OB target player to a un-active player(It must be non-user, non-computer. It can be None, Netural, Hostile), so that no player can use this slot, while at the same time, you can use trigger to modify/display dialogs for this player slot(just no one can see them expect the OB).
After we set the 'Default Observed Player' to an non-active player, we can just create a dialog, then hide it to all active players, so that only OB can see it.
Sample map
I made a sample map which include a dialog can only be seen by OB, and a dialog can only be seen by P1 AND OB.
In this map, there is a button which can only be been when you are an OB. It would display like this when you are Observering Everyone:
And another button could only be seen by Player 1 AND the OB. When you are P1, or when you chose to OB P1, then you can see it:
And if you are P2, or or when you chose to OB P2, you see nothing:
The sample map: