x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How to make a lift between two floors?

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?

Product Version: UE 4.20
Tags:
more ▼

asked Oct 07 '18 at 04:03 PM in Using UE4

avatar image

dragonboy20144
6 1 2 5

avatar image Nebula Games Inc Oct 07 '18 at 04:13 PM

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.

avatar image dragonboy20144 Oct 07 '18 at 04:16 PM

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.

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

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.

more ▼

answered Oct 07 '18 at 04:35 PM

avatar image

Nebula Games Inc
4k 23 9 14

avatar image dragonboy20144 Oct 07 '18 at 04:41 PM

well that's a lot to take into just to make a basic lift :P 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.

avatar image Nebula Games Inc Oct 07 '18 at 04:47 PM

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.

avatar image mightyenigma Oct 07 '18 at 08:32 PM

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.

avatar image Nebula Games Inc Oct 09 '18 at 03:08 AM

You looking for something like this?

https://youtu.be/iaxexpOxl8k

avatar image dragonboy20144 Oct 09 '18 at 05:59 AM

yeah but the issue would be to get it to work in the right way.

avatar image Nebula Games Inc Oct 09 '18 at 09:31 AM

Haha, I'm asking because I made that. And it "works". What is the "right way" that you're looking for?

avatar image dragonboy20144 Oct 09 '18 at 09:57 AM
avatar image Nebula Games Inc Oct 09 '18 at 12:20 PM

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.

avatar image dragonboy20144 Oct 09 '18 at 01:06 PM

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 nob 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.

avatar image Nebula Games Inc Oct 09 '18 at 07:37 PM

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.

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question