How do I time dialogue text fade out

Get help using Construct 2

Post » Fri Jun 13, 2014 10:55 am

Dear all,

I have been working on game dialogue (non-interactive, i.e. the player gets no choice in how to respond).

The way I have been working so far is by creating a separate invisible object (Stgwhsp, as in stage whisperer) that caries the necessary variables (which dialogue to fire off, where to place the text object etc). This allows me to call dialogue between characters, as well as banter between player 1 and two, as they overlap with the "Stghsp" object.

Here's the question though. I would like for the banter to fade out on its own. The player won't have time to manually further the dialogue, as the game doesn't stop for banter, only for "cinematic" dialogue sections.

So, I'm familiar with the fade behaviour, but I would like for short text ("hey you!") to fade out faster than long text ("When I was a boy, my dad used to say: "Hold ma drink boay!").

Idea:

Have the words/characters in the text object counted and set text object's fade out to a lenght of time it would take to read each word/character.

Any ideas how to do this / alternative approach?

Thanks!
B
7
S
2
Posts: 51
Reputation: 627

Post » Fri Jun 13, 2014 12:12 pm

Use a Instance Variable on the TEXT Objects and then for each time the TEXT is updated make the variable update to the TEXT character width

then in the next action set the fade length of the TEXT to the number of seconds you need to read a character multiplied by the Instance Variable length

or maybe simpler by just taking out the instance Variable and directing setting the Fade length to the TEXT character length
:)
When in doubt..or you are lost in a Zombie apocalypse or someone is giving you a hard time..Remember one thing..... Read the Construct 2 Manual..it will save your life.:)
B
35
S
13
G
8
Posts: 318
Reputation: 7,685

Post » Fri Jun 13, 2014 12:20 pm

Quick response, simple, effective, sausage!

You have earned the position of my favourite person for the next hour sir. Thank you!
B
7
S
2
Posts: 51
Reputation: 627

Post » Fri Jun 13, 2014 12:36 pm

No worries....:) did it work? glad to help out if so...:D
When in doubt..or you are lost in a Zombie apocalypse or someone is giving you a hard time..Remember one thing..... Read the Construct 2 Manual..it will save your life.:)
B
35
S
13
G
8
Posts: 318
Reputation: 7,685


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 7 guests