'Do once' node can't be reset

Hi

I wanted to switch my background music when player was hunted down. But the ‘do once’ node I wrote in NPC’s service blueprint couldn’t be reset. I wonder what the problem is.

Thank you!

微信图片_20220624165954
The result.
I can only post one picture at a time.

DoOnce definitely does work. I think you’re calling the whole thing again, while it’s in the middle of executing. ( Or is there more than one object with this code? )

It’s the service I used to change NPC’s speed in behavior tree.
The whole thing looks like this:


It should be called once at a time.
And for now this behavior tree is used by only one NPC.

I tried another way to switch BGM, using event tick in NPC’s blueprint to check if player was in alert area. But that seemed not an economic way so I gave up. :confused:

1 Like