[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: 49
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 »

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 123 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
Party member
Posts: 126
Joined: Wed Jan 02, 2019 8:44 pm

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

Post by 4vZEROv »

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], Majestic-12 [Bot] and 80 guests