Sign in to follow this  
  • entries
    271
  • comments
    969
  • views
    189095

Dialogs!

Sign in to follow this  
Sir Sapo

82 views

Hey everyone!

Unfortunately, I don't have a cool screenshot for you guys tonight. I was going to get the cool new HUD that Mark drew up working tonight, but unfortunately, the URL's he provided were over Xfire, and when we started to play Counter-Strike: Source, that window went away, so I didn't have the textures to work with, sorry......

Dialog System
The big thing I got working today was the dialog system, which is how we're going to advance the story in-mission. I've been thinking about how I wanted to do the system for about a week now, and tonight was the first night I was able to sit down and really code it out. After about an hour of coding, and about 30 minutes of debugging, I as able to get a pretty robust system working. It works by loading a Dialog Script for a level when the level loads. This dialog script contains all the "conversations" that can take place in that level, with each one being attached to a name token, such as "MISSIONCOMPLETE", or "READYFORTAKEOFF". The format for the Dialog Scripts goes like this


(for each conversation)


(for each phrase)


....


So an example dialog script could look something like this

Number of Conversations = 1
Name of Conversation = READYFORTAKEOFF
Number of Phrases = 2
Phrase 1 Subtitle = "TOWER, THIS IS ARCHANGEL 01, READY FOR TAKEOFF"
Phrase 1 Audio Tag = "TAKEOFFPERMISSION"
Phrase 2 Subtitle = "ARCHANGEL 01, TOWER, CLEARED FOR TAKEOFF, GOOD HUNTING"
Phrase 2 Audio Tag = "TOWERACKNOWLEDGE"

In order to use this conversation, one must only use the BeginConversation() function, like the one below:

DialogManager::BeginConversation("READYFORTAKEOFF");

It's pretty simple, and I've also added a few Tokens to the scripting system, so that the reaction to events can include a dialog playing out. The following script was used to test the new tokens, and the dialog system.

//when level initialized, play the "READYFORTAKEOFF" Dialog
-ONSTART, PLAYDIALOG, "READYFORTAKEOFF";

Menus
The next big thing on my to-do list is to get basic menus working. I have a pretty good idea how I'm going to make them work, I'm just waiting for Mark to get me the general layouts so I can start mapping buttons and stuff. Hopefully we'll get them done soon, so we can get a demo out to you guys.

Well thats all for now, sorry for the screenless entry, tomorrow I should have some cool screens of the new HUD working, and a bit of dialog as well perhaps. Anyways, if you have any suggestions, be sure to speak up, we don't bite (often). Peace Out!



Sign in to follow this  


4 Comments


Recommended Comments

Quote:
Well thats all for now, sorry for the screenless entry


It's alright. I don't even apologize anymore in my journal when I don't post them. [grin]

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now