Posted May 17, 2022 by Husky
#fps #indie #elevator #shooter #platform #2d
Hi and Welcome. Today I would like to present the new elevator system proposal. I would like any feedback on the new elevators being added to level 1 now.
Old Method: If the player is above 0y, allow to teleport -5y. If the player is below 20y allow teleporting +5y.
This caused a problem where the elevator shaft with 2 floors allowed to teleport to the roof, as well as any shaft with more than 4 floors wouldn't work.
New method: Detect how many floors, (min 1, max 8) and make the equivalent number of buttons visible. Then buttons then take the player y position and teleport the player to the equivalent floor.