PDA

View Full Version : Some Small Questions


Ancharos
08-30-2005, 03:03 PM
If anybody could answer these questions for me, it would be great.

1) How do you make dialog nodes selectable only once, I mean, that dialog node can only be used once?

2)Is there a script that I can use to start 2 NPC's to talk to each other?


thanks for your time!

stoffe
08-30-2005, 04:19 PM
1) How do you make dialog nodes selectable only once, I mean, that dialog node can only be used once?


Add an action script to that dialog node that sets a variable (either LocalBooleans set on the NPC or GlobalBooleans should work, depending on the situation), then add a conditional script to the dialog node that checks if this variable is set.

There are standard scripts that comes with the game that you can use for this, here are a few off the top of my head:

Action scripts:
a_glob_bool_set = Sets the Global Boolean set in the StringParam to the value in the first parameter, 1 for TRUE, 0 for FALSE.
a_local_set = Sets the Local Boolean set in the first parameter to TRUE.

Conditional scripts:
c_glob_bool_set = Makes the dialog node appear if the Global Boolean set in the StringParam is set (is TRUE):
c_local_set = Makes the dialog node appear if the Local Boolean set in the first parameter is set (is TRUE).

There are a whole bunch of other standard scripts for checking and setting Global and Local variables. Check in Scripts.bif.


2)Is there a script that I can use to start 2 NPC's to talk to each other?


Start a conversation as usual with ActionStartConversation(), then change the Speaker field on your dialog node to the Tag of the creature that should speak this line, and the Listener field to the Tag of the creature they speak to. This way you can make any number of NPCs take part in a conversation. If you add no player responses they will have a dialog without involving the player.

Ancharos
08-30-2005, 08:05 PM
Thankyou very much! thats all I needed!