Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
#559801 13/12/14 04:01 AM
Joined: Oct 2014
Location: Hogwarts
member
OP Offline
member
Joined: Oct 2014
Location: Hogwarts
Has anyone has made any progress adding 2-player dialog to their game? I'll keep trying to figure it out on my own, but if anyone has any info or insight, let me know. Thanks!

#1) How do I make 2 NPCs talk back-and-forth to one another like the drunk guards, Junius and Bibinus? From what I can tell, you need to open the Keyword Editor and create a thread such as [Greeting]. You use [Add Text] to add more dialog boxes to that dialog thread, then open each box individually and assign a [Speaker] to each. (Each dialog box has a speaker slot, with up to 4 speakers) However, I can't figure out how to add character names to the speaker box.

#2) How do I make Player 1 and Player 2 talk to each other?

Joined: Oct 2014
B
enthusiast
Offline
enthusiast
B
Joined: Oct 2014
DialogStartThreeSpeakerDialog("Dialog",CHARACTER_NPC1,CHARACTER_NPC2,_Player);

The player's responses are the roots of the chat nodes (folder icon) - the same as always.

NPCs use the "add text" or the trees of the nodes to speak - you were on the right track here.

You ONLY assign speaker tabs for NPCs - if you use the line of script I have above, NPC1 would be speaker 1, NPC2 would be speaker 2. You don't have to do anything for the player - he will speak the root of the node when you "Push" them into the chat.

Just learned the multiple NPC conversation myself.

I haven't tried to make a two player conversation yet. Can't help ya there for the time being.



Last edited by Burgee; 13/12/14 07:20 AM.
Joined: Oct 2014
Location: Hogwarts
member
OP Offline
member
Joined: Oct 2014
Location: Hogwarts
That worked, thanks!

Do you have any idea how to set different dialogs depending on whether certain characters are alive or not? For example, I want to have a three speaker dialog if all the characters are still alive, but I want a two player dialog to fire if only two are alive. I tried setting a global event when the character died then setting a condition on the dialog but it didn't work:

IF
CharacterKilledByCharacter(CHARACTER_Karl,_Player)
THEN
GlobalEventSet("KarlDead",1);

IF
DialogStartRequested(CHARACTER_Karin, _Player)
GlobalSetEvent("KarlDead",0)
THEN
DialogStartThreeSpeakerDialog("Karin",CHARACTER_Karin,CHARACTER_Karl,_Player);

IF
DialogStartRequested(CHARACTER_Karin, _Player)
GlobalSetEvent("KarlDead",1)
THEN
DialogStartTwoSpeakerDialog("Karin2",CHARACTER_Karin,_Player);


ERRORS:
[syntax error "GlobalSetEvent" unexpected]
[rule condition syntax]

Joined: Oct 2014
B
enthusiast
Offline
enthusiast
B
Joined: Oct 2014
Originally Posted by JecklynHyde
That worked, thanks!

Do you have any idea how to set different dialogs depending on whether certain characters are alive or not? For example, I want to have a three speaker dialog if all the characters are still alive, but I want a two player dialog to fire if only two are alive. I tried setting a global event when the character died then setting a condition on the dialog but it didn't work:

IF
CharacterKilledByCharacter(CHARACTER_Karl,_Player)
THEN
GlobalEventSet("KarlDead",1);

IF
DialogStartRequested(CHARACTER_Karin, _Player)
GlobalSetEvent("KarlDead",0)
THEN
DialogStartThreeSpeakerDialog("Karin",CHARACTER_Karin,CHARACTER_Karl,_Player);

IF
DialogStartRequested(CHARACTER_Karin, _Player)
GlobalSetEvent("KarlDead",1)
THEN
DialogStartTwoSpeakerDialog("Karin2",CHARACTER_Karin,_Player);


ERRORS:
[syntax error "GlobalSetEvent" unexpected]
[rule condition syntax]


You're on the right track. You should be using

IF
DialogStartRequested(CHARACTER_Karin, _Player)
AND
CharacterIsDead(CHARACTER_Karl,1)
THEN
DialogStartTwoSpeakerDialog("Karin2",CHARACTER_Karin,_Player);


IF
DialogStartRequested(CHARACTER_Karin, _Player)
AND
CharacterIsDead(CHARACTER_Karl,0)
THEN
DialogStartThreeSpeakerDialog("Karin",CHARACTER_Karin,CHARACTER_Karl,_Player);


Last edited by Burgee; 14/12/14 05:30 AM.

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.5