Post by Slimey on Jul 17, 2014 18:40:42 GMT
Tutorials on Doors
I was going to just show one way of making a better animated door, but that isn't as fun, so I will show a few things you can do with the doors.
Simple door animation
This one is a very simple setup and is good if you do not want to use the move route function and want to have better control on the door animation. For example, in a horror game, you could have it that the door gets jammed half way and you need to use an item to get the door unstuck.
For this door, we are going to focus on this area:
i.imgur.com/N8DWReO.png
I am not wanting my slimey to get stuck while the animation plays, and I also want to be able to have the option to close the door. For this, you can have fun with the conditional branches and buttons and have your player press a certain button to enter the door or else they just go through. However, in this tutorial, I am just going to use the show choice option to make it easier.
Create your first event and select the door graphic you want. The first page is really simple. All you need to do is have it set to same as characters and the sound effect you want. Then under that, select self switch A is on.
i.imgur.com/3Rx1g8F.png
The next page, you are going to select the next animation frame for the door. Set the trigger to parallel process and the wait time. I chose 3 frames, but you can set it to how fast or slow you want it. I would recommend 3-5 frames, unless you're making a slow and creaky door. Then, select self switch B is on.
i.imgur.com/eWAqzKY.png
The third page is just like the second one except with self switch C being turned on.
i.imgur.com/bd99X4X.png
The fourth page is going to have the last animation frame and it will be set back to the action button. Make sure the direction fix is on and the waling anim. is off. This is to keep the event from looking strange.
Now, I want the option to close the door or enter it. The easiest way to do this is through the show choice option. In the close door option, you will turn each switch off with the wait command you picked when opening the door. Make sure you add the close sound effect too.
In the enter option, just click transfer player.
i.imgur.com/h1ZcgmQ.png
And that is how you make a simple door animation without the move route.
Variable door animation
This one is like the door animation above, but with variables. This is good if you want to close the door on the other side of the room too.
For this tutorial, we will be focusing on this section:
i.imgur.com/H2wCsr0.png
The steps are exactly the same as the one above, but where it says selfswitch, you will replace them with the variable you created.
i.imgur.com/40KFGZu.png
i.imgur.com/yqMz88p.png
i.imgur.com/zWHzsxC.png
i.imgur.com/Gx17zzM.png
Now that we have the door done, we will focus on the event on the other side of the room.
All you have to do is copy and paste the third page from your other event onto this event and change the transfer back to the other room.
The door is shutting from the other side, yay! However, we can still enter when the door is closed. Unless the player is a ghost, this is a bit problematic.
There are two ways to do this, we can make another event page or we can use conditional branches.
I will go with a conditional branch for this tutorial.
Make a conditional branch where if the door variable is equal to 3. If it is, you will copy and paste what we just did above in that section. In the else statement, you will be adding each variable to open the door like we did in the door event, but it will just be all together on one page now.
i.imgur.com/f2Ssdde.png
Now our door is completely made. Remember to use different variables for each door on the same map or else all the doors will be opening and closing on you.
Locking the Door
For this one, we are going to focus on this area:
i.imgur.com/laP0hPO.png
Make the door exactly like either tutorial above. For this one, I am going to use the variable tutorial.
Now, make a key for your item.
Next, you will be using a conditional branch to check if the key is in the player's inventory. If it is, the option will pop up for the player to lock the door if the door is closed. If you do not have the key and the door is locked, you will be told that the door is locked.
Here is what the full events should look like:
Door:
Other side of door:
End Table:
I hope this helps out.
i.imgur.com/aDPurN0.png