Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Racoon on Wed 11/12/2019 23:56:30

Title: How to use Typewriter Module
Post by: Racoon on Wed 11/12/2019 23:56:30
Hey there,

I would really like to use Phemars Typewriter Module (https://www.adventuregamestudio.co.uk/forums/index.php?topic=48093.0).
I downloaded it and imported the script. But how do I use it in my game now?

Thanks for any help.
Title: Re: How to use Typewriter Module
Post by: Slasher on Thu 12/12/2019 06:43:06
I used this a few years ago... It worked....

After importing the module

Example
Code (ags) Select

function room_AfterFadeIn()
{
  //TYPEWRITER INTRO... // ADD SOUND to play at the end of the string like aTypewriter like: Typewriter.Type(20, 36, 2,65529, text, eTypewriter_Constant,aTypewriter);

  // FIRST TEXT SHOW
  String text = "It is said, in ancient Mayan culture, that evil comes from within the heart of man himself. ";
  text = text.Append ("[[A Mestaclocan is an evil free roaming spirit cursed by Hunhau. ");  //Don't forget to add a space at the end of the line
  text = text.Append ("[[A Mestaclocan can absorb and become any object, animal or person. ");
  Typewriter.Type(20, 36, 2,65529, text, eTypewriter_Constant);
 
     // FIRST TEXT DISSAPEAR
  Wait(100);
  String text2 = "Add Text here if required";
  Typewriter.Type(20, 36, 2,65529, text2, eTypewriter_Constant);

}

Title: Re: How to use Typewriter Module
Post by: Racoon on Mon 30/12/2019 20:23:28
Oh man, I totally forgot to reply. Thanks Slasher, it works just fine!

If somebody is reading this by any chance, I have another question:

I don't want to use the talk cursor in the game. I set "StandardMode" to false and thought it would do, but when scrolling the mouse wheel up, it still shows the icon.
So I tried deleting the eModeTalkto part in the script. But then the walk icon disappeared. So now I'm at loss what to try next.
Title: Re: How to use Typewriter Module
Post by: Crimson Wizard on Mon 30/12/2019 20:48:28
@Racoon

Usually you just disable unwanted modes in "game_start" function:

Code (ags) Select

function game_start()
{
    Mouse.DisableMode(eModeTalkto);
    // and any others you dont want
}


If you want to get them back anytime in game, call Mouse.EnableMode. This way you may turn them on and off.
This should have effect on any method that selects a mode, either through right clicking, or wheel, or else.
Title: Re: How to use Typewriter Module
Post by: Racoon on Wed 01/01/2020 23:43:49
Thanks Crimson Wizard!