Desblat Posted January 24, 2017 Share Posted January 24, 2017 I am trying to make character tell line with breaks; like this: But I can't fugure out how, and get this: Here is the code: -----Description------ local dstate = tostring(math.ceil(radstate*100)) local drate = tostring(math.ceil(rate*10)/10).." R/sec. " local desc = drate if radstate < 0.05 then desc = drate.."/n I'm clean. " else desc = drate.."/n My radiation level is "..dstate.."R. " local addup = "" if radstate > 0.85 then addup = "/n It's lethal dose!" end desc = desc..addup end inst.components.inspectable:SetDescription(desc) owner.components.talker:Say(inst.components.inspectable:GetDescription(desc)) What I am doing wrong? Link to comment https://forums.kleientertainment.com/forums/topic/73579-making-text-with-line-breaks-how-to/ Share on other sites More sharing options...
Developer ImDaMisterL Posted January 24, 2017 Developer Share Posted January 24, 2017 In the string you want to write, add "\n" where you want the break to be, like this: ANNOUNCE_RADIO = "My radiation is pineapples!\nThat's not good!" Link to comment https://forums.kleientertainment.com/forums/topic/73579-making-text-with-line-breaks-how-to/#findComment-860896 Share on other sites More sharing options...
Desblat Posted January 25, 2017 Author Share Posted January 25, 2017 18 hours ago, ImDaMisterL said: In the string you want to write, add "\n" where you want the break to be, like this: ANNOUNCE_RADIO = "My radiation is pineapples!\nThat's not good!" Used wrong sign "/" instead of "\" LOL Thanks! Link to comment https://forums.kleientertainment.com/forums/topic/73579-making-text-with-line-breaks-how-to/#findComment-861089 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now