Elevator issues

I'm having a bit of trouble with an elevator event. I have it where it does take me to each floor separately, but when on the same floor the switch provides, the elevator still moves. Im trying to have it where the switch is pressed for the floor but it does nothing.
Not sure I understood correctly but the elevator moves you to the desired floor, and you'd wish to prevent the elevator from moving to the floor you're already on, while keeping the option for your current floor available in a choice ?

If that's the case, do you use Variables ? You could use one to numerically store the floor you're currently on, then perform a Condition Branch that checks if your current floor is equal to the number you associated the selected floor with. If those values are equal then the player has selected the same floor he's on, and therefore it shouldn't do anything. You will need to add an Else statement to the branch, which will contain the commands that will be used if your current floor value isn't equal to the associated number of the floor you've selected, put the whole "moving the elevator" thing there. Use this Conditional Branch on every floor you can get to, by comparing the variable containing the current floor ID with the respective selected floor ID, and that should fix the problem.

Unless I got it wrong, in which case I might need you to rephrase the problem or send a screenshot of your event commands.​
yea pretty much. as a real elevator, the floor you choose that ur already on wont disappear. Im just trying to make it where dialogue pops up, preventing the elevator from moving to the same floor
i'm gonna try it that way but i had an issue with variables and conditional branches in the past for a side quest...took nearly 3 days to get it to work, since the tutorials and any other guidance wasn't helpful
If you need help with an event, it's always handy if you posted the event in question. 🙂 Now we're just guessing what you might have done wrong.
To add to slimmeiske2's comment, please use Alt+PrtSc when taking a shot of your event - that way only the event will be included, not your whole desktop, making it much easier to read.
To add to slimmeiske2's comment, please use Alt+PrtSc when taking a shot of your event - that way only the event will be included, not your whole desktop, making it much easier to read.
Well this is the way i have it set up on events. when you press the switch you get these options and the contents of how the switch works.
LnWL5Nt.png
LFQJ19l.png

The switch works but what im trying to prevent is the elevator activating when you've already moved to the floor shown in the first image.

Now this image below works with how the switch does. You choose a floor and the event activates the page taking you to that floor when you exit the elevator.
319Lhnp.png

Each page has its own switch connected to the elevator button, changing the floors. Say you're on floor B1, you press the switch and choose B1 again. I don't want the elevator to move...I want it to where dialog pops up saying "We're already on this floor"
Before the shaking/moving commands, use a conditional to check which map the player is on. If the player is already on the map for e.g. B1, give a message e.g. "You are already there." In the Else part put the commands to get them to the correct floor.

As a heads up for the future, when people ask for a screen shot of an event, we need to see the whole event page, not bits of it, because otherwise important information is omitted.
So in other words switch out everything on the elevator switch with variables?
no - it doesn't matter if you use switches or variables and that is not what Kes told you.
The important thing is not to do the shake commands unconditionally after the selection, but with a check of where the player currently is and then change your reactions according to that.

So after the player presses the 1F button, you check if he is already there and only use the shake commands if he is not.

And do not confuse condition and conditional branches.
If the page condition is "switch 21 is on", then the content of that page can only run if that switch is ON - so adding a conditional branch checking the same switch is absolutely useless, because it is already guaranteed that the switch is ON when the content is run.
😅:yswt2:yea....still dont get it no matter how many times i go over the "check where player is" maybe im just too tired. Im gonna take a break and come back to this with a clear mind. Thanks though
There's more than one way to do this, but probably the easiest is this.
First select a new Control Variable Switch that you're not using for anything else. Name it Player's Map ID.
Then select Game Data and Map ID comes up as your first option.
upload_2018-7-18_12-33-48.png

Click OK

On your elevator event for a particular floor, select Conditional Branch, then Control Variable, and in the 'Constant' box enter the map ID number for the floor that you are on. No leading zeros, so it would be 47, not 047.
If yes, then have a bit of dialogue e.g. "You are already on that floor."
In the 'Else' branch [i.e. that is not the map you are on], put your whole choices and shaking etc.

Copy/paste this to every floor, remembering to change the map id number that you are checking in your Conditional branch.
I'll try this out. Thanks Kes

(Update)
Couldn't exit the elevator...fixed the issue by adding a new page to beginning of the elevator door event. Now the problem is accessing the other 2 floors. I deleted the both events and remade them from scratch following the example you posted, bu i still cant seem to get it to recognize the map ID #
then post a screenshot of the event as it is now and we tell you how to change it.
This is the same event for the elevator switch, since no changes to the elevator doors event was needed. I've changed the event to how it was described to work.
X0Fl6ZZ.png
you're missing the transfer player commands in that version of the event...
Wait, hold on. If the elevator is a single map, why use Map IDs to determine your current floor ? It's always gonna be the same ID, since you're gonna be on the elevator when you interact with the switch, and the elevator only has one individual and unchanging ID. Or are there three elevator maps, one for each floor ? That seems really unoptimized. Here's how I'd do it :

First, I'd associate every floor to a number and use a Variable to store your current floor's ID. I believe you'd first enter the elevator on the First Floor, that's why I'll associate '1F' with 0, since 0 is the default value for variables when starting the game. It'll allow the Variable to have the right value without having to change it the first time you enter the elevator. 'B1' is associated to 1 and 'B2' is associated to 2. Now that we have set constants as numerical IDs for our floors, we can work on the Switch.

@>Show Choices : 1F, B1, B2
When [1F]

@> Conditional Branch: Variable [0007:Current Floor ID] == 0
@>Text: 'Cera Embarassed', 0, Normal, Bottom
We're already on this floor.
@>
Else
@>Set Move Route: Player
$>Turn Down
@>Shake Screen: 5, 1, @200, Wait
@>Control Variables: [0007:Current Floor ID] = 0
@>
Branch End
​
@>​
When [B1]
@> Conditional Branch: Variable [0007:Current Floor ID] == 1​
@>Text: 'Cera Embarassed', 0, Normal, Bottom​
We're already on this floor.
@>
Else
@>Set Move Route: Player
$>Turn Down
@>Shake Screen: 5, 1, @200, Wait
@>Control Variables: [0007:Current Floor ID] = 1
@>
Branch End
​
​
@>​
​
When [B2]
@> Conditional Branch: Variable [0007:Current Floor ID] == 2​
@>Text: 'Cera Embarassed', 0, Normal, Bottom​
We're already on this floor.
@>
Else
@>Set Move Route: Player
$>Turn Down
@>Shake Screen: 5, 1, @200, Wait
@>Control Variables: [0007:Current Floor ID] = 2
@>
Branch End
​
​
@>​
​

The layout is the same every time and pretty close to what you've made, but here a variable is compared to numerical constants. If your floor ID is equal to the desired floor's ID, then you're already there and if it isn't equal, you get the little animation and, since you've changed floors, your current floor ID is changed to the one you selected.

Then, for the elevator exit, you can have two conditional branches that check Variable 0007. The first one checks if Variable 0007 is equal to 0. If it is, then it teleports the player to the First Floor, as 0 is the First Floor's arbitrary ID. If it isn't equal to 0, then you can put another conditional branch inside the first one's Else statement that checks if Variable 0007 is equal to 1. If it is equal to 1, then you'll get teleported to the B1 map. In the Else statement of that second branch, just teleport the player to the B2 map, because if Variable 0007 doesn't contain 0 or 1, then it must be 2, as 0, 1 and 2 are the only three possible numbers that the elevator switch event can store into Variable 0007.

This system should work better. It's not the most optimized, but I think it'll do.​
you're missing the transfer player commands in that version of the event...
Thats just it though. Im not trying to have the event automatically force the player off the elevator after selecting the floor and waiting for it to stop. Thats what the other event in the 6th post is supposed to do when the player manually moves to the exit
Thats just it though. Im not trying to have the event automatically force the player off the elevator after selecting the floor and waiting for it to stop. Thats what the other event in the 6th post is supposed to do when the player manually moves to the exit
In that case you're missing a command to store the selection of the button for the other event to use when leaving the elevator.
If you split functions between two events, then you'll need to connect those two events - and at the moment your selection of a floor is ignored after that.
Ok, final question. Upon starting on 1F map, should I change the event of the gate to get the elevator to recognize its as already being on the first floor? With the current event set up by Blackyu, upon pressing the button for the first floor, the elevator moves, but is recognized as being on the first floor when pressed again.

(Update)
It does the same then when you exit the elevator and press the switch for any of the floors ur on.
Ah, maybe you saved your game with Variable 0007 modified, which means that its base value is no longer 0. An easy fix for the situation is setting its value to 0 when you enter the Elevator map from the First Floor. That way you'll ensure that this Variable has the right value when you enter the elevator. You can also do that for the other two floors.

Original thread: https://forums.rpgmakerweb.com/threads/elevator-issues.97812/