How do I delay part of the text in a gamebook game

Like, what i want to do is have a section of text show up then i want it to wait a bit before showing the rest of the text,

like here's and example,
lets say this is paragraph
number one, so i want
this to show up and then

(i want there to be a delay before it shows paragraph two)

And after that delay,
paragraph two, represented
by this text, will show,
so how do i do this?


msg ("This is paragraph one.")
SetTimeout (6) {
}
msg ("This is paragraph two.")

Breakdown:

Click 'room' tab on the room you want to run the script.
Change 'Text' to 'Run script'
Click 'Add new script' then 'Print'
Write your first paragraph
Click 'Add new script' and scroll down to the bottom where the timers are. Choose 'Run script after a number of seconds'
Set your desired time
Repeat steps 3 to 6 for subsequent paragraphs

OurJud, great tutorial!


Thanks, Deckrect. It's because I'm able to wholly sympathise when people don't know how to do things. If I know the answer to a question on here (which is rare) I like to explain it in the way I'd like others to explain any question I have.


Ourjud, its a gamebook so there is no "room" tab


Oh, I see. Missed that detail in the title. Many apologies.


Dammit. I really need this to work.
The only other option is downloading three seconds of silence and then using that as a sound between the two text parts.
But that method doesn't work when you've got a sound that you want to be playing over all.

There needs to be a 'wait' scripting tool in the next update.


I have not used game book much at all, but I think there is a script that runs when the page is loaded (and I seem to remember it was not obvious where to find it). You can put the code there.

msg ("This is paragraph one.")
SetTimeout (6) {
  msg ("This is paragraph two.")
}

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums