How do I "RPG" some text?

Get help using Construct 2

Post » Thu Mar 24, 2016 9:27 pm

Final question here: for "tokenat" can I specify which line it's going to?
B
25
S
6
G
6
Posts: 262
Reputation: 3,690

Post » Thu Mar 24, 2016 9:31 pm

The second argument in the tokenat() expression specifies which line. In my example I used "CurrentText", which is a global variable (number) that increments by one every time a new line is set. You can change that to whatever number you want.
Mistakes were made.
B
49
S
24
G
107
Posts: 1,581
Reputation: 60,303

Post » Thu Mar 24, 2016 10:54 pm

Okay for some reason now that I've got this the way I want, I tried experimenting using SpriteFont+. It worked in the original example as I said, but it's no longer working with this method.

It should be noted that any self respecting RPG game designer would never use system fonts but instead opt for a more custom font. Could you possibly show an example of this working in SpriteFont+ at all?
B
25
S
6
G
6
Posts: 262
Reputation: 3,690

Post » Thu Mar 24, 2016 11:16 pm

Okay, it works with regular SpriteFont but not with SF+? They have the exact same options and operators etc...?
B
25
S
6
G
6
Posts: 262
Reputation: 3,690

Post » Thu Mar 24, 2016 11:59 pm

I was going to say, just replace all DestText.Text with SpriteFont.Text (and DestText object's actions with SpriteFont object's actions) and it should work fine, but again, I'm not familiar with SF+, sorry.

Can you describe exactly what part isn't working and maybe I can think of a workaround? Is the text not showing up at all? Do the inputs not work? Can you screenshot your events?
Mistakes were made.
B
49
S
24
G
107
Posts: 1,581
Reputation: 60,303

Post » Fri Mar 25, 2016 1:05 am

No no, I'm just a moron and had it invisible lol. No problems. :P
B
25
S
6
G
6
Posts: 262
Reputation: 3,690

Post » Fri Mar 25, 2016 1:37 am

oosyrag wrote:I was going to say, just replace all DestText.Text with SpriteFont.Text (and DestText object's actions with SpriteFont object's actions) and it should work fine, but again, I'm not familiar with SF+, sorry.

Can you describe exactly what part isn't working and maybe I can think of a workaround? Is the text not showing up at all? Do the inputs not work? Can you screenshot your events?


As I said, I accidentally had it set to invisible, but I do have another issue that I'm not sure how to get around, and maybe it's the way I'm doing it.

Should each dialogue be in it's own text file, or could every line of text in the game be in the same file? If all in the same file, how do I tell it when to stop displaying the text?
B
25
S
6
G
6
Posts: 262
Reputation: 3,690

Post » Fri Mar 25, 2016 1:47 am

roracle wrote:Should each dialogue be in it's own text file, or could every line of text in the game be in the same file? If all in the same file, how do I tell it when to stop displaying the text?


I highly recommend using XML. It might look a little mysterious and complicated at first but it really isn't that difficult. It is great for organizing certain aspects of your project, especially dialogue. I use it in pretty much every project now.

I'd be happy to provide a quick explanation, a couple of reference links, and/or capx.

I have a post showing how you can use XML and randomness but it doesn't explain much or show the dialogue aspect:
viewtopic.php?f=148&t=170355
ImageImageImage
B
39
S
22
G
11
Posts: 486
Reputation: 9,913

Post » Fri Mar 25, 2016 1:51 am

I'm very new to working with this whole text thing. I've used SpriteFont before to do intros and HUD stuff, but this is a little more complicated already.

I think the best option would be if I could see an example of "talking" to two different "npc" objects, each saying their own thing and can be talked to separately and in any order the player chooses. That would make things a little easier. :3
B
25
S
6
G
6
Posts: 262
Reputation: 3,690

Post » Fri Mar 25, 2016 1:55 am

Exactly, give me a few minutes . . .
ImageImageImage
B
39
S
22
G
11
Posts: 486
Reputation: 9,913

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, part12studios and 11 guests