The engine comes pre-loaded with a lot of useful tags. Generally, a tag is just a sort of special command inside of [square brackets]. If you actually wanted to type square brackets, type \[ to make them appear. Below is a quick summary of available tags:

  • [r=registryName] This tag will search a built-in data structure, looking for a stored value. If it finds one, the tag will be replaced with the result. For example, suppose your game asks the player to input a name at the start, and then creates a ds_map called global.register and adds the name to the key called “playerName.” You could type the following in Slidge to greet the player:
    Hello [r=playerName]

    For more info on ds_maps, see Game Maker's ds_map documentation

  • [font=fontName] This tag will change the font to whatever font you type. It uses the font resource names in Game Maker, so when you import fonts be sure to name them in a way that you'll remember!
  • [color=value] Value can be a 6-digit hexadecimal code (if you are unfamiliar with internet hex color codes, Google them!) or any of GameMaker's built-in color names.
  • [sound=soundName] Use the name of a sound resource you imported into Game Maker to cause that sound to play once when the text reaches this point. You can use this to trigger voice-overs, sound effects, or additional music.
  • [pause=#] Input a number of seconds to pause. This affects the way in which text “typewrites” onto the screen. Decimals are permitted. Pause if often used to make a character seem to speak expressively, but beware over-using this–it can be tough on your readers.
  • [animate=characterID, Loop, expression] You can make small changes to the behavior of a character in your game at the moment when playback reaches this tag. First, you must type the ID number of the character to target (ID numbers are shown in the characters area), then use 1 or 0 to indicate whether the character's sprites should loop, and finally, type the name of any expression you want the character to switch to. This is a complicated tag; you can use it to cause a character to move their mouth or gesture, or all sorts of things by carefully planning animated layers in your character expressions.
  • [image=spriteName] Draws an image within the current line of text, like an emoji.

Text effects:

You can also apply visual effects to the text using the tags [wave] and [shake] along with a [/fx] tag. Text will begin animating in a sine wave pattern or wiggling randomly at the spot where the tag begins, and will end the effect when the [/fx] tag is reached. These effects stack, so you can type [wave]This is a [shake]test[/fx][/fx] and you'll see the first 3 words wave, while the final word waves and shakes.

  • slidge/customizing_text_with_tags.txt
  • Last modified: 2018/12/22 04:58
  • by journeyman