I want to use run-script on a dialog
but i don't know how to make this:
I want the game when I have 12 pieces of eight ( a Monkey Island game currency) to enable a dialog option
However the real problem is that you get for example 5 pieces when giving an object to someone, 4 when you unlock a box and 3 are given to you through a dialog.
PLEASE HELP ME.And by no means don't tell me to lokk the manual or technical forums cause i've done that already. Thank you.
Quotedialog_request (int parameter)
Called when a dialog script line "run-script" is processed. PARAMETER is the value of the number following the "run-script" on that line of the dialog script.
In your
dialog script put something like:
run-script 42
Then in your
global script:
function dialog_request(int param) {
if (param == 42) {
// do interaction
}
}
This recent thread (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=29351.0) in Beginners Tech deals with almost exactly this question. It's also in the BFAQ (http://americangirlscouts.org/agswiki/Scripting%2C_Code_%26_Interaction#Running_regular_code_inside_dialog).