Problem with Double Doors

Maximum frame precission! (?)

5DUaK.png


$game_map.events[EVENT_ID].set_direction(DIRECTION)#2: down 4:left 6:right 8:upThis could be considered a joke too,

Orochii Zouveleki

EDIT: I actually tried the same thing Baka-chan did, the same specifications (wait checked only at the second), and I think it went fine, no "buggyness".
Just request someone to make the doors into a single characterset for you in our resource requests. It's really not that hard.
Just request someone to make the doors into a single characterset for you in our resource requests. It's really not that hard.
Actually, it is in this case - because you can't make them into a double-size sprite without breaking them, he tried using doublesized doors and it failed before.

To make a double-sized door fit to the regular map grid, you'll need a triple-width sprite, with blank 32 pixels to one side of the 64 pixel-sized door.

The event automatically centers the sprite, which would place a 64-pixel-door a half-grid into the left and a half-grid into the right coordinates of the map - like it was displayed on the non-working example of the previous page in this topic.

If you make a triple-grid-width sprite and place the double door into the first 64 pixels, keeping the remaining 32 pixels at the right end transparent, then place that sprite into an event on the right half of the double grid space where the door is supposed to go, then the left grid will be covered by the first part of the triple-sized sprite (left part of the door), the event position will be covered with the center part of the triple-sized sprite (right part of the door) and the right grid (where the wall would be) would be covered by the right (empty) part of the triple-sized sprite.
EDIT: I actually tried the same thing Baka-chan did, the same specifications (wait checked only at the second), and I think it went fine, no "buggyness".
This was something I had already done on my first try and attempted again with the same buggyness.

If you have two events running side by side, then controlled by a switch perhaps? With two parallel processes, it shouldn't be glitchy, I tried a little test and it worked quite well.
That sounds like a pretty good idea as does this. Edit: First idea just kept taking me through the doorway open on one side when I was in the same room.

$game_map.events[EVENT_ID].set_direction(DIRECTION)#2: down 4:left 6:right 8:up
I will try them and post my results. Edit: Tried this and got an error message when I tried to load the game

error message.png
EDIT: I actually tried the same thing Baka-chan did, the same specifications (wait checked only at the second), and I think it went fine, no "buggyness".
This was something I had already done on my first try and attempted again with the same buggyness.
If that code becomes non-synchronized for you, then most probably that map is near the limit for lag.
That code should be simultaneous on a clean map (nothing is truly simultaneous on a computer, but the difference on a small map shouldn't matter).


If it isn't on your game, I suggest trying the same on a small and empty map to find out if the lag is caused by map or by script, because you might find other problems caused by that lag later.

Edit: Tried this and got an error message when I tried to load the game


attachicon.gif
error message.png
Those scriptlines are for the script command in an event, they are NOT to be placed in the script editor.
The error message shows that you placed them into a script slot in the script editor, but you would have to place them in an event (the screenshot in the original post was too abbreviated to show that it's from an event content window, not from the script editor...)
If that code becomes non-synchronized for you, then most probably that map is near the limit for lag.That code should be simultaneous on a clean map (nothing is truly simultaneous on a computer, but the difference on a small map shouldn't matter).

If it isn't on your game, I suggest trying the same on a small and empty map to find out if the lag is caused by map or by script, because you might find other problems caused by that lag later.
I will use a new game to try that out, it might be what is causing it as I do have a lot of stuff running through that building. Edit: Tried it, worked perfectly. May need to trim things down a bit. Re-edit: Seemed I had done it wrong the first time and noticed a small mistake that created the glitch, the doors now operate perfectly.

Thank you all so much for being so patient

Those scriptlines are for the script command in an event, they are NOT to be placed in the script editor.

The error message shows that you placed them into a script slot in the script editor, but you would have to place them in an event (the screenshot in the original post was too abbreviated to show that it's from an event content window, not from the script editor...) 
I removed the line i had stuck in the script editor by mistake, I thought $game_map.events[EVENT_ID].set_direction(DIRECTION)

#2: down 4:left 6:right 8:up needed to be added there.

I do however get a new error when I touch the door.

error 2.png
I do however get a new error when I touch the door.


attachicon.gif
error 2.png
Looks like you removed the $ from the variable's name before placing it in the event.
If that is not the case, please post a screenshot of your current door event for us to check - the error alone can't allways help, we also need to see what you've done to cause that error...
I actually just copied and pasted this in

$game_map.events[EVENT_ID].set_direction(DIRECTION)
#2: down 4:left 6:right 8:up

with the directions set and events called like so

$game_map.events[left_door].set_direction(4)

and so on? I deleted it though before a screenshot could be taken, the problem is fixed now though
left_door is not the event id. The event id is 3 - the number of the event, with leading zeros removed.


It's better if you post a screenshot of your event rather than typing here. Your event could have a typo that you don't reproduce here, or when you type it here, you could add a typo that's not on the event. In addition, there are other settings that aren't in the command list that could affect how your event runs, so when you do take screenshots, it's important to include the WHOLE window and not just the command list.


So "the problem is fixed now" - does that mean the error message you were getting, or the issue with the doors? It really shouldn't be this difficult.
left_door is not the event id. The event id is 3 - the number of the event, with leading zeros removed.
Oh in that case the id of the event must have been 2 I thought the name was the ID.

It's better if you post a screenshot of your event rather than typing here. Your event could have a typo that you don't reproduce here, or when you type it here, you could add a typo that's not on the event. In addition, there are other settings that aren't in the command list that could affect how your event runs, so when you do take screenshots, it's important to include the WHOLE window and not just the command list.
I copied and pasted it in exactly so there was no way for there to be a new typo, I did type in left_door for the command which you pointed out was wrong.

So "the problem is fixed now" - does that mean the error message you were getting, or the issue with the doors? It really shouldn't be this difficult. 
The issue with the doors is fixed, turns out the mistake I made was one door going right then left instead of left first, that was the typo of sorts I made, the solution was presented all along it was my fault.
Glad you finally got it sorted 🙂 (this is where a screenshot of your latest version of the event may have helped someone figure it out pretty quickly)


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.

Original thread: https://forums.rpgmakerweb.com/threads/problem-with-double-doors.20597/