After squeezing my brain for the whole day, it’s finally time to ask those here who know way more than me.
I have a widget blueprint that has 6 elements. 5 of them have an animation for render opacity that goes from 0 to 1 and back to 0 at different times. That one I want to loop. Then I made another animation for the remaining element, which is a background. That also has a render opacity animation, from 0 to 1. This one I want to leave at 1.
The first problem I have is that the second animation just doesn’t work. Instead of fading in progressively over the time I set it to, it’s like it’s at 0, then when it reaches the keyframe that has the 1 value, it suddenly appears. It’s as if the two keyframes were together, but they’re not. In fact, they were about half a second apart, and to test this, I set them 5 seconds apart. And I triple checked both keyframes, and there’s nothing weird. In fact, if I play the animation in the widget timeline, it works as it should. But when it shows in the level, it waits 5 seconds and it suddenly appears.
The other animation doesn’t have this problem. When it plays in the level, it plays as it should. I even disconnected the play animation node that has the 5 elements and connected the event construct directly to the play animation node that has the background element, and it’s still appears suddenly. I don’t know if this is important, but the widget is inside a blueprint actor, which in turn is in the level.
So that’s one problem. The other one is that I need these two animations to play when the crosshair hovers over a frame on the wall. That frame is the blueprint actor I mentioned, and if the player hovers over that frame with the crosshair and clicks the left button, that triggers an action. This is done with a line trace and a bunch of other nodes. But I want an overlay to show automatically when the player hovers over that frame, which would be the two animations that I described above.
The problem I have here is that the animations start automatically when I hit play to start the preview. They don’t wait until the player is close to the frame that should trigger that action. Well, actually this happens only if I set the Event Construct node to the play animation node, with a sequence node between the two so I can also trigger the other animation:
But, if I put the event construct before the line trace, then the blueprint actor shows as the two animations already at the end, so it doesn’t animate anything:
These nodes are all in the graph section of the widget blueprint. I tried cutting the whole thing and pasting it in the level blueprint, the player controller blueprint and even the blueprint actor that is the frame on the wall. But the animation nodes are only available in the widget blueprint. If I try to call them from other blueprints, they don’t show up in the list of items I can call with a variable. The widget blueprint itself does, but the animations, not at all. So that leaves me with just the widget blueprint as the only place to put the nodes. But the line trace doesn’t seem to work at all in it.