Dialog script problems(SOLVED)

Started by proskiier, Tue 15/01/2008 21:46:08

Previous topic - Next topic

proskiier





basically my first dialog has a person where you can guess their favorite color and if you get it right i wanted to give the player an inventory item



ive tried so many of the add inventory ways and it gives an error for all of them.

Please help me soon, this is driving me nuts!!!

Galen

#1
Read The Freaking Manual.

add-inv X
Adds inventory item X to the current player's inventory. This does the same thing as the AddInventory script command, but is provided here because it is frequently used in dialogs.

proskiier

#2
ok and how about play sound???

Is there a list of all dialog commandS???

nervermind found it in the help file... thanks... kinda dumb you can only do so few things :(

NiksterG

Yes, there is. It's in the main Dialogs page in the manual. Please read this - it's got good information.

To answer your question, in order to play a sound during the dialog, you'll have to do run-script x.

If the sound should be played after every time the player gets an item, you can do that under game settings.
Check out my games! (Not all made with AGS)

Galen

Quote from: proskiier on Tue 15/01/2008 21:59:29
nervermind found it in the help file... thanks... kinda dumb you can only do so few things :(
You're ignoring the function that allows you to add scripts (in a way) into it.

Khris

And fyi:
It should be possible to do this:

Code: ags
// dialog script file
@S
@2
COLORTWIN: "Wow, you're right!"
run-script 1
goto-dialog 4
@1
@3
@4
COLORTWIN: "Nope, that's not right!"
return
@5
COLORTWIN: "Ok fine, bye!"
stop


Then, in the global script, find/create the function dialog_request:
Code: ags
function dialog_request(int param) {
  if (param==1) {
    cEgo.AddInventory(iColorSplotch);
    PlaySound(2);
  }
}

SMF spam blocked by CleanTalk