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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

How do I make a door open quickly but close slowly?

Hello! I am very very very new to Unreal Engine. I am working on a simple game in which one of the challenges is a race against time. The player walks through a trigger volume which triggers a set of obstacles (which I've already coded in C++) and opens a door which slowly close. I have this blueprint here:

alt text

So what this is does is that it opens a door in 10.5 seconds and closes it in 10.5 seconds. What I want it to do is open the door instantly but close it 10.5 seconds. I tried making another timeline and rotator but that didn't help. The process should be repeatable meaning that if the player fails he can always try another time. I would really appreciate if someone could guide me through step by step on how to do this. Thanks in advance! :)

Product Version: UE 4.16
screenshot-4.png (178.6 kB)
more ▼

asked Aug 25 '17 at 04:24 PM in Blueprint Scripting

avatar image

1 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hmmmm, I would have probably used a lerp (0-1), and done a lerpRot. Then I would have probably had a multiplier in between the timeline and the lerp rotation alpha... the Multiplier would default to something like let's say 1 (so you can use the 10.5 in timeline), and the alpha would be the same... for the reverse. But for Play... right after the OnOpen event, set the multiplier to something silly like 10 or something, and clamp it to 1 (since it's a 0-1 lerp). Right after the OnClose, set it back to 1.

I mean, truthfully, you're using timeline in a "wrong way" so it's just hacking together some solution that would work for you.

more ▼

answered Aug 25 '17 at 05:00 PM

avatar image

2.4k 60 27 112

avatar image zablas Aug 25 '17 at 05:27 PM

Ok so I use a simple "Multiply" and a "Lerp" right? Set the A value in the lerp to 0 and B value to 1? In multiply I can set the value to 10? But how do I hook this into what I already have? I'm probably doing this completely wrong: alt text

screenshot-5.png (47.9 kB)
avatar image VictorBurgos Aug 25 '17 at 05:37 PM

It's not bad. But you are hard coding it. And you want a variable called "WhateverMultiplier", and Get that and hook that up where the 10 is, the 1 goes into the lerp/alpha slot in the timeline. You Set "WhateverMultiplier" right after the OnOpen/Close events.

avatar image zablas Aug 25 '17 at 05:52 PM

Of what type should WhateverMultiplier be? Float or...?

avatar image VictorBurgos Aug 25 '17 at 05:54 PM

float is fine

avatar image zablas Aug 25 '17 at 06:00 PM

Ok now I'm in this stage: alt text

You said to hook up the 1 to the alpha in the timeline but how do I exactly do that since the directions are not compatible. Unless I'm hooking something up wrong.

screenshot-7.png (63.5 kB)
avatar image VictorBurgos Aug 25 '17 at 06:11 PM

??? I think you need to look at a few of these so you can better understand how to work with timelines now and in the future:




(last one actually used a lerp, 0-1 float)

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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