Storing a text variable in Runner question...

This forum is the place to learn about and discuss ADRIFT 5. Feel free to mention any bugs you find here, but please also add these to the Bugs & Enhancements list.

Please also refer to the ADRIFT 5 Wiki for more information.
Post Reply
User avatar
DazaKiwi
Posts: 794
Joined: Thu Oct 21, 2010 10:05 am
Points: 61
Location: New Zealand

Storing a text variable in Runner question...

Post by DazaKiwi »

You can use some html mark up within a text variable eg. <br> but if you have a task that takes what the player writes and put it into a string, if the player attempts to put line breaks in what they write in the same way ie. <br> these are ignored when being stored into the text variable (in Runner).

But if you manually create a text variable in developer in the same way the line breaks work fine.

Why can't they be added to a text variable in runner? i ask this because i have a game where i want the player to write some of the content and currently it will output in one big paragraph.

Are there any work arounds? i am guessing there isn't but doesn't hurt to ask.
User avatar
Denk
Posts: 703
Joined: Mon Feb 22, 2016 6:21 pm
Points: 291
Location: Hjørring, Denmark

Re: Storing a text variable in Runner question...

Post by Denk »

I am not sure if this fulfils your requirements, but I made a small demo with two methods:

One method is to tell the player to type "/" everytime they want a line break, e.g:

Code: Select all

I wake up/I go to work//several hours later:/I'm home again

The game then answers:
I wake up
I go to work

several hours later:
I'm home again
The other method receives three lines of text from the player, where the player hits Enter after each line.
Attachments
messageDemo.taf
(28.07 KiB) Downloaded 12 times
----------------------------------------------------------------------
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
----------------------------------------------------------------------
User avatar
DazaKiwi
Posts: 794
Joined: Thu Oct 21, 2010 10:05 am
Points: 61
Location: New Zealand

Re: Storing a text variable in Runner question...

Post by DazaKiwi »

Thanks for the Demo Denk that works great. I have never used replace before and didn't even think about it. A neat trick :)
Post Reply