Game Maker's Garage Forum

Game Creation => SilverCreator => Topic started by: Teruri on January 28, 2009, 03:50:56 PM

Title: Display words and numbers
Post by: Teruri on January 28, 2009, 03:50:56 PM
This basicly is a revamp of Samus' system. It is more dynamic (it uses a for loop instead of some if then lines). You can use it to display anything you want, from damage to words. Remember: you just have to make sprites for them :D

Code: [Select]
LET x = 10
LET y = 10
LET word$ = prompt$("Enter a word. Max 15 characters",15)

FOR letter = 1 to LEN(word$)
   LET letter$ = MID$(word$,letter,1)
   CREATESPRITE letter, letter$
   MOVESPRITE letter,x,y
   LET x = x + spritewidth (letter)
NEXT

This could be used in RPG's to display message boxes. Let's say your map, player, npc, etc. sprites all are below 10, and your mesage border is 10, you could displayer 40 character long texts. :D