Welcome, Guest. Please Login or Register
AvP Unknown
Normal Topic AI - Dialogue Choices (Read 3178 times)

Posts: 40
Joined: Jun 12th, 2010
Gender: Male
AI - Dialogue Choices
Jun 12th, 2010 at 11:20pm
Print Post Print Post  
In this tutorial I will, assuming you have prior knowledge of DEdit and working with AI, explain how to work with a dialogue selection system (sample files are included).

What is a dialogue selection system, exactly?

Well, you can see pretty much how all of it it works in the .ed file supplied - but I'll give a rough explanation of the setup.

When you press use on an AI, you'll be paused (via the "swap" command) and then a box with three selections of what to say will pop up, controlled by the 1, 2 & 3 keys, respectively.

These are the choices and responses I've set up for the sample file.

    CHOICE 1:      "Nevermind."
    RESPONSE 1:      "No problem, sir."

    CHOICE 2:      "Come with me."
    RESPONSE 2:      "Yes sir."

    CHOICE 3:      "Stay here, guard this door."
    RESPONSE 3:      "Yes sir."

In order to edit this for your own purposes, you must modify the reply triggers (nevermind, comewith, guardhere), these pretty much allow you to have anything said, happen, occur and so on - you could have one of the choices have the AI say "Yes sir." then have an explosion blow half your map, it's really quite flexible in what you can do with it.

In the CinematicTrigger named "GuardChat" you'll find that it's pretty straight forward, they align together down the properties list and stringboxes - for example: (look at the .ed first and this will make sense.)

    Player;Player;Player - This controls who says the dialogue clips that go with the text (read on for explanation).

    29510;29511;29512 - The strings which display the player's choices (in text) - if there's a dialogue clip with an identical name to the string numbers then the player should speak based on which one you choose, given that this system is how subtitles work - the string number in cres.dll with it's text corresponds to a .wav file in the sounds/dialogue folder.

    NONE;NONE;NONE - If you want an option but don't want anyone to speak the dialogue clip that goes with the string to play then set the target value to none, you can set a clip for any one of the strings, for example NONE;Player 20510;NONE - this makes only the second choice play a dialogue clip.

    nevermind;comewith;guardhere - This determines what objects should be targeted for the messages below, corresponding to the option keys 1, 2 and 3, respectively.

    TRIGGER;TRIGGER;TRIGGER - This sends the message to the specified entities, corresponding to the option keys. They are all trigger entities (nevermind, comewith, guardhere) so they will accept this command, though you can set this to be anything like opening a door or deactivating an AI - what I've done here is set up three triggers to act as responses from the AI when you make a choice.

It's fun to experiment with, if you like you may grab a copy and study it for yourself.
Demonstration file.

Back to top
IP Logged