Actor blueprint with reference to character variable not working

To me it looks like it is being caused by the DoOnce node. Why is it there? The DoOnce node would exactly cause your problem because it will only fire the output exec pin once until the reset is executed. I think you should either remove the DoOnce node or wire something into the reset pin.

Hi, I set up an actor blueprint, of which I have several instances in the scene. Each time the character triggers it, I show widget, player hits E, and interacts with the actor. On pressed E, the actor emits particles, destroys itself, and plays long audio.

Now, I don’t want to let a player see the widget of another actor until they finish listening to the audio of the first one, so they won’t be able to interact with other objects either. For this, I made a boolean variable in the character blueprint and called it from actor blueprint with casting.

If the variable IsAudioNotPlayed is true, the player sees the widget and proceeds with interaction. After “play sound 2d” node I set the bool to false (it is playing). Then I get the duration from the sound base variable and apply delay equal to the duration of the audio. After the delay, I set the bool to true (audio is not played again).

Result: I am able to interact with the actor once, when approaching other instances (even when audio finishes) widget is not appearing and interaction is not possible. I obviously did something wrong. Please help! Thanks in advance.

After “Destroy Actor”, you cant use any delay or timer after Destroy and everything after a delay will be skipped. so it is better to implement that mechanism on your character instead of that Actor!

333757-event-destroyed.jpg

Thank you, I had no idea about that!
So I’ve put “set actor hidden in game” instead of destroying it right away.