≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
dialogue - get lines of text from text file
Posted by:
(you are not logged in)
Enter the missing letter in: "Internation?l"
(you are not logged in)
Text:
[quote][b]blackwater[/b] wrote: I need to get help to understand how to load specific lines of dialouge from a text file. (and remember that I am a total javascript noob!). Yes, I've managed to load text from a file and show the whole text. BUT, I need to be able to choose specific lines. I could be satisfied for now with something easy, like this nr 1 example below. Or a more sophisticated version, see nr 2, below. 1) EASY VERSION Lets say the dialogue file looks something like this (but say it has 300 lines instead of 4, as below): Player: Excuse me, do you know the way to Simsilam Wizard: Oh yes, it's that way Player: Are you sure? Wizard: I'll show you Lets assume I only need line 3 "Are you sure?" to show up in a 2D dialogue box. And then the following line 4 in another 2D box - how to do this in a simple but usable way? I scanned the forum and found a really old entry from 2011. It seems to me that the text could be divided up with this example, but it gets me nowhere as I am not at programmer: [url]http://www.ambiera.com/forum.php?t=2077[/url] 2) MORE SOPHISTICATED Ideally, I would like to have something where you can choose answers and depending on your choice, you get a specific answer, like this: "Hi! Welcome to Coppercube! Is this your first visit?", responses: 1 "Yes, I just arrived" 2 "No, I've been here before" So, if you choose nr 2 you get: "Ok, cool, what have you learned so far?!" Or, if you select nr 1: "Interesting! How did you get here?" Etc. This javascript found on Github does these thigs, which would be awesome to have, perhaps it could be made into a behaviour for Coppercube? [url]https://github.com/scottbw/dialoguejs[/url] I was not able to install it via the windows command "DOS" window (it gives me errors) But the documentation sure on Github looks promising. If anybody feels like making this thing usable and more user friendly for CC, (or something similar) I would be much delighted! Also, i found this, which is interesting, but still I am not a programmer, so this is really a jungle for me to resolve: [url]https://gamedev.stackexchange.com/questions/54238/how-do-i-implement-branching-dialogue-in-javascript[/url][/quote]
Possible Codes
Feature
Code
Link
[url] www.example.com [/url]
Bold
[b]bold text[/b]
Image
[img]http://www.example.com/image.jpg[/img]
Quote
[quote]quoted text[/quote]
Code
[code]source code[/code]
Emoticons
Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact