PowerQuest  0.10.2
DialogScript Class Reference

Detailed Description

Each Dialog Tree you create will have its own Dialog Tree class and script file. These are created automatically with the name appended, eg: DialogChatWithBarney.cs.

There are some extra helpful functions you can use in these dialog functions:

  • OptionOn( string optionName ) - Enables the specified option in the active dialog tree
  • OptionOff( string optionName ) - Disables the specified option in the active dialog tree
  • OptionOffForever( string optionName ) - Disables the option, it won't be turned on again even if OptionOn is called for it again
  • Stop() - Stops the dialog

Inherits DialogTreeScript< T >.

Public Member Functions

IEnumerator OnStart ()
 Blocking script called when the dialog first starts. More...
 
IEnumerator OnStop ()
 Blocking script called when the dialog is stopped. More...
 
IEnumerator Option (IDialogOption option)
 Blocking script called when a dialog option is clicked. Options are named with their id. eg: OptionSayHi() or Option4 More...
 
- Public Member Functions inherited from DialogTreeScript< T >
void OptionOn (int id)
 
void OptionOff (int id)
 
void OptionOffForever (int id)
 
void OptionOn (string id)
 
void OptionOff (string id)
 
void OptionOffForever (string id)
 

Additional Inherited Members

- Properties inherited from DialogTreeScript< T >
static T Script [get]
 
- Properties inherited from QuestScript
static IPowerQuest E [get]
 
static ICursor Cursor [get]
 
static ICamera Camera [get]
 
static QuestSettings Settings [get]
 
static GlobalScript Globals [get]
 Access to the global script. Use this to access game state from different room/character/etc scripts. More...
 
- Protected Member Functions inherited from DialogTreeScript< T >
void Stop ()
 
- Static Protected Member Functions inherited from QuestScript
static IHotspot Hotspot (string name)
 Get a hotspot in the current room. Shortcut to as R.Current.GetHotspot(...) More...
 
static IProp Prop (string name)
 Get a prop in the current room. Shortcut to as R.Current.GetProp(...) More...
 
static IRegion Region (string name)
 Get a region in the current room. Shortcut to as R.Current.GetRegion(...) More...
 
static Vector2 Point (string name)
 Get a point in the current room. Shortcut to as R.Current.GetPoint(...) More...
 

Member Function Documentation

◆ OnStart()

IEnumerator OnStart ( )

Blocking script called when the dialog first starts.

◆ OnStop()

IEnumerator OnStop ( )

Blocking script called when the dialog is stopped.

◆ Option()

IEnumerator Option ( IDialogOption  option)

Blocking script called when a dialog option is clicked. Options are named with their id. eg: OptionSayHi() or Option4