Updated: I think I have figured it out for the most part. Crated an NPC class that extends the Sprite class. Created an array of phrases - and did basically the same thing we did on the battle scene. Created buttons, grabbed the innerHTML of the buttons to populate the sentence text in a div down below. Still buggy because the buttons render twice for some reason sometimes - but not always...
(Updated: I forgot to replaceChildren() on function call. That cleared this issue up).
I should have an exact tutorial / source code for this feature within the next two weeks. Finishing up editing on Tower Defense, then want to spend the next month on just Pokemon premium. Code is there for this, just have to record and edit it 😅
Want to participate?
Create a free Chris Courses account to begin