Dialog

Started by , Mon 05/03/2007 17:57:33

Previous topic - Next topic

Bogald

Hi,

after my first problem, I've got a problem with my dialog.

My situation is: EGO comes into the ROOM5 and PoJIT will come to him, FaceCharacter and start the dialog1. I want that if EGO choose option 1 and not option 2, the dialog will not start next time EGO comes to ROOM5.

What shall I do?

Joe

#1
Here's something you could do

Code: ags


//At room script, player enters room after fade in
if(GetGlobalInt(1)==0){
//Facing stuff
dialog.Start();
}

//At dialog script, option 1
//Conversation
run-script 1

//At global script, dialog_rquest
if(parameter==1)SetGlobalInt(1,1);

Copinstar © Oficial Site

Bogald

Thank you for your answer, but it doesn't work.

Ashen

Slight error in that code, as you're checking GI 1, but setting GI 50... Change them to match and it should work.
Other than that little typo, variables are definitely the way to go - but if you use GlobalInts, you can use the dialog script command set-globalint (e.g. set-globalint 50 1) instead of messing around with run-script.
I know what you're thinking ... Don't think that.

Bogald

 ???
Nothing happens!

Here is my script
Code: ags
if (GetGlobalInt (1) ==0) {
       {
gGui0.Visible = false;
cFred.Walk(166,135,eBlock);
cEgo.Walk(214, 135, eBlock);
cEgo.FaceCharacter(cFred) ;
cFred.FaceCharacter(cEgo);
cEgo.FaceLocation(43, 123);
d1.Start();  
}
}

//in Room after fadein 
--------------------------------------------------------------------
Fred: X!
option-off-forever 2
option-on 3
option-off-forever 1
run-script 4
run-script 5
set-globalint 1 1
return

//in the dialog script!

But nothing happens!

Joe

Do you really have two braces to open the conditional and other two to close it??
Copinstar © Oficial Site

Bogald

Yes, now I have one to open and one to close but it doesn't work.

Ashen

Can you just clarify what you mean by 'Nothing happens' and 'it doesn't work'? (Dialog still runs second time, dialog doesn't run either time, something else entirely...)
I know what you're thinking ... Don't think that.

Bogald

sorry ::)

I'm starting the game, go to the room and the dialog doesn't even start. So what shall I do?

Khris

Quote from: Bogald on Mon 05/03/2007 20:05:06
Code: ags
d1.Start();
I'm not sure what AGS makes of "d1", but that's probably the reason why nothing's happening.

Name the dialog properly, like "Fred1", then run it using:
Code: ags
dFred1.Start();

Bogald

I have changed the script like you told me but the dialogFred1 doesn't start yet.

Joe


Code: ags

if (GetGlobalInt (1) ==0) {
gGui0.Visible = false;
cFred.Walk(166,135,eBlock);
cEgo.Walk(214, 135, eBlock);
cEgo.FaceCharacter(cFred,eBlock) ;
cFred.FaceCharacter(cEgo,eBlock);
cEgo.FaceLocation(43, 123,eBlock);
Wait(20);
dFred1.Start();  
}



Try using that code.
Blocking commands are necessary so that things happen one by one.
And adding that 'Wait' maybe fixes it.
But I'm not sure at all!
Copinstar © Oficial Site

Bogald

I'm seeing my mistake I'm such an idiot :-[

GlobalInt1 is already used for whatever.
I took GlobalInt66 and now it is running like never before  8)

Thank you for your help.

SMF spam blocked by CleanTalk