Dialog...beginner...help

Started by fly, Mon 11/08/2008 21:05:53

Previous topic - Next topic

fly

Hi, I've searched the forum, manual and tutorial and i haven't found the answer..or I haven't been searching for the right tag.. Anyway I'm beginner in this and I have problem with making dialog in version 3.0.2......I don't know how to set that dDialog1 start when I click to talk with a cChar1 character. And how to set what he'll respond.  sorry but I'm a total beginner.. Hope someone will help  ???
Anyone that is willing to explain to me some things please send me a pm, thx

TwinMoon

I could explain it here, but the manual does it far better:

AGS Help file > Contents > Tutorial > Starting off > Conversations

Almost at the bottom, above the line More on conversations it clearly explains how to make the dialog start.

fly

I don't know where should I put that script, if you could show me like step by step screenshots?  And where do I write what should cChar1 answer? I made this:
Anyone that is willing to explain to me some things please send me a pm, thx

Makeout Patrol

The manual really does do an excellent job of explaining this and you should really take a look in there, but I'll take pity and give you a step-by-step.

To make the dialog start:

1. Open up the cChar1 window in the editor by double-clicking on it in the node tree on the right.
2. Look for the lightning bolt icon on the right side of the screen, beneath the pull-down menu, and click on it.
3. Below the icon you can see the list of interactions: it will probably have a list that says "any click on character" and "Interact character" and so on depending on what cursors you have in your game. Learn how this screen works; it is identical to editing interactions with hotspots, inventory items, objects, GUI controls, and so on.
4. Assuming you want the conversation to start when the player clicks on the character while the mouse is in "talk to" mode, click in the blank field to the right of "Talk to character" and click on the "..." button. This will automatically create a function in your global script called cChar1.Talk(), and this function will open in the editor.
5. In this function, type the script that you want to execute when the player makes this interaction. In this case, you want the game to start dialog 1, so put in the line that says dDialog1.Start(); here.

I really don't see how I can explain editing dialog any more simply than it already appears in the manual, but I'll try: if, for example, you want the character to respond "Hi" when the player clicks on option 1, you would write "char1: Hi!" in the line below "@1," and any further lines would be placed below in the same manner. (You don't put the lowercase c before the characters' names in the dialog editor - cEgo would be written as Ego here.) Place the conversation when the player clicks option 2 below @2, and so forth.

fly

Oh, it's so simple, thank you very much! Now I'm seeing some other problems..when talking, under text there is the same text with Font 2 and it makes this unreadable, how to fix this? how can I change text color? And one off topic question: cChar1 character is smaller than cEgo1 character so it looks stupid. how can I fix this?
thanx for help!
Anyone that is willing to explain to me some things please send me a pm, thx

Gilbert

It's probably because the OutlineStyle option for Font 1 is set to "Use outline font" and the outline font number is set to 2 (which is default for the default AGS fonts). Just change the OutlineStyle to "none" or "Automatic".

For text colour, if you are referring to the speech colours of the characters, there is a "SpeechColour" setting for each character so you can set their default speech colours. (These can also be changed ingame by modifying the Character.SpeechColor property if required.)

If you didn't draw the characters at the correct size, either reimport character graphics of corect sizes, or mess with the area scaling so that the player matches the NPC (if the NPC is a standing character and is set to ignore scaling), or, in a more complicated way, change the scaling of the characters ingame via scripting.

fly

The text is now OK. How can I set conversation to go automatically, I mean..that I don't have choices to say, so that options are going one after other automatically? I made cChar1 by editing cEgo1 bmp files, so they are exact same size, but on game it's different ?!  Scaling is turned off, but when it's on, nothing changes.. Oh, one more thing..when I pick up one inventory item, it doesn't dissapear, but other one does. What can I do to make the first item to dissapear? Script of this item is:
Code: ags

function avionj_Interact()
{
character[0].Walk(313, 209);

player.AddInventory(inventory[4]);
object[0].Visible = false;
DisplayMessage(0);
}
function avionj_Look()
{
DisplayMessage(1);
}
Anyone that is willing to explain to me some things please send me a pm, thx

Makeout Patrol

Quote from: fly on Tue 12/08/2008 02:13:30
The text is now OK. How can I set conversation to go automatically, I mean..that I don't have choices to say, so that options are going one after other automatically? I made cChar1 by editing cEgo1 bmp files, so they are exact same size, but on game it's different ?!  Scaling is turned off, but when it's on, nothing changes.. Oh, one more thing..when I pick up one inventory item, it doesn't dissapear, but other one does. What can I do to make the first item to dissapear? Script of this item is:
Code: ags

function avionj_Interact()
{
character[0].Walk(313, 209);

player.AddInventory(inventory[4]);
object[0].Visible = false;
DisplayMessage(0);
}
function avionj_Look()
{
DisplayMessage(1);
}


If you just want a conversation to happen when you TALK TO the character, there's no reason to use a dialog - in the cChar1_Talk() function, just put in a bunch of Character.Say() functions. For example:

Code: ags

cChar1_Talk(){
  cEgo.Say("Hello!");
  cChar1.Say("Hi there!");
}


Dialogs are there for when you want to give the player a choice of what to say; Character.Say() is there for when there's only one thing to be said.

I'm not sure what the deal is with your other two problems. For your object problem, what is "the other one?" What is disappearing, and what do you want to disappear? For your character graphics, show us a screenshot of what you mean, I frankly have no idea why that would be happening.

Khris

Instead of object[0].Visible = false; try avionj.Visible = false;
You don't have to use all that numbers, you can use the scriptname in most cases.

Matti

Quote from: fly on Tue 12/08/2008 02:13:30
I made cChar1 by editing cEgo1 bmp files, so they are exact same size, but on game it's different ?! 

In case you just edited the .bmp files you still have to import these new sprites (and replace the old ones).

All images are saved within AGS, so the editor doesn't open image files when running/editing a game.

fly

Quote from: matti on Tue 12/08/2008 11:44:05
Quote from: fly on Tue 12/08/2008 02:13:30
I made cChar1 by editing cEgo1 bmp files, so they are exact same size, but on game it's different ?! 

In case you just edited the .bmp files you still have to import these new sprites (and replace the old ones).

All images are saved within AGS, so the editor doesn't open image files when running/editing a game.
I know that.
Item dissapears now, when I replaced "object[0]" with "avionj".
Anyone that is willing to explain to me some things please send me a pm, thx

fly

Oh, I forgot..here's the screenshot of the characters

Anyone that is willing to explain to me some things please send me a pm, thx

fly

Scaling problem fixed, thanx to Ishmael's help on MSN...
Anyone that is willing to explain to me some things please send me a pm, thx

SMF spam blocked by CleanTalk