ooh, can you explain more about how you set up that chat contraption adaptation?
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.)
In my case I don't have a "prev" button, so I didn't do anything specific to make that happen, but yeah that's definitely something you have to take into account if you want a "prev" button.
For now I have a "reset" button with a very simple script to manually set the slider to 0 whenever I want, while I'm still figuring out how to add more stuff. I don't know yet how I'm gonna replace that in the final project! :p
In context the approach you describe may offer more flexibility, but I'd like to point out for beginners that they could achieve a similar effect without creating any additional widgets by giving the "Next" button a script something like
on click do
play["click"]
chat1.next[]
sleep[80]
play["bloop"]
chat1.next[]
view[]
end
In general, straight-line code with some sleep[]s in the middle is a very powerful way of writing simple cutscenes.