spacer graphic
spacer graphic
Montage of games AGS Logo
spacer graphic

 

spacer graphic
Menu
spacer graphic Home
About
News
Features
Download AGS
spacer graphic Games 
Games main page
Award Winners
Picks of the month
Short games
Medium length games
Full length games
In Production
Hints & Tips
Community
Forums
AGSers World Map
Member websites
Chat
Resources
Tutorials
FAQ
Knowledge Base
Downloads
Links
AGS-related links
* AGS Manual
  * Scripting
    * Dialog functions and properties

SetOptionState (dialog)

(Formerly known as global function SetDialogOption, which is now obsolete)

Dialog.SetOptionState(int option, DialogOptionState)
Changes whether an option in a conversation is available to the player or not. This allows you to add extra options to a conversation once the player has done certain things.

OPTION is the option number within the topic, from 1 to whatever the highest option is for that topic.

The DialogOptionState controls what happens to this option. It can have the following values:

eOptionOff
  The option is disabled - the player will not see it
eOptionOn
  The option is enabled - the player can now see and use it
eOptionOffForever
  The option is permanently disabled - no other command can ever turn
  it back on again.
These are equivalent to the option-off, option-on, and option-off-forever dialog commands.

Example:

if (GetGlobalInt(10)==1)
    dialog[4].SetOptionState(2, eOptionOn);
will enable option 2 of topic number 4 if the Global Integer 10 is 1.

See Also: Dialog.GetOptionState, Dialog.Start, StopDialog


User comments and notes
There are currently no user comments on this page.
The user comment facility is currently disabled.