Jump to content

Recommended Posts

I am trying to make character tell line with breaks; like this:

 bug text2.png

But I can't fugure out how, and get this:

bug text.png

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?

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!

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...