CharacterFonts: Difference between revisions

From Adventure Game Studio | Wiki
Jump to navigation Jump to search
*>SSH
mNo edit summary
 
*>Janik
(Put in the script header)
Line 1: Line 1:
The {{Thread|27485|Character Fonts module}} by Alynn allows a user to set individual fonts to each
The {{Thread|27485|Character Fonts module}} by Alynn allows a user to set individual fonts to each
character, and display those fonts while talking.
character, and display those fonts while talking.
<pre>
  Script header for module 'CharacterFonts'
  Author: James Favier (Alynn the Yellow Eyed)
 
  Abstract: Allows a user to set individual fonts to each
            character, and display those fonts while
            talking.
  AGS 2.71 and higher
WARNING:
    Be sure you assign font numbers that actually exist on
    your game, it will break otherwise. Currently there is
    no way to check if the font exists beforehand. If that
    becomes available later I will incorperate it.
---------------------------------------------------------------
Functions:
  SetCharFont(Character *ch, int font)
      This sets the number of the character (ch) and
      assigns it the font number (font).
  GetCharFont(Character *ch)
      Returns the font number currently in use by
      the character (ch).
  Say(Character *ch, String text)
      Works like Character.Say, but assigns the correct
      font first.
  SayAt(Character *ch, int x, int y, int width, String text)
      Works like Character.SayAt, but assigns the correct
      font first.
  SayBackground(Character *ch, String text)
      Works like Character.SayBackground, but assigns the
      correct font first.
------------------------------------------------------------------
Version History:
    1.0 Released upon an unsuspecting population
    1.1 Should work with AGS 2.71, maxed out the number of
        possible characters, now uses pointers for the characters.
------------------------------------------------------------------
</pre>


{{Module|Dialog}}
{{Module|Dialog}}

Revision as of 06:55, 31 October 2006

The Fonts module 27485 by Alynn allows a user to set individual fonts to each character, and display those fonts while talking.

  Script header for module 'CharacterFonts'

  Author: James Favier (Alynn the Yellow Eyed)
   
  Abstract: Allows a user to set individual fonts to each
            character, and display those fonts while
            talking.

  AGS 2.71 and higher


 WARNING:
    Be sure you assign font numbers that actually exist on
    your game, it will break otherwise. Currently there is
    no way to check if the font exists beforehand. If that
    becomes available later I will incorperate it.

---------------------------------------------------------------
 Functions:

   SetCharFont(Character *ch, int font)
      This sets the number of the character (ch) and
      assigns it the font number (font).

   GetCharFont(Character *ch)
      Returns the font number currently in use by
      the character (ch).

   Say(Character *ch, String text)
      Works like Character.Say, but assigns the correct
      font first.

   SayAt(Character *ch, int x, int y, int width, String text)
      Works like Character.SayAt, but assigns the correct
      font first.

   SayBackground(Character *ch, String text)
      Works like Character.SayBackground, but assigns the
      correct font first.

------------------------------------------------------------------

 Version History:
    1.0 Released upon an unsuspecting population
    1.1 Should work with AGS 2.71, maxed out the number of
        possible characters, now uses pointers for the characters.

------------------------------------------------------------------