Alright, I got one working now... looks like you can probably use these in fields, too.
Here's the code:
Standard Event
Shared - Treasure Chest
Mode 1
Trigger - Button
Code
Play Animation (This will show the chest opening)
Display - Message Display - (Message Text)
Obtain Item - Party Member - (Item Obtained)
(Repeat above line as necessary for number of items received)
Play Animation (This time, it will close)
Modify Mode - Treasure Chest - Mode 2
Mode 2
Trigger - Button or Touch
Code
(Leave mode 2's event codes empty)
If you want to reset the chest's contents, have another event set it back to mode 1. Having a chest be locked looks like you just insert mode 1's code into a branch that checks for the required treasure item, with an event ending code added at the end, and have the other branch display a message displaying that the chest is locked. By setting "party member" as the character to receive the item(s), you allow the player to choose who gets it without worrying about full inventories. The only drawback to this is that it's completely silent. You
could use a storyteller instead of the display message though.
Now to finish up the new game + and add/clean up some more things!
Here's the code:
Standard Event
Shared - Treasure Chest
Mode 1
Trigger - Button
Code
Play Animation (This will show the chest opening)
Display - Message Display - (Message Text)
Obtain Item - Party Member - (Item Obtained)
(Repeat above line as necessary for number of items received)
Play Animation (This time, it will close)
Modify Mode - Treasure Chest - Mode 2
Mode 2
Trigger - Button or Touch
Code
(Leave mode 2's event codes empty)
If you want to reset the chest's contents, have another event set it back to mode 1. Having a chest be locked looks like you just insert mode 1's code into a branch that checks for the required treasure item, with an event ending code added at the end, and have the other branch display a message displaying that the chest is locked. By setting "party member" as the character to receive the item(s), you allow the player to choose who gets it without worrying about full inventories. The only drawback to this is that it's completely silent. You
could use a storyteller instead of the display message though.
Now to finish up the new game + and add/clean up some more things!




Comment