Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Helme on Thu 05/02/2009 14:05:21

Title: dialog option-off-forever, I really mean FOREVER
Post by: Helme on Thu 05/02/2009 14:05:21
 ??? I'm really confused.

I want to turn of dialog options permanently. I used the command 'option-off-forever X' and it worked.
But it doesn't work for new dialogs, although I'm using the exact same command and I can't see typos.
In the new dialogs it runs the script as if I used 'option-off X'.
I don't get it...
Title: Re: dialog option-off-forever, I really mean FOREVER
Post by: Dualnames on Thu 05/02/2009 14:19:19
Try to place something like :
SetOptionState(X,eOptionOffForever);//X is the option

But make sure you indent it. Otherwise you'll be given an error.

Title: Re: dialog option-off-forever, I really mean FOREVER
Post by: Helme on Thu 05/02/2009 14:28:50
I know how i can fix this with a 'SetOptionState(X,eOptionOffForever)'-command

But i want to know why the simple way in the dialog script worked for the first 10 dialogs, but does not for the dialogs 10+, although I'm using the exact same command.
Title: Re: dialog option-off-forever, I really mean FOREVER
Post by: Dualnames on Thu 05/02/2009 14:56:13
I wasn't trying to be a smartass..sorry I sounded like one :). Wondering does using normal script fix the problem?
Title: Re: dialog option-off-forever, I really mean FOREVER
Post by: Helme on Thu 05/02/2009 15:05:39
I dodn't think you sounded like a smartass.

I got another idea, what might cause the problem:
The option I wanted to turn off with the dialog script has been activated with a command in the global script.
Does the global script 'option-on' overrule the dialog script 'option-off-forever'?

Title: Re: dialog option-off-forever, I really mean FOREVER
Post by: Dualnames on Thu 05/02/2009 15:11:39
According to the manual, at option-off-forever isn't overruled by absolutely anything. So it's really weird that that option of yours gets back from the dead.
Title: Re: dialog option-off-forever, I really mean FOREVER
Post by: Helme on Thu 05/02/2009 15:26:17
Quote from: Dualnames on Thu 05/02/2009 15:11:39
So it's really weird that that option of yours gets back from the dead.

I simply shouldn't make a game with zombies. Now the options also return from their graves ;)
Title: Re: dialog option-off-forever, I really mean FOREVER
Post by: Dualnames on Thu 05/02/2009 15:31:43
Quote from: Helme on Thu 05/02/2009 15:26:17
Quote from: Dualnames on Thu 05/02/2009 15:11:39
So it's really weird that that option of yours gets back from the dead.

I simply shouldn't make a game with zombies. Now the options also return from their graves ;)

Hahaha, well. Nothing really helpful apart from that workaround. Should really wait for the big guns to come.
Title: Re: dialog option-off-forever, I really mean FOREVER
Post by: Pumaman on Thu 05/02/2009 18:27:54
Can you upload something that demonstrates this problem?
Title: Re: dialog option-off-forever, I really mean FOREVER
Post by: Helme on Thu 05/02/2009 18:51:34
one example

- global script:

function cRep_Talk(){
if (dRep1.HasOptionBeenChosen(4))
{dRep1.SetOptionState(5, eOptionOn);}
else {dRep1.SetOptionState(5, eOptionOff);}
dRep1.Start();}

- dialogscript dRep1

@4
E: Bla
option-off-forever 4
option-on 5
return

@5
E: bla, bla
option-off-forever 5
return


When I start the dialog, it works fine. But when I stop the dialog and start it again @5 is back, @4 is gone.
To solve this problem, I added:

if (dRep1.HasOptionBeenChosen(5)){dRep1.SetOptionState(5, eOptionOff);}
if (dRep1.HasOptionBeenChosen(4)){dRep1.SetOptionState(4, eOptionOff);}
Title: Re: dialog option-off-forever, I really mean FOREVER
Post by: Pumaman on Thu 05/02/2009 22:10:56
Hmm, thanks for reporting this. It looks like 3.1.1 introduced this bug where option-off-forever is just being treated as a normal option-off command. I'll get this fixed ASAP.

EDIT: ok, this is now fixed in 3.1.2 R2, available from this thread:
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=36781.0

Please download this and verify whether it fixes the problem for you.
Title: Re: dialog option-off-forever, I really mean FOREVER
Post by: TheJBurger on Thu 05/02/2009 23:43:11
Sorry if this is irrelevant now, but I was also getting this problem, and I thought I was just doing something stupid. I would use option-off-forever, but it would only function as option-off, and the dialog option would reappear for any option-on commands.
Title: Re: dialog option-off-forever, I really mean FOREVER
Post by: Helme on Fri 06/02/2009 09:34:04
My global script file is melting down to an acceptable size. ;D

Thanks!