Hi all,
I’m trying to make a lift that allows the player to go between two floors, how would I go about doing it all to make sure it runs correct without having to buy them lifts from the online market store?
Hi all,
I’m trying to make a lift that allows the player to go between two floors, how would I go about doing it all to make sure it runs correct without having to buy them lifts from the online market store?
Depends how you want it to operate…continuously going back and forth between the levels and the player has to time it right to get on? Activate when the player steps up onto the floor? If so do you want it to automatically stop at the second floor or keep running so long as the player is on the platform? Many ways you can go about doing this.
Oh sorry, the lift is part the same level but the idea was to allow the player to change from two floors and that the doors would open to let the player in, then close when going up and then to open when the lift gets to the next floor.
Sorry I meant “floors” when I said “levels” not an actual new map. But yes to create that you would just need to use a trigger box or some overlap event in the lift BP. When the player overlaps have it LERP between the current location and the other floor’s location. Then have a boolean variable that can tell which floor the lift is on. So after the initial overlap set the boolean to “Floor 2” for example. And if on floor 2, lerp between floor 2 and floor 1. If on floor 1 lerp between floor 1 and 2. The door animation or whatever would run off the same script you might need a second collision box. One outside the lift that opens the doors, one inside that closes the doors and moves the lift up/down.
well that’s a lot to take into just to make a basic lift I will try and make a basic one in a way I can try and get to work and if not then I will try and follow your idea but if my idea works then great news haha but if not then… well oh well.
It is really not that complicated. Maybe it sounds that way in text but to get everything you wanted to do (doors open, player enters, doors close, lift moves up, doors open, player leaves, doors close) you are going to have to do a bunch of little (non-complex) steps. But you have to do them all. Coding can be tedious because you literally have to spell out every step for the computer. I was giving you instructions for making a real-life lift. That would be how they function. If you only need it to go one way and the player can never go down once they get on the lift then that simplifies things. Have one collision box, when the player enters have the doors open wait a few seconds for the player to get on and then have it LERP (to give smooth movement) between the ground floor and the second level. Once it finishes have the doors open and do nothing. But the player will never be able to return to the ground if you leave it like that.
What you are creating is a type of Finite State Machine.
you need variables to keep track of which floor the elevator is on, which one is calling it to come, and whether it has reached its target floor and whether the doors are opened, closed, etc.
yeah but the issue would be to get it to work in the right way.
well just a normal lift something that you would see in real life, to give you an idea check them links that have lifts
Haha, I’m asking because I made that. And it “works”. What is the “right way” that you’re looking for?
well the lift I was wanting to make was very basic but I just wanted it to run like them from the list and that I did not say I was expecting people to help me, but though if that was the case, why have an help center in the first place? all I ask for is help on how to do it just that I’m not wanting to buy content all the time from the marketplace, put it into my game and then to sell it on steam for a ■■■ head youtuber to call me an " asset flipper " if you know what I mean?
The basic lift I made was that when the player enters and press E from the box then the lift would go up or go down but the doors would not happen or close before the lift was to go up or down.
Umm, so let me get this straight, you want someone to walk you through how to replicate something you can buy on the market so you don’t have to pay? That’s pretty messed up. And I don’t know anyone that’s going to do that for you. That is 3D modeling, texturing AND scripting logic. I would have helped you script the logic as you can see I created a fully functioning elevator for you. But if you want a “polished” look that’s something you’re either going to have to purchase or create yourself. Definitely well beyond the scope of an answer hub question. Your question made it seem like you didn’t know how to create the functionality of a basic elevator system and your only option was the market place. That you would have absolutely gotten help with. This however is not something I can or would help you with… sorry.
My point was I took time to create a rather sophisticated lift, it did more than just go up and down. I got doors to open when the player was near, close before moving, added a widget to select a floor, figured out how to get it to stop at the proper height, display the floor the player was on as the lift moved etc. And I was going to help you re-create it for yourself and your response to me was “the issue is getting it to work the right way”. Which to me meant I did something you didn’t want or my lift didn’t work exactly as you wanted and I would have helped you modify it to do what you wanted so I asked for clarification. And your clarification was here is a marketplace asset, I want it to look like this. Now you are telling me you want it to “run” like they do. I do not know what you are trying to do…I only have a description of how the marketplace assets work. Anyway, if you want to use what I did as a starting place cool, I will post screen shots if not, don’t really know how to help you man.