set-globalint function in dialogs

Started by Best, Thu 04/09/2003 11:48:08

Previous topic - Next topic

Best

I dont think someone will help me, but lets try:

I have a problem with set-globalint function in dialogs. I set the GI 5 to VAL 1. (set-globalint 5, 1)
Than I clicked on character interactions and did this:

Talk to character: Conditional-if variable is set to certain value (5, 1)
child action was: Enable dialog option.

Nothing happened.

Than I tried to use scripting so I did this:

Talk to character: Run script
 if (GetGlobalInt(5)==1) {
    GetDialogOption (2, 3);
}

And this two thangs were not the only ones I tried. Dont laugh bout my english cuz Im a Slovak and please help me. I dunno what to do.

Thanks
Valame tes lan-utas desi gronto?

Ishmael

set-globalint 5 1 // in dialog scritp

// Talk to Charcter
if (GetGlobalInt(5)==1) {
SetDialogOption(3,2,1); // would enable option 2 in dialog 3
}
RunDialog(3); // you maybe want to run the dialog, too

Anyhelp?
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.

Best

You know, this is crazy!

I need to switch an object back on, but if I wanna do it, just nothing happened. In dialog i tried to set-globalint 5, 1 and set-globalint 5 1. Than I left the room and came back (In room interactions: Player enters room (after faiden) there was this: Conditional: if variable is set to ceratain value (5, 1)
child action: Switch an object back on (2).

And just nothing happend.
Valame tes lan-utas desi gronto?

Scorpiorus

Quote from: Best Willis on Thu 04/09/2003 13:37:28
You know, this is crazy!

I need to switch an object back on, but if I wanna do it, just nothing happened. In dialog i tried to set-globalint 5, 1 and set-globalint 5 1. Than I left the room and came back (In room interactions: Player enters room (after faiden) there was this: Conditional: if variable is set to ceratain value (5, 1)
child action: Switch an object back on (2).

And just nothing happend.
That's because interaction editor's global variables are different from usual GlobalInts. You have to use run script option instead of the conditional-if:

on player enters room (after faiden):

if (GetGlobalInt(5)==1) ObjectOn(2);

-Cheers

Best

Valame tes lan-utas desi gronto?

Totoro

#5
Hi again,
could you tell me if there is a problem about this script within the dialog-editor?

@8  // option 8
DAVID: Right now I have no big orders...
DAVID: But I feel bored.
DAVID: Get me something exciting.
EGO: Aye aye, Sir!
set-globalint Knowledge 3
option-off-forever 8

Am I maybe not allowed to use "Knowledge", do I have to use a numbered global value for that?

EDIT: Got it now... its because of the fact you mentioned, that global-values in script and global-values in interaction editor are not the same, right?

Scorpiorus

Yep, the set-globalint <GI> <value> dialog script command operates with the GlobalInts that are accesible via GetGlobalInt() / SetGlobalInt() functions.

~Cheers

SMF spam blocked by CleanTalk