2 Q´s

Started by Best, Wed 15/10/2003 23:45:57

Previous topic - Next topic

Best

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
Valame tes lan-utas desi gronto?

Ishmael

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

}

}
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

Kweepa

#2
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 :)
Still waiting for Purity of the Surf II

SMF spam blocked by CleanTalk