I had been looking for a script that you could use to make a simple door inside a building that doesn't transfer you anywhere... it just opens and lets you in. Well since I never could find one that I liked I developed my own.
I have made 5 types of these doors. First one just opens when you use the action button, opens lets you through then closes back. 2nd and 3rd one takes a key to open, then either deletes the key from your bag or doesn't, then functions as door #1. 4th and 5th is a door that takes a key from your bag or doesn't, then deletes it's self.
Okay this first door is a 2 page event door. On the first page you need to have a picture of the door you want to start. Set your priority to same as character, trigger to action button, and option to direction fix. Then use this code:
On the 2nd event page you need to set your trigger to autorun, options to Direction Fix, priority to below character, on conditions set Self Switch to if A is on, and use this code:
Also do NOT use a graphic on the 2nd page.
And that is it for the regular door that just opens, send you through it, then closes back and waits for you to use it again.
Ok the 2nd door. You use these 2 pages above but with a new first page and an extra option turned on the 2nd page. On the first page set the picture to a door you want to use. Set priority to Same as Characters, trigger to action, and on Options set it to direction fix. In the commands column make a text saying something like, "You don't have a key to unlock this door." Now go to your database and make an item and call it the same name as the item you want to open your door. I used Magic Key. If you want to have more than one of these keys set it to consumes. If it is a key that will unlock multiple doors with the same key don't set it to consume.
Ok use the first page of the last script is the 2nd page of this one. At the bottom of the script add a change item command to take away a magic key, if you want to consume the key. Also on your conditions set item to whatever you named your key, in my case Magic Key. Your script should look like this:
Now that last line is ONLY if you want the key to be consumed if not leave it off. Think of keys in Dragon Warrior... some keys were consumed when you used them but special keys, like the gold door key, weren't.
The 3rd page should be exactly like the 2nd page of the last script.
The 4th and 5th door is exactly like the last door. You either set it to consume a key or you don't depending on what you want. But the difference is we are going to ad a page and on the last page of the last script we are going to add a line. On the third page add the line, Control Self Switch: B =ON. Then add a fourth page. On the fourth page do not use a graphic, set priority below characters, trigger is Autorun, and options is direction fix. The conditions are Self switch B is on. Now when this door is used, wither it consumes a key or not, the door will disappear.
I hope this helps all the people out there, like myself, who wanted regular doors but never could find a decent script for them.
I have made 5 types of these doors. First one just opens when you use the action button, opens lets you through then closes back. 2nd and 3rd one takes a key to open, then either deletes the key from your bag or doesn't, then functions as door #1. 4th and 5th is a door that takes a key from your bag or doesn't, then deletes it's self.
Okay this first door is a 2 page event door. On the first page you need to have a picture of the door you want to start. Set your priority to same as character, trigger to action button, and option to direction fix. Then use this code:
Code:
Play SE: 'Open 1' 80, 100
Set Move Route: This event (Wait)
     : $>Direction Fix OFF
     : $>Turn Left
     : $>Wait: 3 frames(s)
     : $>Turn Right
     : $>Wait: 3 frames(s)
Control Self Switch: A = ON
On the 2nd event page you need to set your trigger to autorun, options to Direction Fix, priority to below character, on conditions set Self Switch to if A is on, and use this code:
Code:
Set Move Route: Player (Skip, Wait)
     : $>1 Step Forward
     : $>1 Step Forward
Control Self Switch: A = OFF
Also do NOT use a graphic on the 2nd page.
And that is it for the regular door that just opens, send you through it, then closes back and waits for you to use it again.
Ok the 2nd door. You use these 2 pages above but with a new first page and an extra option turned on the 2nd page. On the first page set the picture to a door you want to use. Set priority to Same as Characters, trigger to action, and on Options set it to direction fix. In the commands column make a text saying something like, "You don't have a key to unlock this door." Now go to your database and make an item and call it the same name as the item you want to open your door. I used Magic Key. If you want to have more than one of these keys set it to consumes. If it is a key that will unlock multiple doors with the same key don't set it to consume.
Ok use the first page of the last script is the 2nd page of this one. At the bottom of the script add a change item command to take away a magic key, if you want to consume the key. Also on your conditions set item to whatever you named your key, in my case Magic Key. Your script should look like this:
Code:
Play SE: 'Open 1' 80, 100
Set Move Route: This event (Wait)
     : $>Direction Fix OFF
     : $>Turn Left
     : $>Wait: 3 frames(s)
     : $>Turn Right
     : $>Wait: 3 frames(s)
Control Self Switch: A =ON
Change Items: [Magic Key], - 1
Now that last line is ONLY if you want the key to be consumed if not leave it off. Think of keys in Dragon Warrior... some keys were consumed when you used them but special keys, like the gold door key, weren't.
The 3rd page should be exactly like the 2nd page of the last script.
The 4th and 5th door is exactly like the last door. You either set it to consume a key or you don't depending on what you want. But the difference is we are going to ad a page and on the last page of the last script we are going to add a line. On the third page add the line, Control Self Switch: B =ON. Then add a fourth page. On the fourth page do not use a graphic, set priority below characters, trigger is Autorun, and options is direction fix. The conditions are Self switch B is on. Now when this door is used, wither it consumes a key or not, the door will disappear.
I hope this helps all the people out there, like myself, who wanted regular doors but never could find a decent script for them.