Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
dialogues [2020/11/06 12:28] – [Events] admin | dialogues [2020/11/06 12:40] – [Load & Save] admin | ||
---|---|---|---|
Line 10: | Line 10: | ||
* (Un)lockable items | * (Un)lockable items | ||
* Crosslinking of items possible | * Crosslinking of items possible | ||
- | * Set question, answer or floating item display time - for fast-reaction games | + | * Question and Answer/ |
+ | * Display-Time and Timeout configuration | ||
* Design of dialogues & monologues with colloquist information | * Design of dialogues & monologues with colloquist information | ||
* Multilingual system easily definable | * Multilingual system easily definable | ||
Line 197: | Line 198: | ||
|Kind|Defines the kind of event. Supported types are: Text, Image, Audio, Video, Animation, Method, ObjProperty, | |Kind|Defines the kind of event. Supported types are: Text, Image, Audio, Video, Animation, Method, ObjProperty, | ||
|Trigger |Defines the moment of event execution. Supported types are: OnBegin, OnEnd, OnTimeout| | |Trigger |Defines the moment of event execution. Supported types are: OnBegin, OnEnd, OnTimeout| | ||
- | |Scope | A scope should be a component name or a dialogue item ident. Which value to be used depends on the kind of event. Use " | + | |Scope | A scope should be a component name or a dialogue item ident. Which value to be used depends on the kind of event. Use " |
|Data |Defines the multilingual data container. Use this property to define language specific texts, f.e. for displaying a text event.| | |Data |Defines the multilingual data container. Use this property to define language specific texts, f.e. for displaying a text event.| | ||
|Iterations |If the property is set to zero, functionality is disabled. Values larger than zero, perform iteration checks inside Execute() method. For example: Value=3, the event will be called only if the item was played back 3 times.| | |Iterations |If the property is set to zero, functionality is disabled. Values larger than zero, perform iteration checks inside Execute() method. For example: Value=3, the event will be called only if the item was played back 3 times.| | ||
Line 227: | Line 228: | ||
LEvent.Data.AddOrSetValue(' | LEvent.Data.AddOrSetValue(' | ||
LEvent.Data.AddOrSetValue(' | LEvent.Data.AddOrSetValue(' | ||
+ | </ | ||
+ | |||
+ | Example for adding generally available texts, by using " | ||
+ | <file pascal> | ||
+ | LEvent.Kind := TGorillaDialogueEventKind.Text; | ||
+ | LEvent.Data.AddOrSetValue(' | ||
</ | </ | ||
Line 238: | Line 245: | ||
LEvent.Parameters.AddOrSetValue(' | LEvent.Parameters.AddOrSetValue(' | ||
</ | </ | ||
+ | |||
+ | ===== Load & Save ===== | ||
+ | |||
+ | The dialogue system supports loading and storing conversations to file (*.dia; | ||
+ | The AssetsManager also supports this file format, so you can push those files to your game package. | ||
+ | |||
+ | <file pascal> | ||
+ | FDialogueSys := TGorillaDialogueSystem.Create(Self); | ||
+ | FDialogueSys.LoadFromFile(' | ||
+ | </ | ||
+ | |||
+ | To store your dialogue settings, simply call SaveToFile or SaveToStream. | ||
+ | |||
+ | <file pascal> | ||
+ | FDialogueSys.SaveToFile(' | ||
+ | </ | ||
+ | |||
+ | Next step: [[skillsystem|SkillSystem]] |