|
Post by Gor4k on Aug 19, 2011 8:19:34 GMT -8
Scrolling Credits Difficulty: Beginner Knowledge: Basic. Must know what the basic resources are as well as actions for events.
Here is a complete guide to creating scrolling credits.
First you are going to want to make a font, name it something simple like fnt_endcredits-
Next you are going to want to create an object called obj_endcredits.
In the Create Event you are going to add an Execute Code action and add this:
{ credits = "Scrolling#Credits Example###written by##Trenton Kidder## "; credits += "This is example text for scrolling end credits.#"; credits += "Feel free to add as many lines as you want.#"; credits += "The end credits will wrap once#"; credits += "the last line of the text has disappeared#"; credits += "from the screen..."; y = room_height; vspeed = -1; }
Next create a Draw Event. Add another Execute Code action. Within the Execute Code source add:
{ draw_set_color(c_white); draw_set_halign(fa_center); draw_set_font(fnt_endcredits); draw_text(320,y,credits); if ( y < -string_height(credits) ) y = room_height; }
First what this does is sets the color of the text to white. It then sets it to the center. Next it chooses the correct font of fnt_endcredits, and finally it wraps the text when it intersects with the room_height.
I hope this was helpful and expect more in the future.
|
|