Dialog (and scripting?) problems..

Started by lammhult, Sat 20/09/2003 20:14:41

Previous topic - Next topic

lammhult

How can I disable and enable a dialog option in the middle of conversation?

And how I can make things to happen in the middle of conversation? Like when you use right dialog options, an object will appear in the room (or some other room) etc..

Final question may be the answer to both earlier, but how the regular scripting language works in dialog script?

taryuu

well there's  these commands

option-off X
Turns option X for the current topic off, meaning it won't be displayed in the list of choices next time.

option-off-forever X
Turns option X off permanently. It will never again be displayed, not even if an "option-on" command is used.

option-on X
Turns option X for the current topic on, including it in the list of choices to the player next time they are displayed.

read the tutorial here
http://www.agsforums.com/acintro8.htm

and as for the other question you can scripts from the global script in your conversation with this

run-script X

Runs global text script function "dialog_request", with X passed as the single parameter. This allows you to do more advanced things in a dialog that are not supported as part of the dialog script. The "dialog_request" function should be placed in your game's global script file, as follows:

 function dialog_request (int xvalue) {
   // your code here
 }

does that help?
I like having low self-esteem.  It makes me feel special.
   
taryuu?

PaladinOfHonor

What the "X" means ?

What I need to set on it ?

:o :o :o

TK -Visiting Cousin



Isegrim

The number of the dialog option you want to turn on/off...
sonds logic, hm? :P
This post was generated automatically and therefore bears no signature.

PaladinOfHonor

Quote from: Isegrim on Sun 21/09/2003 16:52:10
The number of the dialog option you want to turn on/off...
sonds logic, hm? :P

but what if I want to disable just one line of the dialog ?

And where I put it ?
Begin , Middle or end ?

:o

Isegrim

This post was generated automatically and therefore bears no signature.

PaladinOfHonor

Quote from: Isegrim on Sun 21/09/2003 19:59:14
Can you be more concrete?

A : @s "Hello !"
B : @s "Hail :D !"

<here I want when he will "return" function to here , they wont say it>

A : @1 "what is ur name ?"
B : @1 " My name is Pigi , short of pigines"
A : @1 "Umm...."

<here I want to disable it>

A : @2 "What is ur price for all ?"
B : @2 "34 gp"

return


thats all...

where i put the "<" ">" i want to know what to put ^^

Isegrim

#9
Your code is totally screwed.

So... In your editor, the dialog topic 0 should contain the following options:
1: "What is your name"
2: "What is your price?"
behind both lines, both boxes should be checked. ("Show" and "Say" are on)

Then your dialog script should look like:

// dialog script file
@S// dialog startup entry point
   A:"Hail!"
   B:"Hello!"
   return
//Note: what stands above will be said AUTOMATICALLY

 
@1 // option 1
   B:"My name is..."
   A:"blahblah"
   option-off 1 //now only the question "What is your price..." remains
   return //return to the dialog
   
   
@2// option 2
   B:"Blahblah"  
   stop //will exit the dialog and return to the game



Also note that when the "Say" option is on, the line will be said. You do not need to put it in the dialog script again.

For your further progress I strongly suggest that you take a very close look at Demo Quest. It contains really all you need. I must say that you could find most answers to your questions yourself by looking how they did Demo Quest.

Edit:
Sorry if that sounds a bit hard, but honestly: Play with Demo Quest. Change settings, add your own rooms, copy their script functions and modify them. This way you learn more about AGS than during a month here in the forum. Btw. I think there is also a small cutscene (When Roger opens a door)
This post was generated automatically and therefore bears no signature.

PaladinOfHonor

Quote from: Isegrim on Sun 21/09/2003 20:27:54
Your code is totally screwed.

So... In your editor, the dialog topic 0 should contain the following options:
1: "What is your name"
2: "What is your price?"
behind both lines, both boxes should be checked. ("Show" and "Say" are on)

Then your dialog script should look like:

// dialog script file
@S// dialog startup entry point
   A:"Hail!"
   B:"Hello!"
   return
//Note: what stands above will be said AUTOMATICALLY

 
@1 // option 1
   B:"My name is..."
   A:"blahblah"
   option-off 1 //now only the question "What is your price..." remains
   return //return to the dialog
   
   
@2// option 2
   B:"Blahblah"  
   stop //will exit the dialog and return to the game



Also note that when the "Say" option is on, the line will be said. You do not need to put it in the dialog script again.

For your further progress I strongly suggest that you take a very close look at Demo Quest. It contains really all you need. I must say that you could find most answers to your questions yourself by looking how they did Demo Quest.

Edit:
Sorry if that sounds a bit hard, but honestly: Play with Demo Quest. Change settings, add your own rooms, copy their script functions and modify them. This way you learn more about AGS than during a month here in the forum. Btw. I think there is also a small cutscene (When Roger opens a door)

1 - i didnt want to write everythink in the right order because i dont realy remember...

2 - so if the "@S" is auto so its a problem :/
nevermind , i could manage with that i guss...

3 - oh yes , now i got it with the numbers

4 - wher i can find the demo quest ?

Isegrim

The @S thingy is not a problem at all...
Don't write anything but "return" and all is well.

You can download Demo Quest right where you downloaded the AGS editor.
This post was generated automatically and therefore bears no signature.

Scummbuddy

- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

SMF spam blocked by CleanTalk