Two way elevator platforms with just overlap

Hi I am trying to make a platform start at top when I step on it. go down , stay at bottom when I step off, then when I step back on , it goes back up. The first two I things I can do with a timeline (on component begin overlap send it down, on component end overlap stops it there , but the last part I can’t implement , - so when I step back on it will then go back up. if component end overlap does any kind of reverse or play from reverse , then the platform goes back up by itself. Any ideas? Thanx for any help

If you use a timeline to update the world location of the platform you should be able to play in reverse when “end overlap” event fires.

In your bp duplicate your static mesh actor 2 more times (for a total of three). Now on the 2 additiinal actors set them to be hidden in game and turn off all collisions these will just be references. In the event graph grab your trigger and add in the begin overlap node for it. Grab a switch on int and promote the int to a variable. You want the elevator to do 2 things, go up and stay then go down and stay until the player enters the trigger both times. So add your 2 output pins 0 and 1. For 0 grab your elevator platform and get a move component to node link that up to 0. For the location grab that second duplicate and get its relative location and plug it in. After the move component node set the int variable to 1. Now for output 1 do the zame thing only the location is your third duplicate instead and set the int to 0.

Now in your construction graph grab that second duplicate again and get a set relative location node and promote that vector to a public variable and expose 3d widget. Save and drag the bp into the level click the widget and move it wherever you want it and when you press play the elevator will move to that location over the time you specified then the next time you overlap the trigger it will move back.

Ok super close. Get rid of the “StaticMesh” component and parent StaticMesh1 and StaticMesh2 to the DefaultSceneRoot instead of the lift itself. In the event graph the component your moving is the lift instead of the now deleted StaticMesh. Then just connect your On Component Begin Overlap (Box) → Cast to BP_SurvivalCharacter to that switch on int node. No need for the timeline. Also go ahead and promote the “Over Time” spot of the move component to node to a public variable that you can control.

im not sure I quite understand Big_R. in this first pic I added what it looks like you explained. Yet I am not sure if it is what you mean. in the 2nd pic is the original platform logic. How would I connect your new logic to the original timeline and logic?

well the shown pic is the original platform logic. in the links below , your is the "added " logic.

In the construction script I did this logic.

so essentially I would only have 2 static mesh components left (static mesh 1 and static mesh 2)? with the original “static mesh” component deleted? if so what would I use to drag out and create the begin overlap node? the lift? I was thinking the " lift) is not actually a static mesh component if I remembered correct?

that is , the static mesh 1 and 2 parented to the default scene root instead?

It not working , The platform don’t move at all. This is how I got it now.

you just need to add more variables… have one for is up and is down… make the player collision to do the first elevator in a do once with reset… then on character leaves collision reset that do once and then on recollision check for the is_up_down var and if its down then play reverse from end if its up then get the relative location and lerp it down play from start …

The flow below works as a charm. Just be sure to have the static mesh set to movable (default). The collision box works as the trigger. Remove any location thingies in the construction script since that might add trouble rather than solving it.

The IsDown boolean is set to “true” default and can be exposed depending on you want to be able to choose to start at the top instead of the bottom and the distance float is how far the elevator will go…

Sorry made a boo boo but it is fixed now in the screenshots…

its like sometimes it starts moving when I end overlap and I don’t even have an end overlap event in the logic,

Thanks for reply. It must be something in my project ,Something with the overlap on character or something…I tried it the way you show and several other ways. they all work to a point, but it is very erratic. sometimes it works first time I walk on it. , sometimes I have to walk on and off the cube several times before it will move. Then sometimes at the bottom as I start to walk off , the cube will take off back up without me. Odd that it would work perfect sometimes but not others.

The component your moving still needs to be the lift. Without a static mesh component attached to the “move component to” node it doesn’t know which component you want to move so it won’t do anything.