Does anyone know of a way to incorporate dialog into the CCS plug-in? Essentially what I'm trying to do is create a "security monitor" type of thing, where you can tune into what's going on in any particular room. The CCS plug-in is PERFECT for this kind of thing... except the game hinges on having the characters be able to speak. Any tips?
Yes, it can be done.
Crap.
I'm going to have to dig out the source for Keptosh now huh??
Okay...
Under character interaction just run something like this:
ccPauseExecution(SKWEEL);
DisplaySpeech(SKWEEL, "Hello.");
RunDialog(0);
in the dialog define a parameter like so:
if (parameter == 1) {
// Stop talking to Skweel
ccResumeExecution(SKWEEL);
}
If that doesn't help drop me an email (junc@juncmodule.com) and I will send you the source for the Keptosh remake if you need it. I have an entire conversation set up in it.
good luck,
-junc
So, do you want a conversation, or just some speech?
I think he wants automatic background chatting between the NPCs like they walk in the background to show something like a scene where people walk and talk.
E.g something like this: While you explore a pub, a guest comes in, talks to the barkeeper and leaves the pub later, others come in, talk and leave, ... But not as a cutscenes, but as background activity.
ah, yeah there is no backgorund talking possible via CCS at the moment.
The only workaround I see is to make a use of DisplaySpeechBackground() but that's very annoying especially if you have a lot of speech.
I'll see what I can do about the problem.
Yeah, sorry for the delay. A-v-o's got it. I suppose I could use DisplaySpeechBackground as a workaround and make a function that'll do all the work. I'll have to think about it. And Scorpiorus, if you come with a solution, I'll be eternally greatful. :-)
Ah, sorry Dave for not providing the possible solution. The one I had in mind kinda messy one. Anyway here it is:
You can check repeatedly for global int that was set inside CCS command and if its > 0 then stop executing, display speech, then resume executing again:
ccCreateCommand(MAN, "SET:Global(3)=1;"); //global int#3=1 a flag to display appropriate speech
ccExecuteCommand(MAN, MAN);
in repeatedly_execute:
if (GetGlobalInt(3) > 0) {
ccPauseExecution(MAN); // pause execution
if (GetGlobalInt(3)==1) {
qDisplaySpeech(MAN, "blah blah blah 1");
qDisplaySpeech(EGO, "blah blah blah 1");
qDisplaySpeech(MAN, "blah blah blah 1");
}
else if (GetGlobalInt(3)==2) {
qDisplaySpeech(MAN, "blah blah blah 2");
qDisplaySpeech(EGO, "blah blah blah 2");
qDisplaySpeech(MAN, "blah blah blah 2");
}
SetGlobalInt(3,0); // reset global int 3
} else if (qIsTalking()==0) ccResumeExecution(MAN);
See http://www.agsforums.com/yabb/index.php?board=2;action=display;threadid=11868 thread for intergrating qDisplaySpeech function.