I have 2 questions:
1. How to use the run-script x function from dialog properly? I red t manual, but dont understand it. Please help.
2. What is the maximal limit of TIMER?
Thanks
Best Willis
1.
In dialog script, when you want to, say, run script number 1, which usually is the first script to be run, when starting to use the dialog_request, just put:
run-script 1
in the dialog script. Then, in the Global Script, make a new function, dialog_request, and set it up with an if-statement to check which script is meant to be run, like:
function dialog_request (int xval) {
// first, the if to check which number was passed with run-script as the script number to be run.
if (xval == 1) { // if it was 1...
// ... run the script placed here
}
}
1. First, put "run-script 5" in your dialog.
Then, go to the "Script" menu and select "Edit global script".
Then, find the dialog_request function and type this code into it:
if (xvalue == 5) {
// replace this code with whatever you want to do in the dialog
FaceCharacter(EGO, NARRATOR);
DisplaySpeech(EGO, "I can hear you breathing.");
}
If you can't find the dialog_request function, maybe you don't have one yet - and if you started the game from scratch, that will be the case - so in the global script, right at the bottom, type this in
function dialog_request (int xvalue) {
if (xvalue == 5) {
// replace this code with whatever you want to do in the dialog
FaceCharacter(EGO, NARRATOR);
DisplaySpeech(EGO, "I can hear you breathing.");
}
}
< edit - I seem to be following TK around :) >
2. If you mean how long can a timer run for, it's an int, so I think its maximum value is about 2,000,000,000 game ticks, which is 50,000,000 seconds, or about 580 days. That should be enough for most games :)