Conversation
Posted: Sun Jul 09, 2017 8:44 am
I am trying to learn the conversation system and I am having some problems. Any help I could get would be appreciated.
I'm not sure if the this is the right forum but at least scripting is part of the process.
Here is a movie of the result I am getting this far, followed by a video edited representation of what I would like to have.
http://pekj.deviantart.com/art/Dialog-testing-691318740
I have read the conversiation.ini chapter in the on-line manual, the corresponding information in the chm help file and the chapter on conversation in the Chinese lecture serial. I have also search the forum for threads.
The scene is filmed by a fixed camera. Both characters in the scene are pawns. The actual player is placed outside camera view. One of the pawns represent the player character (agent Kat). I am using a pawn to be able to use animations that would not be available with the actual player character. The conversation is connected to the other pawn, (the commander).
The conversation is started in the script for the commander type pawn.
The conversation script looks like this
I have tried a couple of different command for the replies that I have left in the code but ”commented out” (//). The different versions of reply basically gives the same result for me.
SoundCustomReplyBackground("conva5.bmp", 10, 300) makes the game freeze when it gets to that line in the script.
The part concerning conversation in the Pawn.ini file looks like this
[It is basically the text that came with the original file.
I have made a new background image (and image for the alpha information) in a size fitting the windowed version I want the game to play in (640x400). I have regrouped the variables to get a better view of what each represents and of course changed a couple of the values.]
The result that I am getting is partly what I'm looking for.
The commander speaks his first line. The player gets 2 alternatives to chose from. The player can chose by clicking key 1 or key 2. When the player does that the conversation moves on to the commanders second line and the player is presented 1 option to reply. When the player chose that the conversation ends.
So far so god. That is basically what I want to happen in this try out.
Problems.
1. the animations stop running during the dialog. This is not a major problem, but it would be a lot better if the animations kept running.
2. The mouse pointer disappears. I would like to have the option for the player to chose his reply by point and click.
3. I don't get a background for the reply window. Makes it harder to read the text. This is a major problem.
4. The second set of replies are written on top of the first set of commands. That is, the first set of commands are not cleared before the second one is printed onto the screen. I suspect fixing problem 3 might also fix this problem (or maybe not). This too is a major problem.
5. There are x and y coordinates for a speaker icon, but not a variable for the icon image file. Not a major problem, but slightly confusing.
I'm not sure if the this is the right forum but at least scripting is part of the process.
Here is a movie of the result I am getting this far, followed by a video edited representation of what I would like to have.
http://pekj.deviantart.com/art/Dialog-testing-691318740
I have read the conversiation.ini chapter in the on-line manual, the corresponding information in the chm help file and the chapter on conversation in the Chinese lecture serial. I have also search the forum for threads.
The scene is filmed by a fixed camera. Both characters in the scene are pawns. The actual player is placed outside camera view. One of the pawns represent the player character (agent Kat). I am using a pawn to be able to use animations that would not be available with the actual player character. The conversation is connected to the other pawn, (the commander).
The conversation is started in the script for the commander type pawn.
Code: Select all
{
Start[()
{
PlayAnimation("comsit2", true, "");
Conversation("mission");
NewOrder("Animation");
}]
Animation[()
{
PlayAnimation("comsit2", true, "");
RestartOrder();
}]
}
Code: Select all
{
mission[ ()
{
Speak("OfficeStart","");
//SoundCustomReplyBackground("conva5.bmp", 10, 300);
SoundReply(1,"HowHelp","");
SoundReply(2,"lastMission","");
// MenuReply(1,"HowHelp","");
//MenuReply(2,"lastMission","");
//Reply(1,"HowHelp","");
//Reply(2,"lastMission","");
switch(Conversation(0))
{
case 1
{
NewConversation("mission2",true);
}
case 2
{
NewConversation("mission2",true);
}
}
} ]
mission2[ ()
{
Speak("NextMission","");
SoundReply(1,"Laws","");
// MenuReply(1,"Laws","");
//Reply(1,"Laws","");
switch(Conversation(0))
{
case 1
{
NewConversation("mission",false);
}
}
} ]
}
SoundCustomReplyBackground("conva5.bmp", 10, 300) makes the game freeze when it gets to that line in the script.
The part concerning conversation in the Pawn.ini file looks like this
[It is basically the text that came with the original file.
I have made a new background image (and image for the alpha information) in a size fitting the windowed version I want the game to play in (640x400). I have regrouped the variables to get a better view of what each represents and of course changed a couple of the values.]
Code: Select all
[Conversation]
iconx = 0
icony = 0
background = conva5.bmp
backgroundalpha = a_conva5.bmp
speachx = 22
speachy = 20
speachwidth = 600
speachheight = 100
speachfont = 11
speachwindowx = 10
speachwindowy = 10
replybackground = conva5.bmp
replybackgroundalpha = a_conva5.bmp
replyx = 22
replyy = 10;
replywidth = 600
replyheight = 100
replyfont = 11
replywindowx = 10
replywindowy = 380
replymenufont = 11
replymenubar = menuconv.bmp
replymenubaralpha = a_menuconv.bmp
giffile0 = menu\arrow.gif
;giffile1 =
;giffile2 =
;giffile3 =
;giffile4 =
;giffile5 =
;giffile6 =
;giffile7 =
;giffile8 =
gifx = 8
gify = 8
The commander speaks his first line. The player gets 2 alternatives to chose from. The player can chose by clicking key 1 or key 2. When the player does that the conversation moves on to the commanders second line and the player is presented 1 option to reply. When the player chose that the conversation ends.
So far so god. That is basically what I want to happen in this try out.
Problems.
1. the animations stop running during the dialog. This is not a major problem, but it would be a lot better if the animations kept running.
2. The mouse pointer disappears. I would like to have the option for the player to chose his reply by point and click.
3. I don't get a background for the reply window. Makes it harder to read the text. This is a major problem.
4. The second set of replies are written on top of the first set of commands. That is, the first set of commands are not cleared before the second one is printed onto the screen. I suspect fixing problem 3 might also fix this problem (or maybe not). This too is a major problem.
5. There are x and y coordinates for a speaker icon, but not a variable for the icon image file. Not a major problem, but slightly confusing.