piman01 Posted December 27, 2021 Share Posted December 27, 2021 I am trying to make a quest log for my game. I have a javascript object called activeQuests with keys being quest names and values being quest descriptions. For example, we might use activeQuests={ "quest1": "this is what you do in the first quest", "quest2": "this is what you do in the second quest" } In my menu scene, I use the following code: gameState10.activeQuestDisplay = this.add.text(175, 140, '', { fontSize: '25px', fill: '#fff', wordWrap: { width: 850, useAdvancedWrap: true } }).setOrigin(0, 0); let textFiller=''; for (questTitle of Object.keys(activeQuests)) { textFiller += `${questTitle}: ${activeQuests[questTitle]}\n\n` }; gameState10.activeQuestDisplay.setText(`${textFiller}`); However, the two new lines (which should be present from \n\n) do not appear. Is this an issue with wordWrap? I've looked for quite awhile and can not seem to find a solution. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.