Dialogue System Template (Templates)

Discuss Scirra's 2D Asset Store

Post » Fri Jun 24, 2016 4:52 am

The fork expression evaluation is done through a javascript eval() call, so you must use a proper javascript syntax. Equality operator in javascript is "==", so you should go with {fork:{#hasappointment}==1,12,11}. If you ever tried to do equality comparison with strings, things would be a bit more complicated, but still feasible : {fork:'{#hasappointment}'=='yes',12,11}. Notice the quotes around the variable expression and around the "yes", they are mandatory otherwise the eval() function will think those strings are javascript variables, and crash. :o Note that double quotes would work too.

I thought about adding a command like "goto sequence 2", but somehow never went with it. It's fairly simple though, it's basically the fork command all over again but with no evaluation, and only one possible "path". You can even do it with the fork command as it is. Something like {fork:1,2} would jump back to sequence 2. Or {fork:1,"dialogue2"} would start the "dialogue2" dialogue from the dictionary. The "1" there is basically an "always true" condition, thus no "else" part is necessary.

Hopefully my answers will help you continue your awesome game! :P
Last edited by Magistross on Mon Jul 18, 2016 3:39 pm, edited 2 times in total.
B
65
S
27
G
24
Posts: 960
Reputation: 18,505

Post » Fri Jun 24, 2016 5:42 am

Perfect! Thanks again for a prompt reply!
B
14
S
5
G
6
Posts: 64
Reputation: 4,243

Post » Mon Jul 18, 2016 8:39 am

I tested the demo,it is not well supported Japanese Charaters.
B
4
S
1
Posts: 2
Reputation: 304

Post » Mon Jul 18, 2016 3:16 pm

bps1945 wrote:I tested the demo,it is not well supported Japanese Charaters.
Indeed, the demo only support a limited character range. However, the SpriteFont that is used to display the text can be modified to support any character. This little program made by blackhornet should come in handy when creating a new spritefont out of japanese characters (or any character for that matter).
B
65
S
27
G
24
Posts: 960
Reputation: 18,505

Post » Thu Jul 21, 2016 2:20 pm

Message: bps1945 can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Magistross wrote:
bps1945 wrote:I tested the demo,it is not well supported Japanese Charaters.
Indeed, the demo only support a limited character range. However, the SpriteFont that is used to display the text can be modified to support any character. This little https://www.scirra.com/forum/sprite-font-generator-v2_t86546 program made by blackhornet should come in handy when creating a new spritefont out of japanese characters (or any character for that matter).

Thank you for your reply.
B
4
S
1
Posts: 2
Reputation: 304

Post » Sun Sep 04, 2016 8:02 am

Hey- I still have this working great in my game project- but I started using it in a new game project and set it up the same way.

For some reason it loads a segment of the dialog and freezes- any idea what might cause this? I used the examples given as well and the same thing happens- It loads the first bit and stops / freezes.

Image

Image
B
14
S
5
G
6
Posts: 64
Reputation: 4,243

Post » Sun Sep 04, 2016 8:13 am

I figured it out- I put it in a spot that kept calling it so it was opening multiple instances on itself
B
14
S
5
G
6
Posts: 64
Reputation: 4,243

Post » Tue Sep 06, 2016 5:18 pm

Classic mistake! It's easy to overlook the source of the problem and search in vain elsewhere. However, the system was doing what it was told to do, which was what was wrong in the first place. Goob job on finding it so quickly!

How is your sci-fi game doing? I hope you're still motivated to finish it, it looked really promising! ;)
B
65
S
27
G
24
Posts: 960
Reputation: 18,505

Post » Wed Sep 07, 2016 8:55 am

Hey @Magistross great plugin!

Took me a lot of time to figure this out but finally feels like I'm getting it to work. I have one big question.

When creating the dialogues with your Utility my logic tells me I should save the whole thing as a JSON file but it doesnt work. However if I press on Download Dictionary it does work.

Problem im finding is I can't set the portraits to display. I created new sprites for the portrait and named them. Then used the same name in your utility and it wont load them. Is this the correct way to do it? If so why isnt it working?

Thank you

EDIT: Fixed protraits. Found out I just have to add it to the animation frame. Not a new sprite.
B
14
S
5
Posts: 248
Reputation: 1,705

Post » Wed Sep 07, 2016 1:25 pm

Great that you figured it out. Do you still have trouble with the saving functionality? "Download dictionary" is actually the way to go, unless you want to download a single dialogue for a particular need.

I remember having trouble downloading with Internet Explorer, the "Save as JSON" did not work properly on some older version. Could it be what's happening?
B
65
S
27
G
24
Posts: 960
Reputation: 18,505

PreviousNext

Return to Scirra Store

Who is online

Users browsing this forum: No registered users and 1 guest