So I’m having a coroutine function, which draws the bubble of an npc talking. When an event happen, let say for example, the player break a vase, I want to immediately stop that talking of the npc.
For more detail, all these functions has nothing to do with _process() or _physic_process(). They are independent customed one, and are called in some specific places here and there.
the talking function kinda look like this:
try using tween_interval() instead.
make sure you have/hold the tween variable for the bubble, so you can .kill() it when you deemed it’s no longer used, then recreate the tween by create_tween() to that same tween variable for destroying the bubble for example.