Product Chat / LUA: Prompt Duration multiple lines?

Author
Message
Devcore35
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 5th Aug 2014
Location: Rouen (76) - France
Posted: 13th Dec 2015 17:25
Hello,

Do you know how to display text on multiple lines?
Here's the code I have:

PromptDuration ("Test. my text here on the first line. This sentence should be on a second line. ", 15000)

I would like the second sentence is displayed on one line below.

Thank you in advance for your assistance
AlgoStep Company - Software development and 3D video games since 2006
-----------
If it's in the game, it's in the game !
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 13th Dec 2015 17:48
it should be \n
PromptDuration("Test. my text here on the first line. \n This sentence should be on a second line. ",50000)
but you'll notice it just ignores the call completely
life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, AMD R9 200 series , directx 11
LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 14th Dec 2015 10:54
Yes special characters are stripped out as the Prompt is designed for a single line. For more complex overlaps, you might want to check out the new Sprite commands, which would allow you to display an image that contains multiple lines of text in a single draw call. If you felt particularly brave, you could write a system which displayed one sprite per letter and created your own text display system in LUA
PC SPECS: Windows 8.1 Pro 64-bit, Intel Core i7-5930K (PASSMARK:13645), NVIDIA Geforce GTX 980 GPU (PASSMARK:9762) , 32GB RAM

Devcore35
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 5th Aug 2014
Location: Rouen (76) - France
Posted: 14th Dec 2015 12:27
Thank you very much
Unfortunately, in fact, it does not work for now

I'll try your other idea
AlgoStep Company - Software development and 3D video games since 2006
-----------
If it's in the game, it's in the game !
PM
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 14th Dec 2015 19:24
You could just use Text(x,y,size,txt). That way you can have as many lines as you want.


SPECS: Q6600 CPU. Nvidia 660GTX. 8 Gig Memory. Win 7.
Devcore35
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 5th Aug 2014
Location: Rouen (76) - France
Posted: 15th Dec 2015 21:51
Very thanks you DVader ! I will test it tomorrow morning.
AlgoStep Company - Software development and 3D video games since 2006
-----------
If it's in the game, it's in the game !
PM
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 16th Dec 2015 02:52
No problem, I'm sure you will have several lines of text at your disposal without any hard work at all I'm surprised that Lee suggested sprites, which would be a far harder fix in all honesty. I have done what he suggests in the past, but only because there was no easy way to change my font besides using sprites But for simple in game messages text is more than suitable.


SPECS: Q6600 CPU. Nvidia 660GTX. 8 Gig Memory. Win 7.

Login to post a reply

Server time is: 2024-05-05 06:22:03
Your offset time is: 2024-05-05 06:22:03