How to make sprites talk w/ text bubbles

Hi everyone,

I’m making a game for my art class, it’s supposed to be fairly short. I want to make my sprites speak, and I want the text to appear on a speech bubble object I’ve made. Basically, when the scene starts I want the speech bubble w/ text to appear, then when a key is pressed (let’s say the enter key), that speech bubble will disappear and another character’s speech bubble will appear, so on and so forth until the characters are done talking. How would I go about doing this?

Thank you for the help in advance!

One simple way to do this is have lots of subevents of a main event that responds to pressing Enter. The subevents are triggered according to the value of a scene variable (something like “talkstage”) and they show or hide the speech bubble and text object, as well as updating the text. At the end of each subevent you increase the value of the variable talkstage so that the next time Enter is pressed a different one is selected.

Here’s an example where there are two speech bubbles and two text objects, one for each speaker, but you could also use one text object and just move it to the correct position each time the speaker changes. The variable talkstage is 0 to begin with so the last subevent will trigger first. Putting them in reverse order is a trick to stop every message being triggered the first time you press Enter.

[code]Enter key is pressed | No actions
Trigger once

 1 Variable talkstage = 2  |  Do = "I'm bored." to the text of speaker1
                             Show the object speaker1
                             Show the object speechbubble_left
                             Hide  the object speechbubble_right
                             Hide the object speaker2
                              Do +1 to variable talkstage
 2 Variable talkstage = 1  |  Do = "I'm fine thanks. You?" to the text of speaker2
                             Show the object speaker2
                             Show the object speechbubble_right
                             Hide  the object speechbubble_left
                             Hide the object speaker1
                              Do +1 to variable talkstage
 3 Variable talkstage = 0  |  Do = "Hello how are you?" to the text of speaker1
                             Show the object speaker1
                             Show the object speechbubble_left
                             Hide  the object speechbubble_right
                             Hide the object speaker2
                              Do +1 to variable talkstage

[/code]