Need help with Dialog. For Assessment Task, help needed urgently.

Started by Appz, Wed 11/06/2008 08:46:16

Previous topic - Next topic

Appz

Ok, first up;

Here's a section of the script

"// Dialog script file
@S Jack: "Hey Micky!"
Micky: "Hey Jack!"
Jack: ...
Micky: "So, what's happening with the Party?"
return
@1
Jack: "I thought we'd get drunk and go for a joy ride!
stop
@2
Jack: "Well, I thought I'd drive us there."
return  "

But, I get an error when i attempt to play the game. It says, "Dialog (Line 7): Invalid Label Marker  Must be 1.

Any idea what i've done wrong? I've read through the Help with no luck.

Also, what I'm aiming at with this is to have Jack(Player Char) and Micky, have a conversation, with Jack answering three questions, each having three options. Only one of the options is correct. If Jack doesn't get it correct, then you have to initiate the whole conversation again.

Any help would be appreciated.

Appz

GarageGothic

I don't have much experience with the built-in dialog function, but you're missing a quote at the end of this line:
Code: ags
Jack: "I thought we'd get drunk and go for a joy ride!

Appz

Thanks for that, I would have missed that otherwise.

Hmm, would you happen to know what the 'Main Event Script' is? It's in the Conversations walkthrough, within the Tutorial->Setting up the game tab? It's roughly half-way down.

GarageGothic

The "main event script" means the global and room scripts. What the tutorial is saying is that you can't use normal script language and call functions and whatnot from inside a dialog script but only use the dialog specific commands and use run-script for anything else.

Gilbert

Did you create the options for the dialog first?

Or, did you create say 3 options and only included "@1" and "@2" in the script?

(I guess it's the former.)

You need to have the same number of options as those @1, @2, etc. in the script.

Click "Create new option" on the left pane until the number of options available matches the number of @1, @2, etc.

Appz

No I didn't. Thanks Gilbot. I'll do that right now.


Ahh, i thought there was a sort of box for script for the main story line. This is fairly hard to get my head around, 'specially since I started a few days ago. I've got everything done, the second character, everything in the room is finished, I just can't seem to get the dialogue between the two characters to flow/work properly. Any ideas?

Appz

I don't like to double post, but would someone be able to tell me how to create an event that includes;

Jack(Player Char) and Micky, have a conversation, with Jack answering three questions, each having three options. Only one of the options is correct, if he get's it correct then he moves on to the next question. If Jack doesn't get it correct, then you have to initiate the whole conversation again.

Thanks.

Gilbert

To move on the another question, one simple way is to make another Dialog.

So, when the player clicked the correct option, just use goto-dialog to switch to another dialog topic, to start over from the beginning, just go back to the original starting dialog topic.

Matti

You can modify your posts, Appz.

Okay, to illustrate what Gilbot said:

DIALOG 1, top of the script:
Micky: "What is 2+5?"
return*

@1 (answer "seven"):
goto-dialog 2

@2 (and 3)
return


DIALOG 2, top of the script:
Micky: "blabla?"
return

@1 (and 2):
goto-dialog 1*

@3 (right answer)
goto-dialog 3


DIALOG 3, top of the script:
Micky: "blabla?"
return

@1 (right answer):
run-script x (if you want something to happen after having answered the 3rd question correctly)
stop.

@2 (and 3)
goto-dialog 1*


*If you want the conversation to stop when jack gives the wrong answer, replace goto-dialog 1 / return with "stop."

Appz

Hmm, I think i follow. Thanks guys.

So, am i placing what both characters say in the dialogue, or just one of them?

Matti

In the dialog editor you write down each sentence the player character should be able to choose from (@1,@2,@3 etc.)

In the script you write down what the other character is supposed to say (Mickey:"...")

EDIT: dialog 1 is in fact dialog 0...

Appz

Pardon? What goes in where? What's the Option window used for? Oh and, it's dialog 1, not dialog 0 on mine?

Also, How do I get the talking (I know about the little talk button) to happen initially between the two sprites within the game. I've done the script, but Micky won't respond when i've clicked on him with the small 'talk' tool.

Another thing, how do I go about building what should happen after Jack answers the last question correctly?

Sorry to be such a bother.

Matti

Well, it should look like that:



The options lets you write down the sentences the player can say.

The script lets you write down what happens if the player chooses one of the options. "Show" means the option is displayed when the dialog starts, "Say" means that the player says what you've written down (like "Nine" or "seven", when choosing the option.

The dialog editor is really easy to use, so please just go through the tutorial.

As for the script to letting the dialog start and make things happen after the dialog is finished, the same: look it up in manual.

It's the dialog editor from v.2.7.1, so it could look slightly different.

Appz

I just worked it out. Thanks a lot for the help.
Would you be able to tell me which manual would tell me how to create the script to letting the dialog start and making things happen after the dialog is finished?

Matti

You definitely should go through:


Getting started


Scripting


For running a script during or right after a dialog you need the command run-script x (just like goto-dialog x) in the dialog script. Then, in the global script there's a section dialog_request, wherein you can script whatever should happen.

SSH

Also, may be sensible not to leave doing your assignment until the last day ;)
12

SMF spam blocked by CleanTalk