Is it possible to connect a function and a graph?

Basicly i wanna do smth like this:

bool isLocked =  true

void Update()
{
    if (!isLocked){
   ........ Animating door panel with timeline
 }
}

public void change(bool c){
isLocked = c
}

And so i have question for how to achive this with blueprints:

How may i create function with timeline (i think thats imposible), so how can i achive connection between function and graph (event listener on variable ???) ?

Is there posibility of creating graph which can be executed by other script (How may i achive that one ?)?

Simply just dunno how to solve that problem via BP :frowning: … What is the proper soulution ?

On the event graph, create a new Custom Event. Let’s call it ActivateTimeline. Since it’s on the event graph, you can use your timeline there.

Then in your blueprint’s function, simply call ActivateTimeline.