• Register
Post tutorial RSS Adding an Item Container to a Map

This RPG in a Box tutorial demonstrates how to add an item container to a map.

Posted by on - Basic Mapping/Technical

Adding an Item Container to a Map

This tutorial demonstrates how to add an item container to a map. For this walk-through, we will add a treasure chest to our main map that will contain some items for the player.

To begin, open the map that you want to add an item container to in the Map Editor and switch to Place Mode.

Select the object that you want to be an item container from the resource selection sidebar and place it into the map in the desired location. For this example, I will be placing a treasure chest.

Next, switch the Map Editor into Edit Mode so the necessary modifications can be made to the object.

Right-click on your object and select Properties from the context menu.

In the Properties dialog, check the Item Container checkbox to indicate that you want to allow this object to contain items. Double-click any items that you wish to initially be within the item container - this will add them to the box on the right labelled Items in Container. Click the Close button once you are finished. It is not required to add any items initially, as you may just want the object to act as an item container without having anything in it at the start of the game.

Note: You can also added a script to the object if you would like an event to occur when the player opens the item container. For example, you could play an opening animation for the object:
play_animation(self, "open")

If markers are enabled in the Map Editor, an item container marker (a "box" icon) will appear over the object to indicate that the object is now an item container.

There is one more step to ensure that the player can interact with the item container. When I placed the treasure chest, the Map Editor removed any navigation/interaction paths to the tile that the chest sits on because the object is not designated as "walkable". First, decide which adjacent tiles the player should be able to interact with the item container from. In this case, there are two adjacent tiles from which the player should be able to access the chest. For each one, select the tile that the item container is on and the adjacent tile, then right-click to bring up the context menu. Go to the Navigation/Interaction sub-menu and select Interact Only. This will allow the player to open the item container from the adjacent tile.

As shown below, I have set the tile in front of the chest and to the left of the chest as Interact Only (displayed as orange lines by default).

Save the map and then try out the item container in your exported game!

Guest - - 699,145 comments

We will be able to make multiplayer game ?

Reply Good karma Bad karma+1 vote
Ol_Smaug Author
Ol_Smaug - - 91 comments

There aren't any plans for multiplayer at this point, but I haven't completely ruled it out. My focus is on single-player, but we'll see what happens. :)

Reply Good karma+1 vote
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.