Creating Item Chest.

Hello and good evening. First off, I just wanted to say that I hope everyone is well and healthy with everything going on these past month or so.

I wanted to ask if there's a better method to creating chest than what I had to do? I did a BG tile that is open and put a monster sprite over it to make it look like its closed. You interact with it like an NPC, gives you they suppose to give you and disappears making it look as if you got what you needed and the chest stays open.

Can this be made as a special animated tile instead? I was looking through the special tiles but its very vague for me to work with of course until i know how to do it lol

-Fernando

PS hope to show you guys a demo soon.
 

Atarath

Member
I'm sure there are different ways to do it, depending on what you want to accomplish. My game uses a game object as the chest, so I can have them on any screen regardless of what monster group is loaded. I also have a separate NPC chest, for special items that bring up text. I do a check in the object collision code of Object_type,x and if a button has been pressed. I then check the Object_ID,x of the game object chest to find which monster place it is in. Based on monster placement, the chest will give one of four items. I have code that grants the player whatever item it is and the action state of the chest is changed so that it appears open.

If you use an NPC as a chest, you can set the text to award whatever item you have set up.
 

dale_coop

Moderator
Staff member
This is smart, Elarath.
Have you placed your Chest game object on a tile, to get that solid collision?
 
Top Bottom