Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Is there a way to make text appear as RPG games?

Hello everyone,

I am new to Twine.

I wonder if there is a way to print text like old school RPG games letter by letter?

Thank you :)

Comments

  • Hello Dorgam
    Yes. There is.

    What format are you using?
  • edited June 2015
    There are several ways to do it, though the most robust way is probably the specific GreenSock plugin designed for this, which works best in SugarCube for Twine 1.4.2 (to my knowledge the only story format that can reliably use GreenSock animation due to its user library feature).

    https://greensock.com/TextPlugin

    Other story formats do have their little Javascript macros you can write into your story to achieve the effect but GreenSock gives many more options.

    To do this you create a userlibrary.js file in the SugarCube targets directory that contains the GreenSock source javascript library, then put the text you want typed out inside a <<script>> <</script>> macro containing the inline GreenSock code.



    For something a little less robust but much simpler to use, you can use Leon's typewriter Javascript for SugarCane/SugarCube: https://www.glorioustrainwrecks.com/node/5161
  • There's also Typed.js (a jQuery plugin), which can simply be pasted into the Story JavaScript (so should work for all Twine 2 story formats).

    Claretta wrote: »
    To do this you create a userlibrary.js file […]
    Small, but important, correction. The user library file is actually named userlib.js.
  • There's also Typed.js (a jQuery plugin), which can simply be pasted into the Story JavaScript (so should work for all Twine 2 story formats).
    @TheMadExile, would you be so kind as to attach for us an example HTML file with this and the flashing cursor using SugarCube and, if different, Harlowe? I'd appreciate it. :-)
  • Well, I've already written a Typed.js integration module for SugarCube for someone else (which is the only reason I knew about it; it's on SugarCube's website), so I'm just going to reuse that here. The module's purpose is to make using Typed.js easy. It's a fairly simply module, so it shouldn't be too difficult to port to Harlowe, though without the display hooks SugarCube offers it will require some additional setup.

    The CSS is identical and the actual usage is similar, though the SugarCube module triggers on a specific class and the Harlowe module triggers on a specific hook (since I figured the hook would be more idiomatic).

    I've attached an archive for SugarCube 2 and the Harlowe 1.1 beta (1.0.1 is too busted for me to bother with). Assuming that Twine 2 has decided to allow me to save my work today, hopefully, they include everything you should need: Typed.js, the integration module, styles, a demo, and instructions.
  • I've attached an archive for SugarCube 2 and the Harlowe 1.1 beta (1.0.1 is too busted for me to bother with). Assuming that Twine 2 has decided to allow me to save my work today, hopefully, they include everything you should need: Typed.js, the integration module, styles, a demo, and instructions.

    Wow, TME! Thanks a lot! :-D

  • @TheMadExile, THANK YOU SO MUCH!!! Wow!! This is SO helpful!
  • Welcome. Let me know if you have any issues.
  • @TheMadExile, THANK YOU, it took this newbie a while to figure out to *import* the story you posted but he got there... many thanks.
  • Also wanted to add my thanks for this, it's awesome.
  • I've attached an archive for SugarCube 2 and the Harlowe 1.1 beta (1.0.1 is too busted for me to bother with). Assuming that Twine 2 has decided to allow me to save my work today, hopefully, they include everything you should need: Typed.js, the integration module, styles, a demo, and instructions.
    TheMadExile,

    I found your post while looking for a way to achieve the same "words-typing-themselves-out" effect that Dorgam describes-- and judging by the comments of the people before me, it must've been a great solution-- but when I attempted to download your Harlowe archive, it just took me to this, which I'm assuming has been partially devoured by the forum software or something since you posted it. Would you happen to have another copy of the archive on hand-- and would the contents work with Harlowe 1.2.2, or would they need significant modification first?

    Thanks!

  • edited July 2016
    This is fantastic! Thanks a billion!
  • Is there any way to make the speed less than one millisecond? To make the text 'type' really, really fast?
  • edited July 2016
    Wraithling wrote: »
    […] but when I attempted to download your Harlowe archive, it just took me to this, which I'm assuming has been partially devoured by the forum software or something since you posted it. […]
    You need to right click on it and save as/save link as—the forum software doesn't give you a proper download if you just click on it.
    Wraithling wrote: »
    […] and would the contents work with Harlowe 1.2.2, or would they need significant modification first?
    It should work in every version of Harlowe, save possibly the very first. However, to put your fears at rest, I just tested it in Harlowe 1.2.2 and it works fine.
  • Ah, shoot. No wonder it wasn't working right for me. Thanks!
  • Wraithling wrote: »
    […] but when I attempted to download your Harlowe archive, it just took me to this, which I'm assuming has been partially devoured by the forum software or something since you posted it. […]
    You need to right click on it and save as/save link as—the forum software doesn't give you a proper download if you just click on it.

    Much appreciated. Realizing I was supposed to save and then import the files as stories has really broadened what I can do with Twine, thanks to helpful folks like yourself and others posting code on the forums!
  • ElWongo2 wrote: »
    Is there any way to make the speed less than one millisecond?
    No.
Sign In or Register to comment.