Sequential text messages fading in/out PLUS Random Number Generation

I am trying to have 5 text messages fade in/out sequentially and reliably without overlap where the timing of the visibility can be finely controlled - sort of like a one-side conversation:

text 1 fades 1
text 1 fades out
text 2 fades in
text 2 fades out
text 3 fades in

Any hints would be very greatly appreciated …

1 Like

There might be some Clues in this .
I know it is not fading In and if you do not want to use the Wake timer there are other strategies . It depends if you want the whole show to repeat or run once .

Get back if you do not find anything in there .

To trigger it Toggle the AOD


Hello russellcresser - thanks so much as always for the quick reply. Let me dig into this but many thanks in advance…

1 Like

Hi again - yes, this is a good sample and I should play with this one a little to see if I can make this work. I think I can get the fade in to work. Basically this text sentence sequence only should repeat once per wake cycle.

One question I had: on an expression like:


Is there a quick way to calculate how long this transition takes in real world seconds?

And 2 more - can the text component have like a typewriter effect and can I have for each of the sentences (say 5) a set of 3 text options for each respective sentence which are selected at random?


Text 1 array (sentence 1, sentence 2, sentence 3)
[ > The sentence is chosen at random from the 3 options ]

Text 1 is displayed.

Text 2 array (sentence 1, sentence 2, sentence 3)
[ > The sentence is chosen at random from the 3 options ]

Text 2 is displayed.

Thanks again in advance and my apologies for the many questions!

1 Like

So, the answer to the second question is in that test . Random selection on wake . Have another look .


With #DWE# forget the *50. that might just make it faster .

#DWE# counts in milliseconds .

So simply if DWE > 3 do action

I would help with a test I cannon do this stuff in English.

Sorry I missed the random bit in there since nothing random shows up when toggling the AOD mode - only the 2 texts and the fade. Maybe I am missing something…

1 Like

No I hid them to avoid confusion .
Here is another test .
It is more about fading Sequences which we can not do on the Layer as Sequence will not work with opacity .
The important stuff is the fades we will use the same strategy as the sequences to bring the text on stage .

My apologies - looking carefully always helps - of course the random bits can’t be visible if they are hidden :wink: Let me play with this one a little more and thank you again…

1 Like

hey Listen . Here is another WIP . Bit of a mess . I have to go to bed . if you don’t get it I will add some more tomorrow . Note times are in 1/100 seconds . the timing I normally work to so 300 is 3 seconds . Saves mucking about with decimal .you will se I have done a % on DWE to give us an element to repeat for the fade .

Remember you have to run the time machine and toggle AOD to get the trigger.

1 Like

Thank you so much - and my apologies for keeping you up that late… Will check :wink:

1 Like

No you did not keep me up. I just have to shut the laptop down at some stage.
You will see that I put different bits of code in different Tag Boxes. When it is all working it is possible to intergrate it into fewer layers. It is good for Debugging but can lend to confusion .
Once you get a couple of stages going it is just a matter of repeating it.
Sorry it is all a bit glitchy at the moment. We can look at the limits things and tweak them to smooth things out.

OK, very cool stuff. Now, coming back to your 1st idea about 3 or more texts appearing in sequence one after another and fading in and out. I would use #DWE# for this. So it will work or start upon wake.

So, say you let each text appear for 2 seconds, then the 1st text you would want if #DWE# < 2, second text when #DWE# is between 2nd and 4th second and the 3rd text would be appearing between 4th and the 6th second.

For the fade-in/fade-out you can use:(50*(sin(((#DWE#)*2))))

So, the 3 texts have the following opacity:

text 1: $#DWE#<2?(50*(sin(((#DWE#)*2)))):0$
text 2: $#DWE#>2&&#DWE#<4?(50*(sin(((#DWE#-2)*2)))):0$
text 3: $#DWE#>4&&#DWE#<6?(50*(sin(((#DWE#-4)*2)))):0$

For text 2 and 3 you have to subtract the elapsed seconds, otherwise the fade-in will not start at opacity 0. Hope that all makes sense…


Hello tom.vannes. Thanks so much for contributing to this thread. Very clean coding solution and very modular - this is very helpful and insightful!


Right now this snippet fade in and out beautifully by itself. Now can this be changed to:

fade in > stay 2 seconds > fade out

so it works in tandem with russellcresser random picking of a sentence in his WIP above?

1 Like

not so easy… I have to think about that…probably will not work with sinus
you could of course make 3 objects out of each one, as in

object 1A fade in for 1s
object 1B (same object as above) but opacity 100, for 1s to 3rd second
object 1C fade out after 3rd seconds

1 Like

I went over this one more time and simple on/off transitions would be fine which will I hope simplify things - so that we would have:

text1: $#DWE#>4?0:100$
text 2: $#DWE#>4&&#DWE#<8?100:0$
text 3: $#DWE#>8&&#DWE#<12?100:0$

russellcresser random code on text1 works well on the 1st sentence under each path.

Now I wonder if we can have more or less 3 different paths/buckets with the code $wakeRand()?

Path 1:
sentence 1, sentence 2, sentence 3

Path 2:
sentence 4, sentence 5, sentence 6

Path 3:
sentence 7, sentence 8, sentence 9

Is there something similar to storing a #VAR_1# ( #VAR_2#, #VAR_3#) value somewhere that sets the correct path to down (1, 2 or 3)?

$wakeRand(0,2) takes care of the 1st sentence pairs (s1, s4, s7) under each path - now is there a way to use $wakeRand() to target only each of the 2nd sentence pairs (s2, s5, s8) or respectively 3rd sentence pairs (s3, s6, s9) under each path?

I am not even sure if this is possible at all - it stretches things quite far…

Thanks for bearing with me here…


Sadly there is no way to store a VAR Value any wher apart frm itself.
At Tom has pointed out. If you want the item to Dwell for a while you have to split things up. I can only play with the WIP test. Keep an eye on it.

1 Like

wow. you made my day

1 Like

Yes, this might be a little of a stretch for what is possible - there might be other ways to go about this and just stay within a single random 1st set as you had set up…

1 Like

@timeasart I have done a bit more work on that WIP Test . Sorry but I know of No Other way to do this job . There are a few on the Community who can Improve on this . I hope you find something useful in there .