Staredit Network > Forums > SC2 Assistance > Topic: [SOLVED] Mission Debriefings
[SOLVED] Mission Debriefings
Jan 1 2012, 10:03 pm
By: ArchMcShane  

Jan 1 2012, 10:03 pm ArchMcShane Post #1



Ok, I try to look up how to do this simple pre-map initialization protocol: the mission debriefing, but no one made a tutorial for that specific purpose. This irks me because, SC1's Campaign editor would let you do that without all the varibles, constants, and other mumbo jumbo that I don't have time for! Could someone give me the element layout for this, or something? I will accept any piece of help leading to a successful build.

Post has been edited 1 time(s), last time on Jan 2 2012, 5:35 pm by ArchMcShane. Reason: I might have to wait until HotS for this



None.

Jan 1 2012, 10:27 pm Ahli Post #2

I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.

There is no implementation for that in sc2 like in SCBW.
However, you can create that with triggers.

- You need dialogs to have a window to display text and buttons.
- You need portraits to display pictures of talking units. Sadly there is no easy way to make portraits play talk animations like in SCBW. It's rather limited in sc2 at the moment.

At map start:
1. Do actions which will make the game like not running because we can't pause the game during runtime (-> hide units). Maybe you don't even have to do anything in your map.
2. Create a dialog, place the text label on it, save everything in variables. Don't forget to show the dialog to the players because dialogs are hidden by default.
3. Create the portraits, save in variables.
4. Do the actions you need to do like setting text, text time and swap portrait's model, play sound and don't forget the waits.
5. remove everything

If any button has been clicked:
1. check if the used button was your briefing quit button and do the actions.

This would be what you would need for a briefing like in SCBW.
But you can pretty much do everything you want.




Jan 2 2012, 1:24 am ArchMcShane Post #3



Ok, I got a working button to "Commence Operation", unhide the enemy units, add resources, etc. Still no luck displaying text in a dialog box. What am I doing wrong? I guess I'll have to wait until Heart of the Swarm comes out to build the briefing room.



None.

Jan 2 2012, 3:32 am payne Post #4

:payne:

http://www.staredit.net/topic/13304/

This project might help you understand the basics. :)



None.

Jan 2 2012, 11:37 am Ahli Post #5

I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.

Quote from ArchMcShane
Ok, I got a working button to "Commence Operation", unhide the enemy units, add resources, etc. Still no luck displaying text in a dialog box. What am I doing wrong? I guess I'll have to wait until Heart of the Swarm comes out to build the briefing room.
A dialog is like an area where you can draw on. It's like a board or piece of paper.
Then you can create some dialog items on it like text labels. These need some space to display their text, so you increase their size and save them in global variables, if you need to change their properties like their text later on.
With "Set dialog item's text" (or something like this), you can edit the displayed text and you can also change the time it takes to write the whole text, if you enabled that feature for that text label.




Jan 2 2012, 5:33 pm ArchMcShane Post #6



Ok, two triggers coincide with each other. First is "Get Debriefing" Which is mainly dialog, hiding enemy units, and pausing total mission time.
Code
Get Debriefing
   Events
       Game - Map initialization
   Local Variables
   Conditions
   Actions
       Game - Set Mission Time Paused(True)
       Dialog - Create a Modal dialog of size (500, 400) at (0, 0) relative to Center of screen
       Dialog - Show (Last created dialog) for (All players)
       Variable - Set Untitled Variable 001 = (Last created dialog)
       Dialog - Create a label for dialog (Last created dialog) with the dimensions (450, 350) anchored to Center with an offset of (0, 0) with the text "Kayin: Ok, son, I ensure you know w..." color set to White text writeout set to True with a writeout duration of 2.0
       Dialog - Display button 1 of size (250, 60) with text "Commence Operation" at Center of screen with offset (0, 200)  (run Begin Mission when button is clicked)
       Unit - Hide Drone [210.14, 48.55]
       Unit - Hide Drone [212.52, 46.33]
       Unit - Hide Drone [211.50, 47.50]
       Unit - Hide Hatchery [207.50, 44.50]


Next, you have "Begin Mission which kind of unpauses, and shows the elements mentioned above.
Code
Begin Mission
   Events
       Dialog - (Screen button 1) is used by Player Any Player with event type Clicked
   Local Variables
   Conditions
       (Used dialog item) == (Screen button 1)
   Actions
       Game - Set Mission Time Paused(False)
       Dialog - Destroy Untitled Variable 001
       Dialog - Hide button 1
       Tech Tree - Allow Vulture for player 1
       Tech Tree - Set Terran Building Armor upgrade level to 3 for player 1
       Melee - Set default melee options for all players
       Player - Modify player 1 Vespene: Set To 250
       Player - Modify player 1 Minerals: Set To 1000
       Unit - Show Drone [210.14, 48.55]
       Unit - Show Drone [212.52, 46.33]
       Unit - Show Drone [211.50, 47.50]
       Unit - Show Hatchery [207.50, 44.50]


You may call some of this cheating, but another problem is making the Zerg forces (Jargon Brood) less dificult in terms of AI. I might have to post another topic, since AI falls into a different trigger category. As for this problem, I'll consider it [PLAUSIBLE], since there will be no support for mission briefings until, hopefully, Heart of the Swarm.



None.

Jan 2 2012, 5:47 pm Ahli Post #7

I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.

Quote from ArchMcShane
Ok, two triggers coincide with each other. First is "Get Debriefing" Which is mainly dialog, hiding enemy units, and pausing total mission time.
Code
Get Debriefing
   Events
       Game - Map initialization
   Local Variables
   Conditions
   Actions
       Game - Set Mission Time Paused(True)
       Dialog - Create a Modal dialog of size (500, 400) at (0, 0) relative to Center of screen
       Dialog - Show (Last created dialog) for (All players)
       Variable - Set Untitled Variable 001 = (Last created dialog)
       Dialog - Create a label for dialog (Last created dialog) with the dimensions (450, 350) anchored to Center with an offset of (0, 0) with the text "Kayin: Ok, son, I ensure you know w..." color set to White text writeout set to True with a writeout duration of 2.0
       Dialog - Display button 1 of size (250, 60) with text "Commence Operation" at Center of screen with offset (0, 200)  (run Begin Mission when button is clicked)
       Unit - Hide Drone [210.14, 48.55]
       Unit - Hide Drone [212.52, 46.33]
       Unit - Hide Drone [211.50, 47.50]
       Unit - Hide Hatchery [207.50, 44.50]


Next, you have "Begin Mission which kind of unpauses, and shows the elements mentioned above.
Code
Begin Mission
   Events
       Dialog - (Screen button 1) is used by Player Any Player with event type Clicked
   Local Variables
   Conditions
       (Used dialog item) == (Screen button 1)
   Actions
       Game - Set Mission Time Paused(False)
       Dialog - Destroy Untitled Variable 001
       Dialog - Hide button 1
       Tech Tree - Allow Vulture for player 1
       Tech Tree - Set Terran Building Armor upgrade level to 3 for player 1
       Melee - Set default melee options for all players
       Player - Modify player 1 Vespene: Set To 250
       Player - Modify player 1 Minerals: Set To 1000
       Unit - Show Drone [210.14, 48.55]
       Unit - Show Drone [212.52, 46.33]
       Unit - Show Drone [211.50, 47.50]
       Unit - Show Hatchery [207.50, 44.50]


You may call some of this cheating, but another problem is making the Zerg forces (Jargon Brood) less dificult in terms of AI. I might have to post another topic, since AI falls into a different trigger category. As for this problem, I'll consider it [PLAUSIBLE], since there will be no support for mission briefings until, hopefully, Heart of the Swarm.
So what's the current problem regarding the dialog?

If want to have bigger conversations, I would write all of the actions and waits into their own trigger which has NO event. Then you run that trigger after creating the "briefing room" (= dialog, portraits, etc) [Trigger can start other triggers].
The benefit with that is when you click the skip button, you can remove all running instances of that trigger which would cancel the briefing talk without throwing errors or without the need of adding a check after each wait.
That trigger just would contain the actions like: show model in portrait, set text, set text time, play sound, save sound in global variable, wait, set text, set text time, play sound, save sound in the same variable, wait, ...., wait, run the button clicked trigger without checking its conditions to destroy the briefing stuff and start the game.

edit:
Oh, I don't think that Blizzard will add briefing stuff. They used a map for the story mode in the campaign, too. So, basically, we can do everything already except of the Blizzard-only actions.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[03:08 pm]
Oh_Man -- example of wat u mean?
[05:59 am]
NudeRaider -- *is
[05:17 am]
NudeRaider -- despite all its flaws the sound design its fantastic
[10:29 pm]
Oh_Man -- homeworld 3 = massive disappointment
[2024-5-14. : 10:05 am]
Moose -- ya
[2024-5-14. : 5:23 am]
zsnakezz -- yes
[2024-5-12. : 8:51 pm]
l)ark_ssj9kevin -- Are you excited for Homeworld 3?
[2024-5-12. : 8:44 pm]
l)ark_ssj9kevin -- Hi Brusilov
[2024-5-12. : 4:35 pm]
O)FaRTy1billion[MM] -- Brusilov
Brusilov shouted: Hey, what happened to EUDDB? Is there a mirror for it somewhere? Need to do a little research.
my server that was hosting it died
[2024-5-10. : 8:46 pm]
NudeRaider -- Brusilov
Brusilov shouted: Hey, what happened to EUDDB? Is there a mirror for it somewhere? Need to do a little research.
https://armoha.github.io/eud-book/
Please log in to shout.


Members Online: Ultraviolet, 7sophiee2322eM9