Working Elevators
execute @a[18,53,-13,dx=-1,dy=0,dz=2] ~ ~ ~ fill 17 50 -13 18 50 -11 barrier
TIP: In order to copy the command selct it and than press Ctrl + C or CMD + C.
This command fills the elevator's ground of the 2nd floor with barriers when the player is 1 block above the 2nd floor.
fill 17 50 -13 18 50 -11 air
TIP: In order to copy the command selct it and than press Ctrl + C or CMD + C.
!SET TO CONDITIONAL!
This command removes the ground of the elevator at the 2nd floor, so the player will be able to pass through when he receives the levitation effect.
effect @a[18,45,-13,dx=-1,dz=2] levitation 1 6 true
TIP: In order to copy the command selct it and than press Ctrl + C or CMD + C.
!SET TO CONDITIONAL!
It gives at every player on the 1st floor a levitation effect.
The number "6" indicates the power of the elevation, the higher is that number, the higher the elevator will go.
/testforblock 17 46 -13 wooden_button 11
TIP: In order to copy the command selct it and than press Ctrl + C or CMD + C.
This is the first command that needs to be executed. It tests if the button at the 1st floor is pushed. The data value "11" changes depending on the direction the button faces.
/testforblock 17 52 -13 wooden_button 11
TIP: In order to copy the command selct it and than press Ctrl + C or CMD + C.
This command tests if the button at the 1st floor is pushed. The data value "11" changes depending on the direction the button faces.
fill 17 50 -13 18 50 -11 air
TIP: In order to copy the command selct it and than press Ctrl + C or CMD + C.
!SET TO CONDITIONAL!
This command removes the elevator's ground on the 2nd floor, so the player will fall to the 1st floor.
effect @p[17,52,-13] resistance 1 10 true
TIP: In order to copy the command selct it and than press Ctrl + C or CMD + C.
!SET TO CONDITIONAL!
This command gives at the closest player to the coordinates of the button on the 2nd floor a resistance effect, to avoid the fall damage.
© Cimap. All Rights Reserved
This website is not endorsed, associated or affiliated with Mojang AB.