How to make a text message box.

You must understand the Game Editor concepts, before post here.

How to make a text message box.

Postby Hblade » Mon May 18, 2009 3:41 pm

You can make message boxes using this method I'm showing you in this tutorial.



First, make a message box, or download the one I have here.
textbox2.png


2, make a text actor.
screenshot 1.PNG


3, make a continuing actor, or download the one I have here.
continuing.png
continuing.png (544 Bytes) Viewed 2546 times


4, add and actor called textbox, give him the animation of your textbox.

When you did that, make another actor, and give him the animation of the coninuing animation.

Now, place Coninuing at the bottom right corner of the textbox.
screenshot 2.PNG


When you did that, make the texbox parrent both actors, meaning your text actors parrent is textbox, and your contuing acotr's parrent is textbox.

When you did that, make textbox's parrent view.

When you did that, give your text actor his first message. you can say what ever you want.
screenshot 3.PNG


When you did that, open up the Draw Actor inside of the texbox actor, then open up script editor.

When you did that, make a variable called fade, and messageactive.

When you did that, type this in.
Code: Select all
if (fade == 1)
{
    transp = transp + .07;
}
if (fade == 0)
{
    transp = transp - .07;
}

.

When you did that, open the Draw actor inside of your text actor, then open up the script editor, then type this in.
Code: Select all
if (textbox.transp == 0)
{
    transp = transp - .07;
}

.

When you did that, open up the Draw Actor function in the continuing actor, and open up[ the script editor.

When you did that, type this in.
Code: Select all
if (message.transp == 0)
{
    transp = 0;
}

.

When you did that, make a key down event on your continuing actor. Have the key down be enter, or what ever button you wan't to send the next message, make sure you have repeat turned off, and open up the script editor.

When you did that, type this in.
Code: Select all
if (transp == 0)
{
    messageactive = messageactive + 1;
    message.transp = 1;
    transp = 1;
}

.

When you did that, make a draw actor event on the text actor, then click on conditional action.
screenshot 4.PNG
.

When you did that, add action, set text, and type the next message.

When you wan't the message box to dissapear, simply type in fade = 1 when you get done with your messages, by selection Draw Actor, Conditional Action, messageactive = 2, script editor, fade = 1;.

When you wan't a new message to pop up, jsut use conditional actions and kep increasing messageactive when you want a new message.

Video Tutorial
Attachments
textbox and messages.zip
(48.57 KiB) Downloaded 220 times
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: How to make a text message box.

Postby tlah » Wed May 20, 2009 11:07 pm

awesome! that's how you did the fading text on your edited version of my game...
:D
User avatar
tlah
 
Posts: 66
Joined: Sun Apr 06, 2008 12:10 pm
Location: In your head, readin' ur mind
Score: 2 Give a positive score


Return to Advanced Topics

Who is online

Users browsing this forum: No registered users and 1 guest