![]() |
PowerQuest 0.20.6
|
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 scripts included here:
Public Member Functions | |
| IEnumerator | OnStart () |
| Blocking script called when the dialog first starts. | |
| IEnumerator | OnStop () |
| Blocking script called when the dialog is stopped. | |
| IEnumerator | Option (IDialogOption option) |
Blocking script called when a dialog option is clicked. Options are named with their id. eg: OptionSayHi() or Option4 | |
| IDialogOption | Option (int id) |
Access to option with specified id. Eg: Option(3).On();. This example in the QuestScript editor is simplified to O.3.On(); | |
| IDialogOption | Option (string id) |
Access to option with specified id. Eg: Option("NiceHat").On(); This example in the QuestScript editor is simplified to O.NiceHat.On(); | |
| void | OptionOn (params int[] id) |
Turns on one or more options. Eg: D.ChatWithBarney.OptionOn(1,2,3); | |
| void | OptionOff (params int[] id) |
Turns off one or more options. Eg: D.ChatWithBarney.OptionOff(1,2,3); | |
| void | OptionOffForever (params int[] id) |
Turns one or more options off permanantly. Future OptionOn calls will be ignored. Eg: D.ChatWithBarney.OptionOffForever(1,2,3); | |
| void | OptionOn (params string[] id) |
Turns on one or more options. Eg: D.ChatWithBarney.OptionOn("Yes","No","Maybe"); | |
| void | OptionOff (params string[] id) |
Turns off one or more options. Eg: D.ChatWithBarney.OptionOff("Yes","No","Maybe"); | |
| void | OptionOffForever (params string[] id) |
Turns one or more options off permanantly. Future OptionOn calls will be ignored. Eg: D.ChatWithBarney.OptionOffForever("Yes","No","Maybe"); | |
| void | Goto (IDialogTree dialog) |
Changes the active dialog tree to the new one specified. Useful for switching to a sub-tree. Eg: Goto(D.AskAboutQuests);. | |
| void | GotoPrevious () |
| Changes the active dialog tree back to the previous one. Useful for returning from a sub-tree. | |
| void | Stop () |
| Stops the active dialog tree and returns the player to the game. | |
Public Attributes | |
| bool | FirstTimeShown |
| True the first time the dialog tree is shown (or if its never been shown). | |
| int | TimesShown |
| The number of times the dialog tree has been shown. | |
| bool FirstTimeShown |
True the first time the dialog tree is shown (or if its never been shown).
| int TimesShown |
The number of times the dialog tree has been shown.
| IEnumerator OnStart | ( | ) |
Blocking script called when the dialog first starts.
| IEnumerator OnStop | ( | ) |
Blocking script called when the dialog is stopped.
| IEnumerator Option | ( | IDialogOption | option | ) |
Blocking script called when a dialog option is clicked. Options are named with their id. eg: OptionSayHi() or Option4
| IDialogOption Option | ( | int | id | ) |
Access to option with specified id. Eg: Option(3).On();. This example in the QuestScript editor is simplified to O.3.On();
| IDialogOption Option | ( | string | id | ) |
Access to option with specified id. Eg: Option("NiceHat").On(); This example in the QuestScript editor is simplified to O.NiceHat.On();
| void OptionOn | ( | params int[] | id | ) |
Turns on one or more options. Eg: D.ChatWithBarney.OptionOn(1,2,3);
| void OptionOff | ( | params int[] | id | ) |
Turns off one or more options. Eg: D.ChatWithBarney.OptionOff(1,2,3);
| void OptionOffForever | ( | params int[] | id | ) |
Turns one or more options off permanantly. Future OptionOn calls will be ignored. Eg: D.ChatWithBarney.OptionOffForever(1,2,3);
| void OptionOn | ( | params string[] | id | ) |
Turns on one or more options. Eg: D.ChatWithBarney.OptionOn("Yes","No","Maybe");
| void OptionOff | ( | params string[] | id | ) |
Turns off one or more options. Eg: D.ChatWithBarney.OptionOff("Yes","No","Maybe");
| void OptionOffForever | ( | params string[] | id | ) |
Turns one or more options off permanantly. Future OptionOn calls will be ignored. Eg: D.ChatWithBarney.OptionOffForever("Yes","No","Maybe");
| void Goto | ( | IDialogTree | dialog | ) |
Changes the active dialog tree to the new one specified. Useful for switching to a sub-tree. Eg: Goto(D.AskAboutQuests);.
| void GotoPrevious | ( | ) |
| void Stop | ( | ) |
Stops the active dialog tree and returns the player to the game.