Create a Container Object¶
Containers are destructible item entities that can drop another item when broken.
Goal¶
Create a breakable object such as a crate, barrel, box, or scenery prop.
Prerequisites¶
- A source mod under
Editor. - Sprites for the intact object and, optionally, breaking debris.
- A target item to drop, such as food, points, a weapon, or a custom item.
Steps¶
- Open the mod in the in-game editor menu.
- Launch the Character Editor.
- Choose Mod mode and the Items filter.
- Create a new item entity for the container.
- Import the container sprites.
- Build the idle/intact animation and the break animation.
- Set body boxes so attacks can hit the container.
- Set item or reference behavior for a breakable container.
- Configure the contained item: target mod, item name, and any mode or spawn settings the behavior requires.
- Save the container.
- Open the Level Editor and place the container in a test level.
Testing¶
- Hit the container from both directions.
- Confirm it breaks once, plays the expected animation and sound, and drops the expected item.
- Confirm the dropped item can be picked up or used.
- Test several containers on screen at once.
- Test with alternate palettes if the container uses palette effects.
Links¶
- Create Levels
- The Character Editor Workspace - panels, preview controls, and shortcuts
- The Inspector - every setting and what it means
- Character Editor Reference
- Level Editor Reference