Solarus > Development

Text box appearing when getting an item

<< < (2/5) > >>

ponderitus:
have you tried with an npc? the text for the save and quit is most probably a menu not a dialog so thats why that would still show.

make an npc and set it to speak...see if that brings an error

hood_rad:
Just tried with an npc using _treasure.sword.1 and I got the text with no errors. Is there an easy way to change what dialog is used when getting an item? I feel like I'm just really dumb and missing something super simple.

thanks!

hood_rad:
so I found the code
--- Code: ---sol.language.get_dialog()
--- End code ---
in the solarus documentation pdf and I think that might be what I'm missing but cant get it to work either. Is there a certain function in my sword.lua that it should be used in or something like that maybe?

ponderitus:
i dont know what you're doing but you shouldn't have to do anything like this, where have you started from? id suggest redownloading solarus and the resource pack if thats what you are using

Max:
I dropped your item's code into my sword item, and it displayed the dialog when I picked it up, so it's not your code there, and if you're getting any dialogs at all, it's not setting the language in main.lua.

Your item is called "sword", right? Since the engine uses the item's name to search for a matching dialog in the _treasures dialogs. That's the only other thing I can think of at the moment :^0

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version