dialog run scripting and not only problems

Started by Dualnames, Sat 09/12/2006 22:45:31

Previous topic - Next topic

Dualnames

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.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

monkey0506

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:

Code: ags
run-script 42


Then in your global script:

Code: ags
function dialog_request(int param) {
  if (param == 42) {
    // do interaction
    }
  }

Ashen

This recent thread in Beginners Tech deals with almost exactly this question. It's also in the BFAQ.
I know what you're thinking ... Don't think that.

SMF spam blocked by CleanTalk