GameMaker: Studio

GameMaker: Studio

データを表示:
Text box
Anybody know a simple way to create a scrolling text box, where you can hit a button after the text is fully scrolled to access the next line? (Similar to that in most RPG's)
< >
1-2 / 2 のコメントを表示
How I did it was I have two variables: one to hold the full line of text (let's call it line) and another to hold the scrolling text (display). When the text box is running, I periodically add characters from line one-by-one to display using an Alarm event, and the text box's Draw event draws display on the game window. When the text is fully scrolled, I stop the Alarm event from triggering again until the player presses a key, which as clears display and loads the next line into line.

Hint: You can use "#" (the number sign) to form line breaks within a string, so the text doesn't spill out of the text box, e.g.:

line = "This is the first line.#This is the second line.#This is the last line."

will displayed as (e.g. with draw_text):

This is the first line.
This is the second line.
This is the last line.
最近の変更はM.S.T.O.P.が行いました; 2013年2月11日 15時55分
Redman 2013年2月12日 19時39分 
Hey thanks man, that really helped me out.
< >
1-2 / 2 のコメントを表示
ページ毎: 1530 50

投稿日: 2013年2月10日 21時00分
投稿数: 2