Character Diologue looping Incorrectly? + Technical Issue

Started by DrKay, Sat 05/01/2008 10:05:36

Previous topic - Next topic

DrKay

When I make the player character converse with another, and the player chooses a topic that leads to a new topic list, after they select an option on that topic to go back to the original topic list, it goes back through the greetings in the original, which makes no sense. How do I bypass that part?

E.G
It looks something like this:

PLAYER: Hello
Other: Yo
PLAYER: What's your name?
Other: Guess
Player: No idea
Other: Okay
Player: Hello
Other: Yo
etc.
--------------------------------------

2.
I've recently downloaded the 'Space' pack from the resources claiming to contain additional sprites and animations etc. but once I download them, then what? When I try to import character in AGS, the file comes up blank.

Galen

If you'd show us what code you are using in the dialog to go back, it may help?

DrKay

// dialog script file
@S  // dialog startup entry point
EGO: Hello there.
STRANGER: ...Hi
return
@1  // option 1
STRANGER: Just a passer-by
EGO: Okay...
return
@2  // option 2
STRANGER: *shrug*
EGO: Interesting...
return
@3  // option 3
EGO: Guess I'll see 'ya around then.
STRANGER: Yup.
stop
@4  // option 4
STRANGER: Guess...
goto-dialog 1

// dialog script file
@S  // dialog startup entry point
return
@1  // option 1
STRANGER: Nope
return
@2  // option 2
STRANGER: Wrong
return
@3  // option 3
STRANGER: T'is not.
return
@4  // option 4
STRANGER: That's a shame.
goto-dialog 0

Galen

You're switching back to the first dialog, how's AGS supposed to know not to show the greeting? Anyhow, this could actually be done without two dialogs.
Try and get "Dialog Editor". That'll allow you to create structured dialogs without messy coding.

As for the problem use option-on 2 or option-off 2 to show the second branch of options and then go back to the first without having to change dialogs, hence repeating the "Hello".


Try this, instead of two topic, add the four options of the second one to the first and disable them from showing, then past this into the script:
Code: ags

//The first four options should be on, the later 4 off

// dialog script file
@S // dialog startup entry point
EGO: Hi there.
STRANGER: ...Hi
return

@1 // Who R U?
STRANGER: Just a passer-by
EGO: Okay...
return

@2 // What R U doin?
STRANGER: *shrug*
EGO: Interesting...
return

@3 // Bye bye!
EGO: Guess I'll see 'ya around then.
STRANGER: Yup.
stop

@4 // Whutz ur name?
STRANGER: Guess...
option-off 1
option-off 2
option-off 3
option-off 4
option-on 5
option-on 6
option-on 7
option-on 8
return

@5 // Bob?
STRANGER: Nope
return

@6 // Ryan?
STRANGER: Wrong
return

@7 // Roger Wilco?
STRANGER: T'is not.
return


@8 // I give up...
STRANGER: That's a shame.
option-off 5
option-off 6
option-off 7
option-off 8
option-on 1
option-on 2
option-on 3
option-on 4
return

DrKay

Hey, it was in the basics guide, even the guide led to that problem but didn't acknowledge it.

Galen

By using a return command it shouldn't replay the first message so I fail to see your problem?


Galen

Weird? I tested it and it worked fine. What version of AGS are you using?

DrKay

I dunno, I just downloaded it from his website as of yesterday.

Khris

Don't put anything after @S (except "return").
Put the opening lines in the game script rather than the dialog.
Code: ags
player.Say("Hi there.");
cStranger.Say("...Hi");
dStranger.Start();

DrKay

I honestly know ONLY what the basic tutorial taught, wheres the game script?

Khris

How did you make the game run the dialog? Via the interaction editor?


Galen


DrKay

Sorry; yes it is run through the interaction, but made in the dialog tab.

Khris

I recommend learning the scripting language.
Anyway, go to the event (Talk to character x), choose the "Game - RunDialog" action (or whatever it's called) and change it to a RunScript action (2nd in the dropdown menu).
Click the "Edit script..." button and enter the code I've mentioned.
(For the code to work as-is, the character's script name has to be "cStranger" and the dialog has to be named "dStranger").

SMF spam blocked by CleanTalk