Sure, I'll try to explain my process :) long post incoming!
I'm using the chat contraption as a phone text app. Whenever the player clicks "next", a new message appears. That's cool! but I want my player to manually send the new messages on the right only. I want the messages on the left to appear on their own after a delay.
So I have a chat contraption called "chat1" and its corresponding button called "next". I added some lines in the "next" button script so that stuff happen. I'm sure there's a more compact way of doing this, but it works so I'm not complaining!
on click do play["click"] # show next chat chat1.next[] # add 1 to the counter (stored in slider) progress.value: progress.value+1 # trigger the slider's "change" event progress.event["change" progress.value] view[] end
As you can see in the button's script, I also have a slider called "progress". It starts at 0 and its Max is 17 (16 being the total number of messages in my chat contraption). You might want the slider be invisible in the final project (Widgets>Show None, & also Widgets>Locked, while you're at it).
My slider's script looks like this:
on change val do # call a "boop" event whenever the slider's "change" event is triggered scenePrologue.event["boop"] end
I created a new event, "boop", that I use in the card level script to check on the phone conversation progress. "scenePrologue" is the current card's name. I'm not gonna show the whole card's script but I use something like this:
on boop do # check for chat convo completion if progress.value~1 # increase value to avoid getting stuck in a loop progress.value: progress.value+1 # pause to make the text message more realistic sleep[80] # show next chat chat1.next[] elseif ... ...
From there on, I had to match the slider's counter and the number of messages in my conversation so that all the messages on the left appear on their own after a delay, just like magic! :)
Of course you can use the counter to do something more than just revealing the next chat messages. You can use it to trigger a dialog for example, or to go to the next scene, just like this:
... elseif progress.value~16 progress.value: progress.value+1 # fire next sequence eval[dialogStorage.widgets.script2.text () 1] pt.setup[deck sceneCafe "!show saya neutral offleft" ] go[sceneCafe "BoxIn"] ...
(if anything is unclear please don't hesitate to ask more questions.)