How can I update my dialogue text?
I've been working on a game that includes text. Once the player walks into the collision box of a certain item, they will be able to press "e" to bring up text regarding that item, and move it away with "space". I'm very new to this so I've been using guides to help me and I followed Brackeys' system for dialogue. This system involves a script in which you can enter a name and sentences into text boxes in the inspector that don't carry over from instance to instance.
I made a script to trigger the dialogue upon pressing the "e" key within a certain area but no matter what item I go to it only displays the text from the item whose text was last edited.
Please help I've been trying to find a way to get it to update the text according to the instance of the script but I can't seem to figure it out.
I've left a pastebin with the three scripts that make it run. I'd really appreciate some help as I'm very new game development and unity as well.
Your answer
Follow this Question
Related Questions
Calling functions that needs to be on update() 1 Answer
How to change the color of my text object? 1 Answer
How do you make a multiple string dialogue with a typing effect? 1 Answer
Help! I don't know how to fix this. Errors CS1041, CS1525, CS8025 1 Answer
(C#) How can I make a rich text autotyper for an rpg dialogue box? 1 Answer