Why is door open timeline affected by door close set play rate?

Hi,

I am new to using UE4 and Blueprint.

I am trying to make a simple door open close system. I have a C++ variable exposed to blueprint called door close delay which is the time in seconds to close a door. So the inverse is the rate of closing. The timeline graph is a measure of fraction from 0 to 1 of the door open angle.
It seems to work fine but I have a hard time not being able to understand as to why the door opening is also affected by the same delay as the closing. In other words, the door opens and closes at the rate determined by door close delay. But I only want the closing to be affected and the opening to use the time set in the event graph.
I do not see a connection between the play rate node which is executed only on door close event and door opening.

Could someone help?

Once you close the door you “set” the play rate of then timeline to the door close rate. So the first time the door opens should be fine the first time you close the door you set the timeline rate to the door close rate so any door opening thereafter would use the door close rate. You need to reset the timeline rate during door opening to the door open rate you desire.

Thanks for the reply! Wow, that’s interesting. So is the time set in the event graph not used at all if the door closed event is the first thing that executes on Game play? In my current design, the door close event is always fired unless a trigger causes the door open to fire. So should I be using another play rate node with a hard coded rate that needs to go into the “Play” pin of the timeline for door open case? Is the the way to ideally do it if I need different open and close rates?

So not sure exactly what the inside of that timeline looks like but…whatever is there will run at standard speed so 1 second equals 1 second. When you change the play rate nothing inside the timeline changes but if you set play rate to 1/2 it will play twice as fast. And this effect will remain indefinitely until you change its again. So an easy fix is to just add another variable with the open door speed and have that set up just like the close door event so when you open the door it will set the play rate to the open door rate and when you close the door it will set it to the close door rate

So yes, if you run the close door script first it changes the timeline play rate for all future plays of that timeline which would be why you are gettting the result you have because on play you close the door and permanently change the timeline play rate for all successive plays

Ok thanks a lot!I understand.

Did it work?

Yes I used another play rate for the open part as you suggested and made the rate a fixed value so that doors open at a fixed rate. Also when you mentioned setting the rate to 1/2 or 0.5, it means that whatever the timeline is set within the event graph that will be slowed by 2 correct? So 5 second timeline event graph would become 10 seconds for a play rate of 0.5 or 1/2? I ask because you mentioned it would be twice as fast but I thought it was half as slow instead.

oh wait. I might have messed up. So as you said the close event sets the rate if run first so say the original timeline was 5 seconds. If close rate was 0.5, then timeline is effectively 10 seconds. Now when open event is fired at some rate does it operate on the 10 seconds or the 5 seconds (the original)? My understanding was the effective 10 seconds is the new rate due to the close event and so the open rate will apply against 10 seconds and not 5 seconds. Is this correct.

So it’s working how you want now?

Actually on trying it,it feels as though the doors open same time if constant rate is applied. So it looks like rate is being applied to the original timeline even if close executed first. So if I did not use any play rate node for open, only then it just uses the one set by the close, correct? If play rate is also set for open, it applies that rate against the original timeline and not the one set by the close event firing first.

to Be honest not sure if it is half as fast or half as slow but I do believe it operates on the actual length of the timeline either way. So setting it twice will always set based off the default not the newly set play speed. But I have never done this myself just my thought on the matter. A little trial and error never hurt anyone haha Just play with it and see what it is doing on each setting

I don’t know if your rates are just too similar to tell or what but I suggest setting the play rate before each door event, both open and close and make sure they are vastly different rates and you will see if they are changing or not. So make one go 3x and the other 1/10 or something and see what happens. I still believe both will operate off the default timeline length when determining play speed but I could be wrong.

Sure. I think you are right. The rates operate off the time length set in the event graph. So only when the play rate node is not used, it re-uses the one last set (like in the close door firing first case).When the play node is used, it seems to operate off the event graph time irrespective of what the close event did to the time.

Yes. Thanks a lot for your help:) It is confusing that without the play node it does not use the default event time graph but whatever set it last (if such setup exists) with the play node it calculates against the default.