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?
Here's something you could do
//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);
Thank you for your answer, but it doesn't work.
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 (http://www.adventuregamestudio.co.uk/manual/Conversations.htm) (e.g. set-globalint 50 1) instead of messing around with run-script.
???
Nothing happens!
Here is my script
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!
Do you really have two braces to open the conditional and other two to close it??
Yes, now I have one to open and one to close but it doesn't work.
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...)
sorry ::)
I'm starting the game, go to the room and the dialog doesn't even start. So what shall I do?
Quote from: Bogald on Mon 05/03/2007 20:05:06d1.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:
dFred1.Start();
I have changed the script like you told me but the dialogFred1 doesn't start yet.
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!
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.