I have an instance in my game where the player needs to solve a puzzle, then afterwards the player can enter a map with a door to progress in the game. The problem with the door is that it doesn't seem to work. The sound effects play, but the door doesn't animate and the player doesn't transfer to a different map. The game just gets stuck there.
There are also instances where if the player's starting position is in the map, the door works, but if the player leaves then comes back, the door doesn't anymore.
I don't know why it does that, how can I fix this?
We need to see the event, take a screenshot of the entire window please.
Also, when you mean you get 'stuck', you mean the entire game freezes (i.e. you can't do anything, open menus, move the player etc.), or can you still turn the player, but he's just stuck in place?
Show us a screenshot of the door event. Include the entire event window, not just the commands. If it has more than one page, include all pages.
Did you use a Quick Event to create it?
Simple, the character is stuck by an object that is blocking them. You have added a door, presumably on top of a wall. That wall cannot be walked on, but the event makes the player take a step forward. Since the player cannot do this, they are 'stuck'.
On the door event, place down a black tile with a little light at the bottom (it's in one of the TileB tiles, I think), this tile should be set to an O in the passage settings, so that the player can walk on it. This should make it work.
Screenshots can be deceptive, but it looks as if you have used the black tile to the right of the one with the pale bottom edge, and that one (quite rightly) is set to X. I can't see the pale bottom edge on the tile on the wall. But as I said, screenshots can be deceptive.
Just put a Through ON at the start of your player's move route, and a Through OFF at the end.
Try adding a through to the top of the move route for the door. If you have no animating, then the turns are not working, so see if a through at the start of the move route fixes it.
Or, you could do my solution: Play the SE and immediately transfer to the new map. Personally, at 3/60th of a second its almost too fast to see anyways, and I've never felt adding the animation improved the game in any way (and even looks odd if you open the door from the top, as it now opens into the player. Ouch?).
Edit: Ninja'd. Shaz's should work too.
I did all that, but it doesn't work either...
Is there just something wrong with my project?
I don't think it's script related...
You could always upload it for someone to download and try it in their version of RPGM to see if they can sort out the problem. Sometimes it is a lot easier for someone else to find out what is wrong than it is for people to put forward options and get told that none of the suggestions work.
When you say that you added the Through to the player, can you show that screenshot too? Just asking because the last one that had the event in it had the Through on the door event, not the player.
You said the door doesn't even animate? I think something's happening before the events then (or at the start of the door animating).
You've got two sound effects there with a half second between them. Do you actually hear both of them?
Can you move the door to the side, and add a Quick Event door? Set the destination, but don't change anything else.
Do you have ANY added/modified scripts? If so, please provide a list. If you don't know what the problem is, you can't possibly say it's not script related. If the event looks correct (which it does), and it doesn't look like anything else is causing it (which it doesn't), scripts is the next thing to look at.
Disable your scripts to check which one is responsible. Ctrl+A to select all of a script, Ctrl+Q to "disable" it by adding notetags to every line.
You honestly don't need an anti-lag script. They cause issues with events, especially events that are out or sight.
But next time something doesn't work properly, check out if it's a script causing the issue.
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
Cel is right. VX Ace has some anti-lag logic built in already, so you'd only need a script if the existing logic is not enough for your needs, AND the script you're adding covers the additional elements you've added to your game that are causing the extra lag.
And being more careful about how you do your events (and what other scripts you're using) can also help to minimize lag.