Hi! I had worked on a wardrobe before and today I was working on a drawer. But while I was at it, a thought came to me: how can I make the player open the wardrobe and then open the drawer?
I will make the event a wardrobe so that the player can open it when they press the action button. But I also want the player to be able to open the drawer inside. How can I do that?
Note: I want the drawer to be a different event than the wardrobe. (I could consider having that event on a different tile... above the wardrobe one. But then the player won't be able to interact with it directly...)
Use self-switches. Assuming you have the graphics the wardrobe and the drawer inside it (one tile above the wardrobe event I assume):
1) The player only interacts directly with the wardrobe event.
2) Once you open the wardrobe, activate self-switch A, show the drawer event.
3) Create a new event page in the wardrobe event (condition self-switch A). In that page, if the player interacts with the wardrobe it will open the draw via a "set movement route" command that controls the drawer event.
EDIT: I'm not sure if the drawer will actually appear since I think the wardrobe will hide it due to display priority. If it does, I suggest having the wardrobe and the drawer in a single image so you can make them a single event.
Really, you need to make a few frames of animation (steps of the drawer/wardrobe opening) and set it as a character sheet. Then use turns to make it animate.
You can see how this is worked out using a door - they are set up as a character sheet with steps of the door opening. And if you use the Quick Event Door creation, you can see what event commands are used to animate it.
you can have only one event at any grid position.
But that event can have any number of functions as long as you write the correct selection logic to choose which part of the event to do.
Actually what I'm aiming for is a very detailed interaction system. The player can interact with every object individually and precisely. I want the player to open the wardrobe which has a drawer. Then, 'if' they want they can open the drawer. So, that means both wardrobe and drawer need to be two separate events... I can make the drawer above a tile of the wardrobe event but that wont exactly allow the player to interact with it directly. :/ If there's no other way to do this... maybe I'll need to consider allowing the mouse to trigger the events...
They don't need to be 2 separate events. Like me colleagues said, you can't have 2 events on on the other. You CAN do it with only one event, but you will graphics for:
A- When the wardrobe is closed.
B- When the wardrobe is opened and the drawer closed.
C- When the wardrobe is opened and the drawer is opened.
You then create an event that has 3 states:
- When the event is in A state and the player interacts with it, it goes to B state.
- When the event is in B state and the player interacts with it a choice window pops out and gives the player the option to close the wardrobe or open the drawer.
1) If the player chooses "close the wardrobe", reverts back to A state.
2) If the player chooses "open the drawer", set the event to C state.
- When the event is in C state and the player interacts with it, it goes to B state.
Having this system for every object in a game is something hard as it would take an incredible amount of time to set up. If you're aiming for a large scale application of this system, I would suggest to look for a plugin designed for that (if there is one of course).
Thank you for your suggestions ^^ I'll try it and see how it goes.