[SOLVED] Dialog doesn't work on signs (I have no clue lmao)

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
icekiller8002
Prole
Posts: 36
Joined: Mon Jun 06, 2016 9:28 pm
Location: United States

[SOLVED] Dialog doesn't work on signs (I have no clue lmao)

Post by icekiller8002 » Fri Jun 07, 2019 6:33 pm

I'm trying to make an interactive system with signs by loading the sign text data from a .dat file. It seems to work only once, but after the first interaction, it doesn't work.

I used some prints to debug this, and the issue is on this line:

Code: Select all

ttxt[ntxt] = ttxt[ntxt]:sub(5)
This line is not only setting the text in ttxt[ntxt] to the 5th character as the first, but it's doing it to signData[sc][ntxt] as well. I have no clue why it's doing this, but I went ahead and provided a .love because this is confusing me so much. I appreciate any help I can get.
Attachments
why you no worky.love
(30.42 KiB) Downloaded 28 times
Last edited by icekiller8002 on Fri Jun 14, 2019 7:17 pm, edited 1 time in total.

Code: Select all

function love.draw()
  love.graphics.print("obey")
end

User avatar
4vZEROv
Prole
Posts: 48
Joined: Wed Jan 02, 2019 8:44 pm

Re: Dialog doesn't work on signs (I have no clue lmao)

Post by 4vZEROv » Fri Jun 07, 2019 8:13 pm

I tried but I don't understand how your code work, "txtt" become empty after ending the first conversation that's as far as I went.

You have globals everywhere and functions that call them without being passed as argument. Also your variable names are not easy to understand to say the least.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 5 guests