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 Help - Event

Tring to create a door that when the player touchs it, plays SE, swings open and a few seconds later closes itself. So far got this party working.

The problem is, if the player happens to stand on the door event and not move. The door closes anyways. What I would like to do is one of two things:

1. Door remains open if the player is standing on the door event, until he moves off it in which case the door plays the SE and closes.
2. The door closes like it does now, but if the player moves off the door event, it plays SE, swings open and then closes a few seconds later.

So I, hope I placed this in the right part of the forums, have came seeking help in this matter.
 
On the page of the door event where it is open, try using Parallel Processing to check if the player's coordinates are equal to that of the event. You can either set two variables to Player's Map X and Y, and use a Conditional Branch for the variables, or use a Conditional Branch: Script: with the following:
$game_player.x == X && $game_player.y == Y

where X and Y are the coordinates of the door event.

Within the Conditional Branch, do what you will. In the Else branch, let it play the S and swing shut.
 
It would be easier to make two separate pages (one closed, one open), which you would switch between by toggling a self-switch. This allows you to have distinct commands for both situations.
 
Well, I'm afraid that's the simplest method I can think of. It shouldn't be that painful if you just copy-paste and edit the maps for transferring. Otherwise, just automatically have the player walk in the door on player touch/action command.
 
This conversation is massively confusing me... though what I think I can make out is that dayhjawk read switches when he should've read self-switches - those are perfectly copypasteable and should work even with 400 doors on the same map.

Also, if the only intention of those doors are entering and exiting buildings (assuming you're doing tansitions to inside/outside maps), the simplest solution is that the door event itself is the teleport event as well. That way, you can eliminate the possibility of someone standing in the doorway.
 

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