Post new topic    
Metal Slime
Send private message
How to linebreak a textstring in a plotscript? 
 PostSun Feb 11, 2018 10:12 pm
Send private message Reply with quote
Hello!
Is there a way to implem,ent a line break in a string variable?
As you can see on my screenshot, I need a "\n", so to say.

Code:

...

string sprintf(1, $0="You have nothing to put into the recycler. Gather some organic waste to recycle.")
show textbox (30)
wait for textbox
...
Metal King Slime
Send private message
 
 PostSun Feb 11, 2018 10:36 pm
Send private message Reply with quote
HSpeak supports \n in strings

Also, string sprintf is redundant there, you can just directly put the text in string 1:

Code:
$1="You have nothing to put into the recycler.\nGather some organic waste to recycle."


But to get automatic line breaks you should use a text slice set to Wrap.
Metal Slime
Send private message
 
 PostMon Feb 12, 2018 6:53 pm
Send private message Reply with quote
Thank you! Grin
Display posts from previous: