Text

SkyPilot

  • Posts: 34
I wanna make a text-only choice game, sort of a "choose your own adventure" kinda thing. Problem is, using text in stencyl is really hard. I used a drawing event and the "then draw text at" block, but the things I write in the block (which is quite long) go off screen. How can I solve this? Has someone made a kit that helps with writing?

LIBERADO

  • *
  • Posts: 2720
The easiest and fastest solution is to use the built-in Labels extension:



I use it a lot.
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

Rocktapus

  • Posts: 28
Hi Skypilot

If you just want to put together a text adventure game without any coding or messing around with the engine I would look at Twine. its an amazing piece of software designed to make text based games (and its free). Stencyl is awesome but I just found the blocks too cumbersome for a full text based game.

https://twinery.org

SkyPilot

  • Posts: 34
Hey, yea I thought about twine actually but it seemed a little complicated and I think envolved some coding (although it did look quite basic). I wanted to use stencyl because I'm more familiar with it, and I can use game attributes for stats/money/HP, I don't know if twine has that sort of system

SkyPilot

  • Posts: 34
Hi Liberado,
Thanks for the suggestion. I'm trying to use labels and I've followed the guidelines here on the stencyl page, but my text still goes off screen. Any help?

squeeb

  • Posts: 1617
Hi Liberado,
Thanks for the suggestion. I'm trying to use labels and I've followed the guidelines here on the stencyl page, but my text still goes off screen. Any help?
Maybe try enabling text wrapping? 

SkyPilot

  • Posts: 34
I enabled text wrapping- and disabled the original draw block which was appearently the cause of the text going off screen. Oops.
However, now I don't have any text at all. Am I using Lables wrong? So far I've:
Created an actor with no animations
On the events of that actor, attached label to self,
set lables text to (text)
set lables allignment to left (also tried center)
and enabled text wrap, using width 100.

Only thing I can think of is setting labels font, which I'm not using because it shows "no fonts for this game", but the draw command doesn't need you to set a font for it to write so I don't think this is the problem.


dtishin

  • Posts: 89
I enabled text wrapping- and disabled the original draw block which was appearently the cause of the text going off screen. Oops.
However, now I don't have any text at all. Am I using Lables wrong? So far I've:
Created an actor with no animations
On the events of that actor, attached label to self,
set lables text to (text)
set lables allignment to left (also tried center)
and enabled text wrap, using width 100.

Only thing I can think of is setting labels font, which I'm not using because it shows "no fonts for this game", but the draw command doesn't need you to set a font for it to write so I don't think this is the problem.

You need to set a font in Dashboard -> Fonts, then use the "Set label's font" block for your label. 

SkyPilot

  • Posts: 34
Thanks for all your answers and suggestions. I'm mainly writing this in case someone else in the future has the same problem, they can find this thread and learn what to do.
Using a font worked,
Except
the
text
appeared
like
this I solved this by increasing text-wrap. (320 worked for me, maybe cause my game size is 320x480?)
My one remaining question is that wether I can have a tiny bit of distance between the left side of the screen and where the text starts. I don't know if this will even be the way I go, so not being able to do so won't bother me much. Sorry if this is a simple question, I've never really used labels before. Thanks again, everyone.

LIBERADO

  • *
  • Posts: 2720
@SkyPilot, set the text-wrap to 300, and set to 10 the X coordinate of the actor which has the label attached.
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

SkyPilot

  • Posts: 34
@SkyPilot, set the text-wrap to 300, and set to 10 the X coordinate of the actor which has the label attached.
The set x and set y blocks don't work for me. Whatever I set it to, the text always starts at the very top right of the page.  I've tried putting the set x/y block at the start, end and middle of my code but nothing works. Moving the actor around in the scene doesn't change anything either.

LIBERADO

  • *
  • Posts: 2720
The set x and set y blocks don't work for me. Whatever I set it to, the text always starts at the very top right of the page.
This is weird. Can you show us a screenshot of your code?
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.


LIBERADO

  • *
  • Posts: 2720
When I use your code, it works.
Make sure you don't have any more code that is affecting the X coordinate.
Are you testing it on Android?
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.