Dialogue System Template (Templates)

Discuss Scirra's 2D Asset Store

Post » Tue Dec 08, 2015 9:32 am

Hey thanks @Magistross,

how about if i want to make the typewriter effect gone and just display the text at the same time
or speed up the typerwritter effect if the player is holding down the mouse button?
B
6
Posts: 43
Reputation: 342

Post » Tue Dec 08, 2015 4:42 pm

@desasteraang To disable the typewriter effect, you can change the DIALOGUE_DEFAULTDELAY constant to 0. This will effectively make all text to appear instantly (everything processed in a single tick). However, you will have to get your hands a bit dirty in the code to implement a text speed up function.

First, create a function under the "DialogueSystem" event group named to something like "Dialogue_SetSequenceCharDelay". This function should receive an optional time parameter (in milliseconds), and use this parameter to set the variable "Dialogue_SequenceCharDelay" to its value, or revert to the default value if no parameter is provided. Like this :
Image

Next, if you want the text to "typewrite" faster when you hold the left mouse button, you could do something like this :
Image

Let me know if I was too cryptic in my explanation. ;)
B
51
S
19
G
19
Posts: 860
Reputation: 14,653

Post » Wed Dec 09, 2015 9:25 am

haha thanks a lot @Magistross...very good explanaition... :P ..

one more question, are there any ways to make the dialogue to appear using fade in effects?

oh and btw why is my dialogue not showing up?
Image
Image
B
6
Posts: 43
Reputation: 342

Post » Wed Dec 09, 2015 9:11 pm

I believe you are loading the Dictionary and not a single dialogue array, so you should use Call "Dialogue_StartDialogue" ("DictionaryKey") to call the correct dialogue.

You could indeed add a fade in effect, but once again, you might have to adapt the code a bit, depending on how you want the fade to behave. The simplest would be to add a fade in behavior to the 9-patch (window), SpriteFont and portait sprite, and be done with it. However, it might not quite be what you want. You could set the behavior disabled on start, and enable it conditionally on object creation. You could also delay the "typewriting" to occur by setting the "Dialogue_Timer" to an arbitrary value (most likely the fade in duration in ms) instead of 0 in the "Dialogue_StartSequence" function (event 10).

Don't be afraid to experiment, the system should be robust enough to work even though you fiddle a bit with it. ;)
B
51
S
19
G
19
Posts: 860
Reputation: 14,653

Post » Thu Dec 10, 2015 10:43 am

ah..i didnt notice that i used dictionary instead of dialogue...now its seems to be working fine....
thanks a lot @Magistross
B
6
Posts: 43
Reputation: 342

Post » Mon Dec 28, 2015 6:57 am

Hi again @Magistross....

i have this problem about your dialogue template...
in my project i have many layout right....when i first started using your template on layout 1 everything seems to be fine...
but when i tried to do it in layout 2 the text wont load...
i tried the using the text on layout one and its working just fine..
what could be the problem ?
B
6
Posts: 43
Reputation: 342

Post » Sun Jan 03, 2016 11:41 pm

Sorry for the delay, I was away quite a while on a holiday.

The first thing that comes to mind is the Layer. The system create objects on the "HUD" layout by default. If it doesn't exist, it won't create anything. You can either change the constant "DIALOGUE_LAYER" to an existing layer name or add a new empty "HUD" layer.

Let me know if this helped !
B
51
S
19
G
19
Posts: 860
Reputation: 14,653

Post » Thu Feb 18, 2016 1:55 pm

hey there @magistross !

Im having some problems with the "setvalue" command.

First, if I use {setvalue:key,1,+} in the middle of a dialogue it works.
BUT if I use the command at the very start of a dialogue it runs multiple times. (sets +1 3x before going to the actual text)
what im doing for this to not happen is place a period before the command. this way it runs the period(text), than the command than back to the text again.

another thing is I cant get the setvaleu to work as a SET. tried using:
{setvalue:key,1,}
and
{setvalue:key,1}

both cases the system just ignores this command and doesnt do anything.

ideas?
Image
B
18
S
5
G
2
Posts: 60
Reputation: 1,575

Post » Thu Feb 18, 2016 2:31 pm

Hi there @fremachuca!

Interesting, I thought I thoroughly tested this command, seems I was wrong! I will troubleshoot when I get time and come up with a fix and explanation as soon as I can. Stay tuned!

edit: Seems like it was an error of implementation instead of an error in the template. I did not receive more feedback from @fremachuca so for the time being I'll assume no fix is necessary.
B
51
S
19
G
19
Posts: 860
Reputation: 14,653

Post » Thu Mar 31, 2016 2:26 am

Hi @magistross.

Great plugin! So I got it up and running but I can't see the WindowFrame. Debug tells me it's being created but it's not in my view. I have it on the HUD layer (parallax set to 0,0). Do I have to set the x,y of the window frame anywhere?

Just for reference, here is how I'm calling the dialogue Image
B
34
S
10
G
1
Posts: 252
Reputation: 2,948

PreviousNext

Return to Scirra Store

Who is online

Users browsing this forum: No registered users and 2 guests