Last night, whilst playing Metal Gear Solid, i thought to myself.. How easy would it be to convert a system like that into Starcraft 2?... So, i decided to make it, and well.. it wasn't that hard really. I'm already pretty skilled with dialogs, so i decided to try and make this, release it as a tutorial, so other people can try it, and maybe even make it better..
Preview
This is the preview video i made for it. To show you how it work's In-Game. Watch in 720p
Tutorial
Below i will post a Step-by-Step tutorial on how to implement this into your map.
Step 1 - Initialization
Step 1 is where you create the Triggers and Variables for the Codec system. Triggers are in Red and Variables are in Blue.
Triggers
Codec Init
Codec Use
Codec Hide
Frequency Set Right
Frequency Set Left
Connect
Variables
CodecUsed = false <Boolean>
Contacter = No Dialog Item <Dialog Item>
ContacterText = No Dialog Item <Dialog Item>
FrequencyLabel = No Dialog Item <Dialog Item>
Connect = No Dialog Item <Dialog Item>
Contacts = No Dialog Item <Dialog Item>
FrequencySetRight = No Dialog Item <Dialog Item>
FrequencySetLeft = No Dialog Item <Dialog Item>
Codec = No Dialog <Dialog>
Frequency = No Dialog <Dialog>
RealFrequency = 140.01 <Real>
You can also add Variables for Contacts, but does not work with Reals.. Integers only
Now that we have created all the Triggers and the Variables, lets move on to Step 2.
Step 2 - Creating the Dialogs
Codec Init
Events
Game - Map initialization
Local Variables
Conditions
Actions
Dialog - Create a Modal dialog of size (800, 500) at (0, 150) relative to Top of screen
Variable - Set Codec = (Last created dialog)
Dialog - Create a Modal dialog of size (400, 250) at (0, 250) relative to Top of screen
Variable - Set Frequency = (Last created dialog)
Dialog - Create a button for dialog Frequency with the dimensions (150, 50) anchored to Bottom with an offset of (0, 0) setting the tooltip to "" with button text "CONNECT" and the hover image set to ""
Variable - Set Connect = (Last created dialog item)
Dialog - Create a button for dialog Frequency with the dimensions (50, 50) anchored to Right with an offset of (0, 50) setting the tooltip to "" with button text ">>" and the hover image set to ""
Variable - Set FrequencySetRight = (Last created dialog item)
Dialog - Create a button for dialog Frequency with the dimensions (50, 50) anchored to Left with an offset of (0, 50) setting the tooltip to "" with button text "<<" and the hover image set to ""
Variable - Set FrequencySetLeft = (Last created dialog item)
Dialog - Create a label for dialog Frequency with the dimensions (150, 50) anchored to Center with an offset of (25, 0) with the text (Text(RealFrequency) with Any Precision decimal places) color set to White text writeout set to false with a writeout duration of 2.0
Variable - Set FrequencyLabel = (Last created dialog item)
Dialog - Create an image for dialog Codec with the dimensions (150, 250) anchored to Right with an offset of (30, -50) setting the tooltip to "" using the image Assets\Textures\thorportrait_static.dds as a Normal type with tiled set to false tint color White and blend mode Normal
Dialog - Create a label for dialog Codec with the dimensions (50, 50) anchored to Top with an offset of (0, 25) with the text "P.T.T" color set to White text writeout set to false with a writeout duration of 2.0
This is what it should look like..
Now that we have finished Step 2, it's onto Triggering the Buttons in Step 3.
Step 3 - Triggering the Dialog Items
This is where we create the triggers for buttons, so that we can use them in-game.
Frequency Set Right
Events
Dialog - Any Dialog Item is used by Player Any Player with event type Clicked
Local Variables
Conditions
FrequencySetRight == (Used dialog item)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
RealFrequency == 142.01
Then
Dialog - Destroy Contacter
Dialog - Destroy ContacterText
Variable - Set RealFrequency = 140.01
Dialog - Destroy FrequencyLabel
Dialog - Create a label for dialog Frequency with the dimensions (150, 50) anchored to Center with an offset of (25, 0) with the text (Text(RealFrequency) with Any Precision decimal places) color set to White text writeout set to false with a writeout duration of 2.0
Variable - Set FrequencyLabel = (Last created dialog item)
Else
Dialog - Destroy Contacter
Dialog - Destroy ContacterText
Variable - Modify RealFrequency: + 0.01
Dialog - Destroy FrequencyLabel
Dialog - Create a label for dialog Frequency with the dimensions (150, 50) anchored to Center with an offset of (25, 0) with the text (Text(RealFrequency) with Any Precision decimal places) color set to White text writeout set to false with a writeout duration of 2.0
Variable - Set FrequencyLabel = (Last created dialog item)
So, it should look like this..
The next trigger is very Similar, But make sure you change everything that needs to be.
Frequency Set Left
Events
Dialog - Any Dialog Item is used by Player Any Player with event type Clicked
Local Variables
Conditions
FrequencySetLeft == (Used dialog item)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
RealFrequency == 140.0
Then
Dialog - Destroy Contacter
Dialog - Destroy ContacterText
Variable - Set RealFrequency = 141.99
Dialog - Destroy FrequencyLabel
Dialog - Create a label for dialog Frequency with the dimensions (150, 50) anchored to Center with an offset of (25, 0) with the text (Text(RealFrequency) with Any Precision decimal places) color set to White text writeout set to false with a writeout duration of 2.0
Variable - Set FrequencyLabel = (Last created dialog item)
Else
Dialog - Destroy Contacter
Dialog - Destroy ContacterText
Variable - Modify RealFrequency: - 0.01
Dialog - Destroy FrequencyLabel
Dialog - Create a label for dialog Frequency with the dimensions (150, 50) anchored to Center with an offset of (25, 0) with the text (Text(RealFrequency) with Any Precision decimal places) color set to White text writeout set to false with a writeout duration of 2.0
Variable - Set FrequencyLabel = (Last created dialog item)
Again, a picture showing how it should look in the editor.
Now for the main one, the connect trigger.
Connect
Events
Dialog - Any Dialog Item is used by Player Any Player with event type Clicked
Local Variables
Conditions
Connect == (Used dialog item)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
RealFrequency == 140.03
Then
Dialog - Create an image for dialog Codec with the dimensions (150, 250) anchored to Left with an offset of (30, -50) setting the tooltip to "" using the image Assets\Textures\adjutantportrait_static.dds as a Normal type with tiled set to false tint color White and blend mode Normal
Variable - Set Contacter = (Last created dialog item)
Dialog - Create a label for dialog Codec with the dimensions (500, 50) anchored to Bottom with an offset of (0, 25) with the text "INSERT TEXT HERE" color set to White text writeout set to true with a writeout duration of 5.0
Variable - Set ContacterText = (Last created dialog item)
Else
General - If (Conditions) then do (Actions) else do (Actions)
If
RealFrequency == 140.11
Then
Dialog - Create an image for dialog Codec with the dimensions (150, 250) anchored to Left with an offset of (30, -50) setting the tooltip to "" using the image Assets\Textures\marineportrait_static.dds as a Normal type with tiled set to false tint color White and blend mode Normal
Variable - Set Contacter = (Last created dialog item)
Dialog - Create a label for dialog Codec with the dimensions (500, 50) anchored to Bottom with an offset of (0, 25) with the text "INSERT TEXT HERE" color set to White text writeout set to true with a writeout duration of 5.0
Variable - Set ContacterText = (Last created dialog item)
Else
Dialog - Create a label for dialog Codec with the dimensions (200, 50) anchored to Bottom with an offset of (0, 25) with the text "....No Answer..." color set to White text writeout set to true with a writeout duration of 2.5
Variable - Set ContacterText = (Last created dialog item)
Again, a picture showing how it should look in the editor.
Now that that is done, one more thing left to do, and thats in Step 4..
Step 4 - Finalizing
This is the final Step to follow, this is the activation of the Codec. So, you trigger the Button to press to use it.
Codec Use
Events
UI - Player Any Player presses Tab key Down with shift Allow, control Allow, alt Allow
Local Variables
Conditions
CodecUsed == false
Actions
Cinematics - Turn cinematic mode On for (All players) over Default seconds
Cinematics - Fade Out over 1.0 seconds using color (0%, 0%, 0%) and 0.0% transparency (Normal style, Wait until it finishes)
General - Wait 1.5 Game Time seconds
Variable - Set CodecUsed = true
Cinematics - Turn cinematic mode Off for (All players) over Immediate seconds
UI - Hide game UI for (All players)
Dialog - Show Codec for (All players)
Dialog - Show Frequency for (All players)
Again, a picture showing how it should look in the editor.
The way i hid UI and so forth is probably the worst way to do it.. There is probably another way, but oh well.
Codec Hide
Events
UI - Player Any Player presses Tab key Down with shift Allow, control Allow, alt Allow
Local Variables
Conditions
CodecUsed == true
Actions
Cinematics - Turn cinematic mode On for (All players) over Default seconds
Dialog - Hide Codec for (All players)
Dialog - Hide Frequency for (All players)
Cinematics - Fade In over 1.0 seconds using color (0%, 0%, 0%) and 0.0% transparency (Normal style, Wait until it finishes)
General - Wait 1.5 Game Time seconds
Variable - Set CodecUsed = false
Cinematics - Turn cinematic mode Off for (All players) over Immediate seconds
General - Wait 0.5 Game Time seconds
UI - Show game UI for (All players)
Again, a picture showing how it should look in the editor.
And there you have it, a working Codec system in your Map.. you can always add more contacts, just follow how its done in Step 3.
I will be happy to answer any questions if need be :)
Metal Gear Solid Codec System Tutorial
By Pshyched
Introduction
Last night, whilst playing Metal Gear Solid, i thought to myself.. How easy would it be to convert a system like that into Starcraft 2?... So, i decided to make it, and well.. it wasn't that hard really. I'm already pretty skilled with dialogs, so i decided to try and make this, release it as a tutorial, so other people can try it, and maybe even make it better..
Preview
This is the preview video i made for it. To show you how it work's In-Game. Watch in 720p
Tutorial
Below i will post a Step-by-Step tutorial on how to implement this into your map.
Step 1 - Initialization
Step 1 is where you create the Triggers and Variables for the Codec system. Triggers are in Red and Variables are in Blue.
Now that we have created all the Triggers and the Variables, lets move on to Step 2.
Step 2 - Creating the Dialogs
Codec Init
Events
Local Variables
Conditions
Actions
This is what it should look like..
Now that we have finished Step 2, it's onto Triggering the Buttons in Step 3.
Step 3 - Triggering the Dialog Items
This is where we create the triggers for buttons, so that we can use them in-game.
Frequency Set Right
Events
Local Variables
Conditions
Actions
If
Then
Else
So, it should look like this..
The next trigger is very Similar, But make sure you change everything that needs to be.
Frequency Set Left
Events
Local Variables
Conditions
Actions
If
Then
Else
Again, a picture showing how it should look in the editor.
Now for the main one, the connect trigger.
Connect
Events
Local Variables
Conditions
Actions
If
Then
Else
If
Then
Else
Again, a picture showing how it should look in the editor.
Now that that is done, one more thing left to do, and thats in Step 4..
Step 4 - Finalizing
This is the final Step to follow, this is the activation of the Codec. So, you trigger the Button to press to use it.
Codec Use
Events
Local Variables
Conditions
Actions
Again, a picture showing how it should look in the editor.
The way i hid UI and so forth is probably the worst way to do it.. There is probably another way, but oh well.
Codec Hide
Events
Local Variables
Conditions
Actions
Again, a picture showing how it should look in the editor.
And there you have it, a working Codec system in your Map.. you can always add more contacts, just follow how its done in Step 3.
I will be happy to answer any questions if need be :)
Pshyched
I would love to get some feedback from everyone aswell, I'd like to know how well i did :P If you like it, etc.
It looks fun :)
However ... You should strip out the first 25 seconds of the video, they are really useless!
I know alot of it is pretty basic, i just need help with the real variables.. i posted a help topic in triggers, but noone was able to help me.
I just watched the video, and I think this is awesome! I might use your tutorial if I ever do a campaign style map. Thanks for sharing this!