Topic:   Display words and numbers   (Read 7386 times)


0 Members and 1 Guest are viewing this topic.

Teruri


  • GMG-er

  • **


  • Posts: 167

  • This personal text couldn\'t be worse
Display words and numbers
« 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
Max 500; characters remaining: 466