Solarus-Games English Forum

Solarus => Development => Topic started by: Hawkinzon on September 26, 2017, 09:56:07 PM

Title: [SOLVED] Item image won't show
Post by: Hawkinzon on September 26, 2017, 09:56:07 PM
Hi Everyone,

I am currently working on a item which is working in game, it can be found and will be registred in my inventory and will open e.g doors that require that item.
The problem is that when I get the item from e.g a Chest it will display the dialog but not the image of the item.
I have double checked that the .png image is in the MyQuest\data\sprites\items folder with the correct Dialog ID

Got any ideas about what is going wrong? Can't find any directly tutorial on how to create a new item.
Please let me know if you need any files attached

BR
Hawkinzon
Title: Re: Item image won't show
Post by: Christopho on September 26, 2017, 10:09:49 PM
The tutorial about creating treasures is here: https://www.youtube.com/watch?v=iG0YRerYphg&index=8&list=PLzJ4jb-Y0ufxwkj7IlfURcvCxaDCSecJY

You need to create a sprite from your PNG image. It might be a sprite with just one frame corresponding to the PNG image, but it still has to be a sprite :)
The sprite needs to be named exactly "entities/items", and have an animation with your item's name and a direction for each variant. The tutorial explains all this with examples.
Title: Re: Item image won't show
Post by: Hawkinzon on September 26, 2017, 10:21:17 PM
Hi Again,

I think I have done everything right (atleast as far as I can see)

The followed have been done

Can't see that I have missed anything.

BR
Hawkinzon
Title: Re: Item image won't show
Post by: Christopho on September 26, 2017, 10:34:21 PM
The sprite id must be "entities/items". It is an animation of this sprite that should be called "glasses".
Title: Re: Item image won't show
Post by: Hawkinzon on September 26, 2017, 11:29:47 PM
Yes!! That worked :)
The thing is that this item worked before until i downloaded and did put my quest in the .Solarus folder. And now it didn't work..
Wonder were it went wrong along the way..


Well well, it does works now and I'm grateful! :)

BR
Hawkinzon