Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

door events and turning switches off

okay, I have tried to implement a door event that I found here. But I have runinto problems. On the second page, the switch does not want to turn itself off. The first time I tested it, the door opened just a little bit, my character walked through, and the door wouldn't shut, and I understand that that's what it's suppose to do. The next time I tested it, it wouldn't open at all, my charater just walked through the door. That's not the only place where I have tried to turn off a switch. In another scene, I wanted to have my character walk into a place, everyone turns to look at them, and then they get kicked out. now how I wanted to do that scene is that if you walked in again then they would all turn and look at you again, but when I look in, they are already looking at me, i tried to use a turn off switch for that too. These pictures are for the door. Does anyone know how to put pictures on this website?
 
Yes!

First, get yourself some screenshots. Do this by going into RMXP, pulling up the event in question, and hitting the PrtSc (Printscreen) key. (You may actually want to use Alt+PrtSc, which will only make a screenshot of the open window.)

Next, open up your choice of paint program. (What? You don't have one? Go download Paint.net or Graphics Gale or the Gimp or something, right now! If you are serious at all about using RMXP/VX, you need a paint program that can handle .png files, badly.)

Select "New" in your paint program. Then hit "Paste." Your screenshot will now appear in your paint program. Save it.

You have now created a screenshot of your event code.

Step two: Posting your screenshot on this website.

Go get yourself an account somewhere like Photobucket, TinyPic, or Imageshack. You can get an account for free, so no worries.

Now, go to your account there, and upload the picture you just made to your account.

In said account, there should be a bit of code that you'll copy to create a link to that picture. Copy that.

Now make a post here. Use img tags (It's up there in the options of stuff you can select with one little click) to surround that bit of code you just copied, and lo and behold, a screenshot, posted to the group.

As for your actual question, I'd say that you may have your script commands out of order, but it's really hard to be sure without a screenshot of your event code.

Would you mind posting one?
 
Okay if I'm doing these images correctly then the door events are:

eventpage1.png

eventpage2.png


And the other switch is:
intruder1.png

INTRUDER2.png
 
Thank you very much for the screenshots! It makes it much easier to deal with the event code.

One thing at a time, here.

Here's how the code for your door event works:

Player approaches door, pushes button.

Door plays sound, door starts to open, door vanishes as event goes to the second page.

The event is now on page two, and is again waiting for a button push. On getting that button push, it will have the player start to move forward and then immediately shift back to page one, causing the graphic to reappear.

Solution: Try putting a "Wait" command before you change the Self Switch.

Also, you might not need two pages for this event in any case. I'd restructure it to put all the commands on one page, and just change the player to "Through" long enough to walk through the doorway, turning that off once they're through it, and shutting the door again afterwards. But don't forget the "Wait" commands.

Your second two events should also be one single event. I'd also suggest, right off the bat, that they should be Autorun, and not Parallel Process. (As it stands, the player can move during these events, which doesn't seem like what you want.)

Anyway, put all of the event coding in one event. It'll be much, much simpler. Remember, you can Set Move Route in any event for any event on the map, so it's not necessary to use multiple events for one sequence. Just put the code for the second event at the bottom of the first, reducing that Wait 800 Frames bit, and make the whole thing Autorun. It'll work better, and be much easier to tweak and debug.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top