Button states not activating blueprint? And a question about Delta Time

(See below: The TLDR version is that the latest build is bugged in regards to Lerp (Vectors) not passing variables correctly and that the Simulation button in BP doesn’t do anything as far as I can tell)

Having a bit of an issue I hope someone can help me out with. There are actually 2 issues at play here.

Here is the following BP:

First issue: When I press the button T (or any other button I’ve tried, mouse or gamepad inputs), it will not recognize the event. During simulation, it doesn’t even capture the event for some reason. However, if I use an Event Begin Play node instead of an input, it works fine.

Second issue: As you can see, I have a If/Then branch statement with a boolean of “Gate Opened?”… if set to true, it is supposed to Play the timeline (gate closes), if False, it plays the timeline in reverse (gate opens). At the end, it should then set the boolean to the opposite of what it originated as. However, during simulation with using Event Begin Play, it does not set the bool value. I tested this by “Looping” the BP by adding links from the Set events back into the Branch node. It played the animation once and stopped.

Any insight as to what is up with this would be appreciated!

Another question I had was about Delta Time… Higher the value the “slower” the timing gets, right? Or does it go faster? In relation to these:

(Main Blueprint):
(Function BP - the 3 functions are almost the same, just controlling different meshes):

I’m not quite sure which class this BP belongs to but only a player controller (and as far as I know also the character) recognizes input by default. For all other classes you have to enable it (by default to some controller or via nodes). So this could cause your input issue.

To your second question… From what I see you play the timeline and on each update you change the direction it’s played… this means every time anything changes you change the direction. I’m pretty sure you want to toggle it after it’s finished right? Well just hook up your branch with “Finished” because right now it’s dependent on how often your update is triggered if it’s opened or closed.

And to delta time. This will provide you the amount of seconds since the last frame was displayed (0.something). So the higher this value is the lower your fps is and your objects will update less often. Just as a small heads up: You also have the node “Get World Delta Seconds” so you don’t have to store this value yourself :wink:


Ok, after doing some digging, it seems that there are a few things going on:

The first was that you were correct, I have this on an actor BP and not player controller… eh, was just going to use the “press button” for debugging while I work on a TOD system that will open/close the gates. The second thing is that the Simulation button does, well, nothing (using latest launcher-build). I had to go to the Play drop down and use the Simulate version (or alt+S). The third issue is that Lerp (Vector) is not returning a valid variable (Variable not in Scope).

As for the Delta Time thing, I’m using it as a “speed modifier” to rotate objects at a consistent rate independent of the user’s framerate. I saw somewhere that using this method was preferred so the animations/timing wasn’t thrown off. Basically a “this is what I want delta time to be, not what the user says delta time is” type of methodology.

The variable not being in scope can have a number of causes and pretty much never does it mean it’s an invalid variable.

In 4.7 there is a bug that quite a lot of variables aren’t in scope (maybe it’s been hotfixed… not quite sure) but besides that variables which don’t change aren’t in scope, some from other BPs or functions aren’t and so on. Try to print it. It should be valid. Annoying but well… what can one do?

Even setting up exactly like the Door tutorial from Epic suggests results in the variable out of scope, so I’m highly suspicious that this is a bug. I’ll add the print thing to verify though.

edit: Verified, the Lerp is passing a valid vector, however, it is saying that it’s out of scope.
edit2: One could go into the source code and squash the bug if one had the know how to do such demonic trickery… err… I mean… if one had the know how to program C++ :wink:

have had to do things like recreate the node/ variable or rehook them up or even restart editor before, to get some things to work, sadly.

most of the time it was something silly I had done though, like not opening the eye up next to the variable to make it public, lol.