How do I add character dialogue to my game?

Get help using Construct 2

Post » Sat Oct 18, 2014 12:38 am

I want to have little moments of dialogue, where it will show a portrait of a character and their text. For the text to continue to the next page, I want the player to press "Enter" and it will display a new bit of text, similar to if you were playing Fire Emblem on the Gameboy Advance and you pressed our "A" button to continue the dialogue. However, I've found a problem. When I add a sub event, it only gives me "key code is down" and "key is down" for the keyboard object. How can I have a system similar to the old Gameboy games?
B
4
Posts: 14
Reputation: 228

Post » Sat Oct 18, 2014 1:31 am

try this :
- first, write your full dialogue somewhere, then use "mid()" expression to 'cut' your sentence.
- then after pressing Enter, use "mid()" again to show the rest of your sentence.
"If you want to move a mountain tomorrow, you should start by lifting stones today."
B
64
S
14
G
2
Posts: 292
Reputation: 6,678

Post » Sat Oct 18, 2014 3:00 am

Uhm, I'm confused, where and how would I use mid()?
B
4
Posts: 14
Reputation: 228

Post » Sat Oct 18, 2014 5:59 am

Easier to post your capx. Otherwise we have no idea how you're storing your text (or if you even are yet), etc.

Also you can't have a trigger in a subevent that doesn't make sense, which is why C2 filters out some selections in subevents.

As for mid(), do you know what it does? It's used to extract some text from within a larger block of text.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Sat Oct 18, 2014 9:45 am

Depending on how much interaction you'd like using the dictionary object with tokenAt would probably be easiest.

Just add one to the tokenAt expression every time enter is pressed using a variable.

If this sounds confusing and or difficult I think there are multiple examples of a simple dialogue in the FAQ-thread..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 48 guests